problem about pcap-Collection of common programming errors


  • Beaon
    ruby windows pcap
    This must be a relatively newb question but I am still stuck. I know there is a simple solution to this. I’ve done some googling but could not find an exact answer. Here is the error I get…C:\Ruby193\include\ruby-1.9.1\i386-mingw32>gem install pcap Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing pcap:ERROR: Failed to build gem native extension.C:/Ruby193/bin/ruby.exe extconf.rb checking for socket() in -lsocket

  • Nirav Zaveri
    ruby windows-7 pcap bundle-install msf
    C:\metasploit\apps\pro\msf3\tools>bundle install Fetching gem metadata from http://rubygems.org/……… Fetching gem metadata from http://rubygems.org/.. Resolving dependencies… Using rake (10.0.4) Using i18n (0.6.1) Using multi_json (1.0.4) Using activesupport (3.2.13) Using builder (3.0.4) Using activemodel (3.2.13) Using arel (3.0.2) Using tzinfo (0.3.37) Using activerecord (3.2.13) Using metaclass (0.0.1) Using mocha (0.13.3) Using bourne (1.4.0) Using database_cleaner (0.9.1) Using d

  • wuntee
    ruby gem rvm pcap
    I am having trouble installing the pcap gem with ruby 1.9.2… It works fine with 1.8.7. Anyone know whats going on?wuntee@wuntee:~$ rvm use system Now using system ruby. wuntee@wuntee:~$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] wuntee@wuntee:~$ gem install pcap WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and/usr/bin aren’t both writable. WARNING: You don’t have /Users/wuntee/.gem/ruby/1.8/bin in your PATH,gem executables will not run. Building nativ

  • bdash
    osx pcap kext
    This question already has an answer here:Linking Dylibs in Kexts?1 answerI am writing a kext driver for OS X and would like to use functions from the library libpcap.dylib. Libpcap.dylib lives in /usr/lib on OS X. Can it be used from kernel space? How can I use libpcap.dylib from a kext using Xcode?I manage to compile — (-lpcap apears as link option) but:got an warning on “unexpected dylib” by linker. It is clear that is misplaced somehow. kextload can’t resolve libpcap dependencies. kextlibs s

  • user2983443
    pcap winpcap sharppcap
    i have problems with pcapDevice.SetFilter. Even if device exist and its opened the C# application crashes. Even the try/catch does not prevent application crash.Sometimes the try/catch gets the error and application stays alive, but sometimes even try/catch does not get the error and the application crashes.Any idea how can i prevent this crash ?private List<PcapDevice> devices; private PcapDevice device; Packet packet = null;devices = SharpPcap.Pcap.GetAllDevices(); device = devices[0];

  • Peter Mortensen
    pcap
    I am trying to use the libpcap library in a C++ program.I have downloaded libpcap-1.0.0.tgz, untared it, and then./configer make make installI have libpcap.a and headers with me, and I have written one sample program to test it. But it is giving me compiler errors as follows:/usr/local/lib/libpcap.a(gencode.o): In function `.L151′: gencode.c:(.text+0x7f4): undefined reference to `pcap_parse’ collect2: ld returned 1 exit statusI am compiling this program using following command:g++ -o test test.c

  • Yevheniy
    c jni static-linking pcap cl.exe
    I write RTP sniffer and need to create dll to use it in my java project as native. I use cl.execl.exe -I”C:\Program Files\Java\jdk1.7.0_13\include” -I”C:\Program Files\Java\jdk1.7.0_13\include\win32″ -I “..\..\lib\WpdPack\Include” -I “..\..\lib\WpdPack\Include\bin” -I “..\..\lib\WpdPack\Lib\x64″ -D”WIN32″ -D”WPCAP” -D”HAVE_REMOTE” -LD “rtpnative.c” -Fe”rtpnative.dll” -link “..\..\lib\WpdPack\Lib\x64\wpcap.lib” “..\..\lib\WpdPack\Lib\x64\Packet.lib” but at the linking step I receive such er

  • Marko
    c++ pcap sniffing network-security
    I am developing for OSX 10.8. I just installed libpcap via MacPorts and tried running a simple device hunter (below)#include <stdio.h> #include <pcap.h>int main(int argc,char *argv[]) {char *dev, errbuf[PCAP_ERRBUF_SIZE];dev = pcap_lookupdev(errbuf);if(dev == NULL){fprintf(stderr, “Couldn’t find default device: %s\n”, errbuf);return(2);}printf(“Device %s\n”, dev);return(0); }and while trying to compile with g++ i am getting:Undefined symbols for architecture x86_64:”_pcap_lookupdev”

  • mghicks
    networking pcap
    Currently, I’m filtering Google’s 1e100.net domain from ntop with the filter:not (src net (74.125/16 or 173.194/16) or dst net (74.125/16 or 173.194/16))But I think something’s wrong, because too much traffic is missing, now.Do these IP address blocks correctly specify addresses 74.125.0.0 – 74.125.255.255 and 173.194.0.0 – 173.194.255.255? Is there any way to specify domains in ntop/pcap filters (which ntop’s man page says is BPF syntax), rather than the address blocks? My wild guess ofnot (sr

  • Quintin
    c pcap libpcap sniffer
    In the following code, could someone explain to me how the following works?/** sniffex.c** Sniffer example of TCP/IP packet capture using libpcap.* * Version 0.1.1 (2005-07-05)* Copyright (c) 2005 The Tcpdump Group** This software is intended to be used as a practical example and * demonstration of the libpcap library; available at:* http://www.tcpdump.org/******************************************************************************* This software is a modification of Tim Carstens’ “sniffer.c”*

  • wasp256
    pcap
    I installed the pcap library on my linux system but when including it I get the errors/usr/include/pcap/bpf.h:88:1: error: unknown type name ‘u_int’/usr/include/pcap/bpf.h:108:2: error: unknown type name ‘u_int’/usr/include/pcap/bpf.h:1260:2: error: unknown type name ‘u_short’/usr/include/pcap/bpf.h:1261:2: error: unknown type name ‘u_char’/usr/include/pcap/bpf.h:1262:2: error: unknown type name ‘u_char’In file included from ../src/test.c:1:0:/usr/include/pcap/pcap.h:125:2: error: unknown type n

Web site is in building

I discovery a place to host code、demo、 blog and websites.
Site access is fast but not money