Comments (8)
Thanks for noticing. Will check the code for __getattr__
usage.
from kamene.
This was tricky, but I fixed __getattr__
usage in volatile module for cases when __int__
, __str__
, __repr__
, __index__
could be called. Comments on other special methods to be included are welcome. Also, please, comment on other places in the code that expect __getattr__
to catch special methods. This is not trivial to identify.
__cmp__
is not ported, but I am not sure if the code uses it.
Please, check latest git version. RandIP and RandString work now.
from kamene.
My code started working just fine :-) For other uses, yes, it's tricky to find out. E.g. Automaton looks like it could be a candidate:
{'BEGIN': <function ATMT.state.<locals>.deco.<locals>.state_wrapper at 0x7f4bcaf2b158>, 'END': <function ATMT.state.<locals>.deco.<locals>.state_wrapper at 0x7f4bcaf2b378>}
<session[HelloWorld]: TCP:0 UDP:0 ICMP:0 Other:0>
vs. the previous
{'BEGIN': <function BEGIN_wrapper at 0x7f48efeaa848>, 'END': <function END_wrapper at 0x7f48efeaaa28>}
[]
(printing "states" and "packets" from the HelloWorld example at https://bitbucket.org/secdev/scapy/wiki/doc/Automata ).
X509Cert() ! (or probably the ASN1 stuff within).
Actually, a nice test seems to be:
from scapy.all import *
s = dir()
import inspect
import sys
for f in s:
o = getattr(sys.modules[__name__], f)
if inspect.isclass(o):
try:
o()
except TypeError:
pass
except Exception as e:
print ((f, e))
which probably finds problems unrelated to this bug as well :-)
from kamene.
Please, check X509Cert. It should be working now.
I will have a look at Automaton later.
from kamene.
Seems to work. https://github.com/ppietikainen/scapy has some random fixes-in-progress/testing you may want to check out, will test a bit before sending a proper pull request but feel free to merge.
Left to figure out (maybe not problems :-)):
('DHCPv6_am', TypeError('ord() expected string of length 1, but int found',))
('MetaVolatile', TypeError('type() takes 1 or 3 arguments',))
('RandDHCPOptions', AttributeError("'dict_values' object has no attribute 'remove'",))
('TermSink', FileNotFoundError(2, "No such file or directory: 'xterm'"))
from kamene.
I checked Automaton. It is not the same story. It was not about getattr, but assigning __name__
for wrapped functions. I fixed it by changing assignment to __qualname__
, but it still looks differently than on python 2.x because of differences in built-in __repr__
for functions. It adds module name in front of the function name, but I am fine with that and don't see necessity for change.
At least all regression tests work, so I assume no big issues there. I, also, fixed graph for automaton.
I looked at your changes, and all of them seem fine. If you are going to create a pull request I will wait for that.
Now I am going to check the list of 4 in your last comment.
from kamene.
- DHCPv6_am - fixed ord issue
- MetaVolatile - is supposed to be private, so I renamed it to _MetaVolatile; in any case it takes as it says 1 or 3 arguments as a descendant of type
- RandDHCPOptions - fixed
- TermSink - you need to have xterm installed on path. Command name is hardwired into code. Could be made into configurable value if needed, but did not do that yet.
Thanks for identifying issues!
from kamene.
Closing this for now, as specific identified issues have been fixed
from kamene.
Related Issues (20)
- converting a TCP packet with SAckOK option to a byte sequence fails
- SMTP connection problems
- how to set IP packet "options"?
- I encounter an error when I use the scapy-python3 in PyCharm(Windows) HOT 3
- ValueError: Unknown network interface 'wifi' on windows 10
- release 0.24 renamed module to scapy3k HOT 5
- Exception is thrown on sprintf("%TCP.flags%") with NS flag set HOT 2
- AttributeError: module 'pyx' has no attribute 'canvas' HOT 2
- DNS packet print() error HOT 3
- support for read and write pcapng will be added? HOT 3
- help required HOT 2
- compatibility with Anaconda HOT 18
- installation related help HOT 2
- help required HOT 7
- traceroute and mtr fail with NoneType' object has no attribute 'route'
- AttributeError 'NoneType' object has no attribute 'encode'
- kamene.bat will fail when the path including spaces
- WARNING: No IPv4 address found on en0 ! with MacOS HOT 1
- HTTP Layer HOT 1
- DNS - rdata field full payload not delivered 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 kamene.