0
이 스크립트를 python2에서 python3으로 변환하려고합니다.python 'decode'에는 특성 쉘 코드가 없습니다
이 '쉘 코드는'다음 줄에 ByteArray의로 변환 (또는해야한다) 도착# need to code the input into the right format through string escape
shellcode = shellcode.decode("string_escape")
:
shellcode = bytearray(shellcode)
그러나, 내가 실행
나는이 라인에 문제로 실행하고 의 오류로 :
는AttributeError: 'str' object has no attribute 'decode'.
"쉘 코드는"동일 :
shellcode = sys.argv[1]
쉘 코드는 "\ x31 \ xd2 \ xb2 \ x30 \"과 같아야하고 나머지 스크립트는 쉘 코드를 실행해야합니다.
감사합니다 (이 스크립트는 python2.7에서 완벽하게 실행됩니다).