Comments (9)
Please copy and post the first 10 lines of myfile.pyasm
from python-xasm.
# pydisasm version 6.0.5.dev0
# Python bytecode 3.10.0 (3439)
# Disassembled from Python 3.10.4 (main, Dec 1 2022, 10:22:11) [GCC 7.5.0]
# Timestamp in code: 0 (1970-01-01 01:00:00)
# Source code size mod 2**32: 0 bytes
# Method Name: contatore
# Filename: myfile.py
# Argument count: 1
# Position-only argument count: 0
# Keyword-only arguments: 0
# Number of locals: 5
# Stack size: 4
# Flags: 0x00000043 (NOFREE | NEWLOCALS | OPTIMIZED)
# First Line: 22
from python-xasm.
I can't reproduce this problem. If you are not using the latest github master, try with that. (I just changed the version number to a dev branch to distinguish from the last release).
Also there was an unrelated bug in xdis, so pull from the master use that.
If this doesn't correct things, then attach the entire disassembled file and the pyc file.
from python-xasm.
tank's , reproduce the same error with new dev branch
Traceback (most recent call last):
File "/usr/local/bin/pyc-xasm", line 33, in <module>
sys.exit(load_entry_point('xasm==1.2.1.dev0', 'console_scripts', 'pyc-xasm')())
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/xasm_cli.py", line 28, in main
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/assemble.py", line 290, in asm_file
AssertionError: File needs to start out with: # Python bytecode <version>
the project it's a private with ip of my server if it's possible i send you in pm
from python-xasm.
Ok - send email to [email protected] and I'll look at it when I can.
from python-xasm.
thank's again i will send now
from python-xasm.
The file you sent doesn't match what you report above. The first line in the file sent is:
/root/python-xdis
The other thing about the file sent is that xdis needs to be redone to correct for changes in the instruction operand format for jump instructions in 3.10. I made yet another change just before writing this. So make sure to refresh your xdis development version, and run the disassembly again (and don't add further lines).
from python-xasm.
thank's for your time i don't know why the file that i have send report in frist line /root/python-xdis i ran again
pydisasm -F xasm myfile.pyc | tee > myfile.pyasm
and reinstall xdis from dev branch
this is the output of comand pyc-xasm myfile.pyasm
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/assemble.py", line 461, in create_code
KeyError: 'L40'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pyc-xasm", line 33, in
sys.exit(load_entry_point('xasm==1.2.1.dev0', 'console_scripts', 'pyc-xasm')())
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/xasm_cli.py", line 28, in main
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/assemble.py", line 173, in asm_file
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/assemble.py", line 465, in create_code
File "/usr/local/lib/python3.10/site-packages/xasm-1.2.1.dev0-py3.10.egg/xasm/assemble.py", line 401, in err
RuntimeError: Label L40 not found.
I know about { POP_JUMP_IF_TRUE L2 (to 4), POP_JUMP_IF_FALSE L40 (to 80)}. Instruction 1:
POP_JUMP_IF_FALSE L40 (to 80)
from python-xasm.
from python-xasm.
Related Issues (17)
- Convenient API to use it from python is strongly needed. HOT 4
- Can't decomplie HOT 1
- python_version is None HOT 1
- AttributeError: 'NoneType' object has no attribute 'split' HOT 5
- Output from xdis doesn't work when assembling with xasm HOT 7
- Python API ? HOT 2
- pyc-xasm KeyError: '0' HOT 1
- Incorrect version check in `create_code`? HOT 3
- can't find method
- PEP 552 Header for Python >= 3.7 HOT 3
- Error in python 3.8.3 ,how to fix? HOT 2
- Look over and fix up SIP hash in 3.7+
- Error while 'make check' HOT 1
- RuntimeError in pyc-xasm HOT 4
- How To Convert Bytes to __code__ HOT 1
- Error with Python 3.8.10 assemble file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-xasm.