Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:11:59+00:00 2026-06-03T21:11:59+00:00

I have this python code: import sys import dpkt f = file(pcaop.Pcap) pcap =

  • 0

I have this python code:

import sys
import dpkt

f = file("pcaop.Pcap")
pcap = dpkt.pcap.Reader(f)

i = 0
for ts, buf in pcap:
    print "Ya"

dpkt throws NeedData on the 52nd packet. The same one every time – I’ve checked packet 52 and it is the same as everyone else on wireshark.

What causes this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:12:01+00:00Added an answer on June 3, 2026 at 9:12 pm

    Solution is provided here: Python stops reading file using read
    I had the same problem when dpkt.pcap was working fine under Linux but failed instantly when run in Windows.
    The problem is that when a file is opened in text mode open("filename", "r") the file is read until EOF is encountered. Thus, open("filename", "rb")

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: #!/usr/local/bin/python """ USAGE: apache_logs.py """ import sys import os if
I have some python code that fails: import sys print (MathCheats Times-Ed by jtl999)
I have this code: #! /usr/bin/python import sys, string def findAll(search, fh): count =
I have this code in Python inputted = input(Enter in something: ) print(Input is
I have this code: def display(self): print self.doc.toprettyxml(indent= ) strigName ='/Users/my_user/Desktop/python/' + str(datetime.datetime.now()) +
I have some questions about the performance of this simple python script: import sys,
I have this code (hello.py): import os,sys import tornado.ioloop import tornado.web import tornado.httpserver #http
I have the code: import os import sys fileList = os.listdir(sys.argv[1]) for file in
I received this python script that generates a file checksum: import sys,os if __name__==__main__:
Here's my code: import sys, os print(█████) #<-- Those are solid blocks. f= open('file.txt')

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.