Commit Graph

37 Commits

Author SHA1 Message Date
rocky
eefbc40eef option to show asm and DRY.
Get ready for some 2.3 support
2016-06-03 09:25:20 -04:00
rocky
70c6ee946c Work around lack of JUMP_OPs in xdis 1.1.0 2016-05-31 20:03:28 -04:00
rocky
20768266b4 use totally xdis's opcodes
Needs xdis 1.1.0 or greater
2016-05-31 19:53:17 -04:00
rocky
90741148ad DRY scanners more 2016-05-28 17:07:43 -04:00
rocky
b18b3e5d47 xdis for Python 3 opcodes 2016-05-28 01:14:18 -04:00
rocky
6956e88e0e Small changes and administrivia 2016-05-19 08:40:20 -04:00
rocky
a08ece371e pydisassemble improvements; DRY scannners
disas.py:
 - disassembles *all* code objects found

scanner*.py:
 - no longer need to pass in version numbers; this
   is obtained from the class name
 - no longer pass in opcodes; this is done at
   initialization from the scanner name
 - all Pythoin 3 scanners support native disassembly
2016-05-18 10:58:48 -04:00
rocky
bb31629c35 pydisassemble disassemble without grammar mangling
Some other small cleanups as well
2016-05-15 13:55:21 -04:00
rocky
b9692c9b1f DRY scanner34 and scanner35
handle 3.0..3.4 build maps as key/value pairs
2016-05-15 03:29:08 -04:00
rocky
1d9ab4e1d1 Start to DRY Python 3.4 and 3.5 scanners 2016-05-14 16:55:44 -04:00
rocky
631d7be921 Redo make_function for *, arg
main(*, file='foo') and things like that now work
2016-05-11 20:34:20 -04:00
rocky
61c4a711a2 DRY scanner 3.{4,5} code 2016-05-08 00:52:02 -04:00
rocky
7bf93980ce Don't repeat next_except_jump 2016-05-03 19:39:01 -04:00
rocky
31ebe88b38 Start to DRY opcode code. Limited support for decopyling Python 3.5 2016-01-02 22:59:02 -05:00
rocky
2e91de8355 Start using our replacement for inspect.iscode 2015-12-30 18:44:27 -05:00
rocky
657eeb7de8 Towards Python3 getting try/except working more often. 2015-12-30 09:46:52 -05:00
rocky
e17d94f28f Syntax error typo 2015-12-29 17:35:49 -05:00
rocky
116263dd8c inspect.iscode -> hasattr for now until we write a cross-version iscode 2015-12-29 17:05:48 -05:00
rocky
820fdb4771 Fix up Python 2.x's ability to get code from Python 3.x's bytecode 2015-12-27 19:36:02 -05:00
rocky
44cd349cc7 DRY Python3 scanner code. Some cross version handling fixed.
Some Python 3.2 and 3.3 deparse fixes.
2015-12-27 04:43:35 -05:00
rocky
008bd79719 Fix up Python 3.2, 3.3, and 3.4 cross-version scanners
Try travis 2.6 and 3.3
2015-12-26 10:19:26 -05:00
rocky
7a2703634f Fix up looping by reinstating JUMP_ABSOLUTE -> JUMP_BACK or CONTINUE
get jump offsets into jump attributes. Fix up 3.2 scanner paritally
and use that in 3.4 for in cross version disassembly.
2015-12-26 03:06:03 -05:00
rocky
6a49cd2c69 Bug in for loop with try. Add more of 2.7's COME_FROM statements.
spark.py: add tracing reduce rules. main: reduce cutsines.
Start history
2015-12-21 21:08:08 -05:00
rocky
6910e1b1b4 Python 3 decompilation from Python2 2015-12-20 18:18:40 -05:00
rocky
21920b5852 First list comprehensions from Python3. More test makefile hacking 2015-12-20 17:16:05 -05:00
rocky
93ab1f0281 Python 3.4: MAKE_FUNCTION starts to work. 2015-12-19 11:17:17 -05:00
rocky
a75bd0bf97 Python 3 bytecode handles opcodes with varargs (better). Decompiling
assert works. Add more of the simple tests and their compiled bytecode.
2015-12-19 03:00:39 -05:00
rocky
6bc425b45e marshal.py: Python2 marshal code shouldn't try to turn a code object
into a string. parse3.py: handle both keyword and positional function
calls. scanner34.py: Remove extra level of quoting in LOAD_CONST.
Keyward handling now works cross Python 2/3. Some other spelling and doc fixes.
2015-12-18 21:20:12 -05:00
rocky
a309a77ea7 Python3: remove "return None" at end of main for uncompyle. Fix up verify for Python3. First automated Python 3.4 tests via "makecheck-3.4" in test directory. 2015-12-17 18:53:30 -05:00
rocky
87a3c5d687 Python 3.4 if ifelse decompyling now works. 2015-12-17 08:10:43 -05:00
rocky
2dc8375ed0 Supoer multiple parsers, specifically for Python2 and Python3. In the
process some OO cleanup and some global variable hacks removed.
2015-12-16 22:08:29 -05:00
rocky
06653a6163 On Python3.4 decompiling Python 3.4 instructions, use its
built-in disassembler routines. In contrast to what was here,
they most likely work!
2015-12-16 09:13:14 -05:00
rocky
8c94acfca0 Start 3.4 more stringent disassembly testing. Disassembly format has
changed slightly. misc small bugs.
2015-12-16 00:40:28 -05:00
rocky
683c75d37e Split out marhsal and disassemble code and spell disassemble correctly.
Fix some lint issues
2015-12-15 12:10:03 -05:00
rocky
34ecd54e2c README.rst: note addition of pydisassemble
Remove duplicate disassembly printing from scanners and
put common code in caller(s). Show source-code line numbers in disassembly output
and fix alignment of byte offsets.
disas.py: workaround Python 2/3 different layouts before we get to
bytecodes in a code object.
2015-12-15 01:42:07 -05:00
rocky
3e31f41552 Closer to being able to handle Python 3.4 bytecode. Loading of Python
Python bytecode now works. magics from 3.3 to Python 3.4 has been added.
Some Python 3.4 scanner issues have been fixed.
2015-12-14 14:55:32 -05:00
rocky
b5797dfa0f Move scanners in its own directory. Dir base-tests -> base_tests so we
can import from that.
2015-12-14 09:38:46 -05:00