By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,661 Members | 791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,661 IT Pros & Developers. It's quick & easy.

DPKT error

P: 4
Hi guys
I ran dpkt/pcap.py and I got this error.Could anyone tell
me what is this error?


Traceback (most recent call last):
File "pcap.py", line 44, in <module>
resip =( dstip/srcip)*100
ZeroDivisionError: division by zero
Mar 15 '16 #1
Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,364
The error message is pretty clear. You can't divide by 0. That means srcip is equal to 0.
Mar 15 '16 #2

P: 4
@Rabbit:I put the source IP.It is not equal to zero.
Mar 15 '16 #3

Rabbit
Expert Mod 10K+
P: 12,364
Did you double check that? You didn't include any code where you set the srcip variable. That may have been your intention, but in your actual code, you may have incorrectly set that variable.
Mar 15 '16 #4

P: 4
@Rabbit
Could you tell me instead of zero what should I put?
Mar 16 '16 #5

Post your reply

Sign in to post your reply or Sign up for a free account.