Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode Characters in Shellcode Cause Exception #2

Open
adamdoupe opened this issue Dec 4, 2014 · 2 comments
Open

Unicode Characters in Shellcode Cause Exception #2

adamdoupe opened this issue Dec 4, 2014 · 2 comments

Comments

@adamdoupe
Copy link

break.asm
.section .text
xor %eax,%eax /* ☃ */
push %eax
push $0x68732f2f
push $0x6e69622f
mov %esp,%ebx
push %eax
push %ebx
mov %esp,%ecx
mov $0xb,%al
int $0x80
-- end break.asm --

python shellnoob.py --from-asm break.asm --to-exe break

causes the following exception:

Traceback (most recent call last):
File "shellnoob.py", line 1557, in
main()
File "shellnoob.py", line 1553, in main
snoob.do_conversion(input_fp, output_fp, input_fmt, output_fmt)
File "shellnoob.py", line 515, in do_conversion
_output = getattr(self, conv_func_name)(_input)
File "shellnoob.py", line 221, in conv
_hex = to_hex(self, input_s, with_breakpoint)
File "shellnoob.py", line 665, in asm_to_hex
obj = self.asm_to_obj(asm, with_breakpoint)
File "shellnoob.py", line 960, in asm_to_obj
tmp_asm_f.write(asm.encode("utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

@reyammer

@kapravel
Copy link

kapravel commented Dec 5, 2014

☃☃☃☃☃☃☃☃☃☃☃

@reyammer
Copy link
Owner

reyammer commented Dec 5, 2014

@kapravel, thanks for your valuable contribution. Now the problem is much clearer. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants