整个校验算法如下:
key[7]='A'
key[7]='#'
key = key^0x1F
refkey = 'invalid argument'
refkey = refkey ^0x1C
key==refkey
python逆运算可以得到key
a = "invalid argument"
b = ''.join(chr(ord(ch)^0x1C) for ch in a)
#b = 'urj}pux<}n{iqyrh'
c = ''.join(chr(ord(ch)^0x1F) for ch in b)
#c='jmubojg#bqdvnfmw'
key = jmubojgAbqdvnfmw
整个校验算法如下:
key[7]='A'
key[7]='#'
key = key^0x1F
refkey = 'invalid argument'
refkey = refkey ^0x1C
key==refkey
python逆运算可以得到key
a = "invalid argument"
b = ''.join(chr(ord(ch)^0x1C) for ch in a)
#b = 'urj}pux<}n{iqyrh'
c = ''.join(chr(ord(ch)^0x1F) for ch in b)
#c='jmubojg#bqdvnfmw'
key = jmubojgAbqdvnfmw
def sark_name_func_wx():
wd = {} #wrap:{func_w:func}
for func in sark.functions():
wl = sark_get_func_wrapline(func)
if wl is not None:
wd[func.name] = wl.insn.operands[0].text
#
nf = [] #name-func which are not wrapper for others
for k,v in wd.viewitems():#
if v not in wd.keys():
nf.append(v)
#mark func
#return wd,nf
for k,v in wd.viewitems():
if k in nf:
continue
d,n = sark_get_call_deep(k,wd,nf)
if n.startswith('Hi_'):
new_name= "{}_w{}".format(n,d)
else:
new_name= "Hi_{}_w{}".format(n,d)
print sark.Function(name=k).name,new_name
sark.Function(name=k).name = new_name
def sark_name_func_wx():
wd = {} #wrap:{func_w:func}
for func in sark.functions():
wl = sark_get_func_wrapline(func)
if wl is not None:
wd[func.name] = wl.insn.operands[0].text
#
nf = [] #name-func which are not wrapper for others
for k,v in wd.viewitems():#
if v not in wd.keys():
nf.append(v)
#mark func
#return wd,nf
for k,v in wd.viewitems():
if k in nf:
continue
d,n = sark_get_call_deep(k,wd,nf)
if n.startswith('Hi_'):
new_name= "{}_w{}".format(n,d)
else:
new_name= "Hi_{}_w{}".format(n,d)
print sark.Function(name=k).name,new_name
sark.Function(name=k).name = new_name