Comments (6)
Yup.. that was my intention as well.
Probably the best thing would be testing the library against a collection of:
- hand-crafted capure files, following the spec
- output capture files from different capture conditions (eg. capture from different interfaces / resumes from machines with different endianness / ...)
- ouput capture files from different implementations of the "writer" library, especially in case we should find any possible inconsistency amongst implementations, etc..
My idea was to create a separate repository with those test files (to avoid cluttering the main repo) and then pull the files in the testing environment (eg. using an env variable to reference the path of the local copy).
Contributions are very welcome ;)
from python-pcapng.
An issue is that the files I've added for testing cannot be open by wireshark, does anyone can check that ?
from python-pcapng.
Strange, but I'm not that surprised: it looks there might be some problems with determining endianness (that's one thing I don't like in the standard, btw.. they should have just used "network standard" endianness, i.e. big endian, instead of allowing mixing..):
The capture file appears to be damaged or corrupt.
(pcapng_read_block: total block lengths (first 139 and second 4077998952) don't match)
and maybe even incomplete support for the various "packet" (binary packed data, not actually packets) types.
For what I see, most libraries / tools tend to have their own implementation quirks, that's one reason why I started writing a library from scratch, instead of just wrapping a C library..
from python-pcapng.
While writing tests I found out that test006 incorrectly reports block size to be 1 byte shorter (and not aligned on a 32bit boundary). I'm not sure whether a library is expected to fail in that case, or try fixing the size (thus returning block payload aligned correctly, but possibly with extra data..)
from python-pcapng.
@kartoch do you have any follow-up on this? did you find any other interesting pcapng file to test against?
otherwise, I'm going to close this
from python-pcapng.
@rshk you can close it, no news on my side.
from python-pcapng.
Related Issues (20)
- Small fix for python3 HOT 3
- use pip install python-pcapng has ValueError HOT 3
- files generated by text2pacp not suported HOT 1
- write support for pcapng files would be helpful HOT 10
- "follow" a growing file HOT 3
- How to parse beacon packet HOT 2
- README example fails HOT 1
- UnicodeEncodeError: 'decimal' codec can't encode character u'\x00' in position 2: invalid decimal Unicode string
- Support for write pcapng will be added? HOT 2
- Timestamp accuracy
- Interest In Type Annotations HOT 3
- Packet SRC and DST information is mixed up (in dump_tcpip_stats.py)
- Python3.9 incompatibility HOT 2
- Update PyPI package - pcapng write HOT 2
- Cross-endian pcapng writing is incorrect
- FileScanner does not work with pipes
- Restore CI HOT 1
- Support for skipping a section in FileScanner HOT 2
- TypeError: '>' not supported between instances of 'Strictness' and 'Strictness'
- get wrong HOT 2
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-pcapng.