Skip to content

Instantly share code, notes, and snippets.

@lieanu
Created July 10, 2015 02:51
Show Gist options
  • Select an option

  • Save lieanu/3e6af5d781977f1c1b4e to your computer and use it in GitHub Desktop.

Select an option

Save lieanu/3e6af5d781977f1c1b4e to your computer and use it in GitHub Desktop.
Running Sphinx v1.2.3
loading pickled environment... done
building [doctest]: targets for 2 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
running tests...
Document: rop/rop
-----------------
**********************************************************************
File "rop/rop.rst", line 18, in default
Failed example:
rop.rdi == rop.search(regs=['rdi'], order = 'regs')
Expected:
True
Got:
False
**********************************************************************
File "rop/rop.rst", line 16, in default
Failed example:
r.migrate(0)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest default[0]>", line 1, in <module>
r.migrate(0)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 1424, in migrate
result = self.setRegisters(condition)[self.SP]
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 704, in setRegisters
log.error("Gadget to reg %s not found!" % reg)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/log.py", line 374, in error
raise PwnlibException(message % args)
PwnlibException: Gadget to reg esp not found!
**********************************************************************
File "rop/rop.rst", line 17, in default
Failed example:
print r.dump()
Expected:
0x0000: 0x1000000d pop ebp; ret
0x0004: 0xfffffffc
0x0008: 0x1000000f leave; ret
0x000c: 'daaa' <pad>
Got:
<BLANKLINE>
**********************************************************************
File "rop/rop.rst", line 47, in default
Failed example:
rop.setRegisters_print(con)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest default[6]>", line 1, in <module>
rop.setRegisters_print(con)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 465, in setRegisters_print
for r, gadgets in self.setRegisters(condition).items():
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 790, in setRegisters
sp, stack = self.check_ip_postion(path, conditions, (sp, stack))
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 831, in check_ip_postion
return_to_stack_gadget = self.get_return_to_stack_gadget(move=large_position-sp+2*self.align)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 951, in get_return_to_stack_gadget
log.error("Cannot find a gadget return to stack.")
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/log.py", line 374, in error
raise PwnlibException(message % args)
PwnlibException: Cannot find a gadget return to stack.
**********************************************************************
File "rop/rop.rst", line 65, in default
Failed example:
rop.setRegisters_print(con)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest default[7]>", line 1, in <module>
rop.setRegisters_print(con)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 465, in setRegisters_print
for r, gadgets in self.setRegisters(condition).items():
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 704, in setRegisters
log.error("Gadget to reg %s not found!" % reg)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/log.py", line 374, in error
raise PwnlibException(message % args)
PwnlibException: Gadget to reg edx not found!
**********************************************************************
File "rop/rop.rst", line 76, in default
Failed example:
rop.setRegisters_print(con)
Expected:
<setting eax>
0x10000000 mov eax, dword ptr [esp]; pop ebx; ret
0x0
<setting ebx>
0x10000003 pop ebx; ret
0x1
Got:
<setting eax>
0x10000000 mov eax, dword ptr [esp]; pop ebx; ret
0x0
aaaa
<setting ebx>
0x10000003 pop ebx; ret
0x1
aaaa
**********************************************************************
File "rop/rop.rst", line 103, in default
Failed example:
rop.setRegisters_print(con)
Expected:
<setting edi>
0x10000018 mov edi, dword ptr [esp + 8]; add esp, 4; ret
aaaa
0x1000000c
0xdeadbeef
Got:
<setting edi>
0x10000018 mov edi, dword ptr [esp + 8]; add esp, 4; ret
aaaa
baaa
0xdeadbeef
**********************************************************************
File "rop/rop.rst", line 134, in default
Failed example:
rop.setRegisters_print(con)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest default[8]>", line 1, in <module>
rop.setRegisters_print(con)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 465, in setRegisters_print
for r, gadgets in self.setRegisters(condition).items():
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 790, in setRegisters
sp, stack = self.check_ip_postion(path, conditions, (sp, stack))
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 831, in check_ip_postion
return_to_stack_gadget = self.get_return_to_stack_gadget(move=large_position-sp+2*self.align)
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/rop/rop.py", line 951, in get_return_to_stack_gadget
log.error("Cannot find a gadget return to stack.")
File "/home/lieanu/GSoC2015/binjitsu/binjitsu/pwnlib/log.py", line 374, in error
raise PwnlibException(message % args)
PwnlibException: Cannot find a gadget return to stack.
**********************************************************************
1 items had failures:
8 of 146 in default
146 tests in 1 items.
138 passed and 8 failed.
***Test Failed*** 8 failures.
Document: rop/srop
------------------
1 items passed all tests:
91 tests in default
91 tests in 1 items.
91 passed and 0 failed.
Test passed.
Doctest summary
===============
237 tests
8 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 1 warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment