Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jboy4
  • Order by date
  1. jboy4

    PCAP reader to mysql

    No Annihilannic. It errors out with no directory/or file like i said above. I worked on it for a little and i got it outputting cannont read m2.pcap because its not a file.? Here what i changed it too. my $dir = 'C:\\Documents and Settings\\jordant\\Desktop\\Dump\\'; opendir(DIR...
  2. jboy4

    PCAP reader to mysql

    Alright so i tryed adding this into my code but for some reason i get an error. Here is the exact message: ERROR: Can't read log C:./Documents: No such file or directory. The directory does exist tho. I can even put back the exact path with it going to that directory to m1.pcap and it...
  3. jboy4

    PCAP reader to mysql

    Ive got it working properly now. But here is my final question. If i have it reading a log file like so: $log->read("C:\\Documents and Settings\\jordant\\Desktop\\Dump\\m1.pcap") How could i get it so it reads within the Dump folder but all files that are .pcap? i will run into problems...
  4. jboy4

    PCAP reader to mysql

    Is there another value other then localtime to be used? I added all the variables for local time and the $month comes back as 1-172 counting up by 1. because of $month = $month + 1; my year is insanley big 300,000. My time is just my current computer time. I need something to grab the times...
  5. jboy4

    PCAP reader to mysql

    Year is way off. sometimes gives the ecop 1969. Do you have a code to output time from the pcap when packets were taken? I went another path and getting wrong dates as well. use Time::HiRes qw(gettimeofday); @HiResTime = gettimeofday(); ($sec,$min,$hour,$day,$month,$year) =...
  6. jboy4

    PCAP reader to mysql

    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secs + $msecs/1000); Thats my time string but it seems to not work correctly. I get the right month and day. But year and Mins/Sec are off.
  7. jboy4

    PCAP reader to mysql

    2 things left to do on it. Show output from pcap of time when packets were used. Show output for Packets being used (in bytes)
  8. jboy4

    PCAP reader to mysql

    Ive got the Pcap reading out because i can use the print command to see it. But how would i get it into mysql? #Login to mysql $dbh = DBI->connect('DBI:mysql:test', 'root', 'password' ) || die "Could not connect to +database: $DBI::errstr"; #The Headers in Table $dbh->do("CREATE...
  9. jboy4

    PCAP reader to mysql

    Ok so i did some more research and found a cleaner code with more lables for easier identifcation. #!/usr/bin/perl use Net::TcpDumpLog; use NetPacket::Ethernet; use NetPacket::IP; use NetPacket::TCP; use strict; use warnings; my $log = Net::TcpDumpLog->new(); $log->read("/Dump/m1.pcap")...
  10. jboy4

    PCAP reader to mysql

    Hi i am just learning perl for a company project they want me to make a pcap reader that puts the information into mysql. I looked into what i would need and realized that tcpdumplog would be good for reading the pcap file but i am not sure where to go with the code to get it to save in record...

Part and Inventory Search

Back
Top