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

error using example #7

Open
ling245100108 opened this issue Apr 13, 2015 · 1 comment
Open

error using example #7

ling245100108 opened this issue Apr 13, 2015 · 1 comment

Comments

@ling245100108
Copy link

I run command :"python system.py --sym stdin examples/toy002-libc", and meet the following error:

<type 'exceptions.Exception'> 'X86Op' object has no attribute 'size'

stdin: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n'

Traceback (most recent call last):
File "system.py", line 253, in
while current_state.execute():
File "system.py", line 56, in execute
return self.os.execute()
File "/home/ling/Desktop/pysymemu/linux.py", line 1229, in execute
self.current.execute()
File "/home/ling/Desktop/pysymemu/cpu.py", line 950, in execute
instruction = cpu.getInstructionCapstone(cpu.PC)
File "/home/ling/Desktop/pysymemu/cpu.py", line 98, in new_method
value = old_method(obj, *args)
File "/home/ling/Desktop/pysymemu/cpu.py", line 769, in getInstructionCapstone
op.size *= 8

AttributeError: 'X86Op' object has no attribute 'size'

@feliam
Copy link
Owner

feliam commented Apr 13, 2015

#This happens with the last capstopne pip installed ?

shiva@shiva:/pysymemu-capstone/pysymemu$ echo ++++ >stdin
shiva@shiva:
/pysymemu-capstone/pysymemu$ python system.py --sym stdin examples/toy002-libc
[+] Running examples/toy002-libc
with arguments: []
with environment: []
2015-04-13 11:26:24,222: EXECUTOR:INFO: Loading amd64 ELF program examples/toy002-libc
2015-04-13 11:26:24,222: EXECUTOR:INFO: Arguments: []
2015-04-13 11:26:24,222: EXECUTOR:INFO: Environment: {'LANG': 'en_US.UTF-8', 'TERM': 'xterm', 'SHELL': '/bin/bash', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'XDG_RUNTIME_DIR': '/run/user/1000', 'LANGUAGE': 'en_US:en', 'SHLVL': '1', 'SSH_TTY': '/dev/pts/6', 'HOME': '/home/shiva', 'PWD': '/home/shiva/pysymemu-capstone/pysymemu', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'SSH_CLIENT': '201.252.172.151 60076 22', 'LOGNAME': 'shiva', 'USER': 'shiva', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'MAIL': '/var/mail/shiva', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:', 'XDG_SESSION_ID': '6', 'OLDPWD': '/home/shiva/pysymemu-capstone/pysymemu/examples', '_': '/usr/bin/python', 'SSH_CONNECTION': '201.252.172.151 60076 200.16.17.187 22'}
2015-04-13 11:26:24,226: MEMORY:INFO: Initializing Symbolic Memory
2015-04-13 11:26:24,227: CPU:INFO: Cpu Initialized.
2015-04-13 11:26:24,229: LINUX:INFO: Loading examples/toy002-libc as a amd64 elf
2015-04-13 11:26:24,229: LINUX:INFO: Arguments: ['examples/toy002-libc']
2015-04-13 11:26:24,448: LINUX:INFO: Setting argv, envp and auxv.
2015-04-13 11:26:24,491: LINUX:INFO: Setting initial cpu state
2015-04-13 11:26:24,492: LINUX:INFO: Entry point: 0000000000400f4e
2015-04-13 11:26:24,492: LINUX:INFO: Stack start: 00007fffffffe6c8
2015-04-13 11:26:24,492: LINUX:INFO: Brk: 00000000006c5000
2015-04-13 11:26:24,492: LINUX:INFO: Mappings:
2015-04-13 11:26:24,492: LINUX:INFO: 0000000000400000-00000000004c0000 r x 00000000 examples/toy002-libc
2015-04-13 11:26:24,492: LINUX:INFO: 00000000006bf000-00000000006c1000 rw 00000000
2015-04-13 11:26:24,492: LINUX:INFO: 00000000006c1000-00000000006c5000 rw 00000000
2015-04-13 11:26:24,492: LINUX:INFO: 00007ffffffde000-00007ffffffff000 rwx 00000000
Saving state state_0000000000400f4e_0.pkl
Starting...
Loading state state_0000000000400f4e_0.pkl
Symbolic PC found, possible detinations are: ['4010be', '4010b2']
Saving state state_00000000004010b2_5807.pkl
Program Finnished correctly
stdin: '\x00\x00\x00\x00\n'
Loading state state_00000000004010b2_5807.pkl
Program Finnished correctly
stdin: '4\x01\x02\x01\n'
Results dumped in ./pse_h5O1s5
7577 1517.99242747

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

2 participants