DPKT error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sara25
    New Member
    • Mar 2016
    • 4

    DPKT error

    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
    ZeroDivisionErr or: division by zero
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The error message is pretty clear. You can't divide by 0. That means srcip is equal to 0.

    Comment

    • sara25
      New Member
      • Mar 2016
      • 4

      #3
      @Rabbit:I put the source IP.It is not equal to zero.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        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.

        Comment

        • sara25
          New Member
          • Mar 2016
          • 4

          #5
          @Rabbit
          Could you tell me instead of zero what should I put?

          Comment

          Working...