CS-Loader icon indicating copy to clipboard operation
CS-Loader copied to clipboard

go追加shellcode报错

Open leojjj opened this issue 3 years ago • 3 comments

TypeError: a bytes-like object is required, not 'str'

leojjj avatar Apr 12 '21 22:04 leojjj

同样的问题:

(hack) C:\Users\bingo\Downloads>python generator.py  aaa 11.jpg
Traceback (most recent call last):
  File "generator.py", line 139, in <module>
    main()
  File "generator.py", line 118, in main
    baseStr = base64.b64encode(shellcode)
  File "C:\Users\bingo\anaconda3\envs\hack\lib\base64.py", line 58, in b64encode
    encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'

handbye avatar May 22 '21 15:05 handbye

这个是由于python版本的问题,按照错误提示把str转byte类型就可以了

Gality369 avatar May 28 '21 07:05 Gality369

用python2解决问题

handbye avatar Jun 03 '21 07:06 handbye