欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

DDCTF2018(╯°□°)╯︵ ┻━┻writeup

程序员文章站 2022-05-12 13:39:25
...

DDCTF2018(╯°□°)╯︵ ┻━┻writeup

 

奉上我老哥py脚本

# -*- coding:utf-8 -*-
import re
import urllib

list1=[]
list2=[]


s = "d4e8e1f4a0f7e1f3a0e6e1f3f4a1a0d4e8e5a0e6ece1e7a0e9f3baa0c4c4c3d4c6fbb9b2b2e1e2b9b9b7b4e1b4b7e3e4b3b2b2e3e6b4b3e2b5b0b6b1b0e6e1e5e1b5fd"

print len(s)
result=re.sub(r"(?<=\w)(?=(?:\w\w)+$)"," ", s)
print result
urlencode_s="%"+result.replace(" ","%")
print urlencode_s
hex_s = "0x"+result.replace(" ","0x")
print hex_s
print hex_s[-4:8]
list_hex = []

for i in range(len(hex_s)):
	if((i+1)%4==0):
		print hex_s[(i-3):(i+1)]
		list1.append(hex_s[(i-3):(i+1)])
		print i
	else:
		print i
		continue
print list1

for i in list1:
	list2.append(int(i,16))

print list2

print 253-125
list3=[]
print len(list2)
for i in range(67):
	list3.append(chr(int(list2[i])-128))
s = "".join(list3)
print s

DDCTF2018(╯°□°)╯︵ ┻━┻writeup