doyler / SecurityTools

A single repository for any security tools, scripts, documentation, etc. that I add

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: string argument without an encoding

AxDSan opened this issue · comments

commented

PythonShellcode.py - Whenever I try to execute the shellcode, it shows up that error. It happens on bytearray()

Ah, yes, I forgot about that.

This code will work in Python 2.7, but will error out in Python 3.

The reason for this is that bytearray requires a second argument so that it can be encoded in bytes.

In that case, adding , 'utf8' to the end of the string should work just fine.

Let me know if that fixes your issue!

commented

It worked, Thank you 💃