Comments (5)
One thing you might want to try is setting the layer-2 decoder from the command line (Dshell defaults to ethernet.Ethernet). For example, you can try something along the lines of:
decode -d <your decoder> --layer2=ppp.PPP <your pcap>
That --layer2 argument works by setting the first dpkt module to use when decoding a raw packet. In that example, we're telling it to use the PPP class in the ppp (Point-to-Point Protocol) module.
I looked briefly at the dpkt source code for ppp.py, however, and noticed an unsettling # XXX - finish later
in there, so I can't guarantee everything will work as planned.
I've never, personally, worked with that protocol before, so I don't have any pcap to test my recommendation out. Is there any possibility for you to share the pcap you're using? I understand if that's impossible, but it would help us figure out a solution if the problem persists.
Let us know if that doesn't help, and we can dig further to figure something out for you.
from dshell.
Here is an sample pcap with pppoe layer.
sample.cap.zip
I've tried the --layer2=ppp.PPP
with no success.
from dshell.
The --strip=n option is designed to remove extra Layer 2 headers before the IP header. In the case of PPPoE we have Ethernet( PPPoE( PPP( IP(...) ) ) ). Dshell's IP decoder expects Layer2( IP(...) ) so we need to remove 2 layers with --strip=2
The other gotcha is the default BPF filter for the DNS decoder is (udp and port 53)
. This won't work with PPPoE encapsulated traffic, so you need to disable the filter with --bpf=''
Dshell> decode -d dns --strip=2 --bpf='' ~/sample.cap.zip
Enter password for .zip file [default:none]:
dns 2016-04-01 04:18:13 8.8.8.8:53 -- 192.168.42.72:53268 ** 49176 A? fpdownload.macromedia.com / CNAME: san-download.adobe.com.edgekey.net, CNAME: e4937.d.akamaiedge.net, A: 104.82.135.83 (ttl 19s) **
from dshell.
Thanks for that, strangely I get different output using the same capture file, see below:
~/Dshell Dshell> decode -d dns --strip=2 --bpf='' sample.cap WARNING:dns:local variable 'smac' referenced before assignment WARNING:dns:local variable 'smac' referenced before assignment
from dshell.
1744f7a fixes that. Grab the latest master branch.
from dshell.
Related Issues (20)
- Captureing network traffic and MaxMind GeoLite databases HOT 12
- Deprecation warning running decode HOT 1
- VLAN Wrapper Not Applied to Pcapy Reader HOT 2
- Multiprocessing AttributeError bug
- No results running live capture's plugins on interfaces HOT 7
- Blob handling HOT 4
- module 'distutils.sysconfig' has no attribute '_init_posix' HOT 1
- question/concern with followstream decoder HOT 2
- When I run the capture in interface mode (i.e. -i) I dont get output untill i CTRL+C HOT 3
- Bug in large-flows.py decoder HOT 2
- How to compile and run on MAC OSX HOT 5
- Fedora 21 runtime error HOT 2
- Rip-http decoder crashing
- Dshell Install Error in Arch Linux HOT 2
- https://github.com/kbandla/dpkt HOT 2
- Gentoo PRE-ALPHA Ebuild HOT 3
- setup.py, Python Distutils HOT 4
- Why the software history was not kept? HOT 3
- Error in decoders nbns and reseserverips HOT 3
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 dshell.