Questions tagged [libnet]

Libnet is a generic networking API that provides access to some protocols.

Libnet is a generic networking API that provides access to some protocols.

Homepage: http://libnet.sourceforge.net/

61 questions
1
vote
2 answers

error: ‘LIBNET_ERR_FATAL’ with libnet

I write a demo with libnet, but get an error when call the function: libnet_error(LIBNET_ERR_FATAL, "libnet_open_link_interface: %s\n", errbuf); The error is "error: ‘LIBNET_ERR_FATAL’ undeclared (first use in this function)". my gcc command is:…
why
  • 23,923
  • 29
  • 97
  • 142
1
vote
1 answer

Pylibnet installation error ubuntu 14

I've been looking in the internet for a solution of this issue when i try to install pylibnet , i would like to know if you guys were be able to install pylibnet succesfully and how. Thanks root@root:/home/core2# pip install…
1
vote
2 answers

Is it possible to write a packet, read by libpcap, with libnet? in c?

I'm trying to get libpcap to read a pcap file, get the user to select a packet and write that packet using libnet, in c. I got the reading from file part done. Libpcap puts that packet into a const unsigned char. I have worked with libnet before,…
Gibberfish
  • 13
  • 4
1
vote
1 answer

python module for libnet in Opensuse

I have tried to run an Python program in my Opensuse OS this Program used libnet and pcap. import queue import sys import socket import libnet from libnet.constants import * import pcap I have installed libnet-devel but when i run the program i…
MSK
  • 159
  • 1
  • 2
  • 7
1
vote
3 answers

libnet creates UDP packets with invalid checksums

I'm using pylibnet to construct and send UDP packets. The UDP packets I construct in this way all seem to have invalid checksums. Example: # python Python 2.4.3 (#1, Sep 3 2009, 15:37:12) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type…
Mox
  • 571
  • 5
  • 14
1
vote
0 answers

Build a tcp packet with libnet get incorrect tcp flags and window size

I followed the synflood.c in "Hacking: the art of exploitation", which build a tcp packet with libnet_build_tcp. if (libnet_build_tcp( libnet_get_prand(LIBNET_PRu16), dest_port, libnet_get_prand(LIBNET_PRu32), …
reverland
  • 21
  • 3
1
vote
1 answer

How to install the libnetfilter?

I ran the following command sudo rpm -Uvh http://rules.emergingthreatspro.com/projects/emergingrepo/x86_64/libnetfilter_queue-devel-0.0.15-1.x86_64.rpm Then i got the following result Retrieving…
user2087340
  • 98
  • 1
  • 7
1
vote
1 answer

How to use libnet with cmake (and kdevelop)?

I am afraid the question I have might be stupid, but as I am new to kdevelop and cmake it is quite hard for me to understand how they work. The project I tried to set up uses the libnet 1.1 library. My Question is how do I get cmake to compile and…
Zandorath
  • 13
  • 4
1
vote
1 answer

create arp packet in C with libnet

I'd like to know how to send a frame once I've created it. I've got the next: int arp_send(libnet_t *l, int op, u_char *sha, in_addr_t spa, u_char *tha, in_addr_t tpa) { libnet_ptag_t t; if (sha == NULL && (sha = (u_char…
franmf
  • 31
  • 4
1
vote
2 answers

Libnet11 build IPv6 packet manually

I am trying to use Libnet11 function: int libnet_write_raw_ipv6 (libnet_t *l, u_int8_t *packet, u_int32_t size) to inject IPv6 packet on network layer. I had created IPv6 packet and captured it with Wireshark. Wireshark reported: malformed…
1
vote
1 answer

Is there a maintained alternative for libnids?

As libnids seems to be two years old and there are no current updates, do some one know any alternative solution for libnids or better library than it, as it seems to drop packets in higher speeds more than 1G/per sec And more over it has no support…
forum.test17
  • 2,119
  • 6
  • 30
  • 62
1
vote
1 answer

Libnet vs Raw Sockets for packet injection

I need the opinion/advice of more experienced network programmers about some stuff regarding to packets injection on GNU/Linux systems. I'm working on a open source C++ library for packet injection and sniffing. The library is libcrafter. On the…
0
votes
1 answer

How to get interface's ipv6 address using libnet?

I saw an example code that get the mac and ipv4 address of an interface. I changed it a bit trying to get the ipv6 address of that interface but the program fail saying "27:13: error: incompatible types when assigning to type ‘u_int32_t’ from type…
Allan Ruin
  • 5,229
  • 7
  • 37
  • 42
0
votes
1 answer

How to modify and resend packet in network

I'm doing an exercise ARP sniffing. I want to simulate a attack like Man in The Middle. I had been sending arp to change way packet to Attacker PC. But I don't know How to forwarding this packet I receive from A to B. How I do it? Can I do it with…
0
votes
1 answer

How to get pylibnet installed on a Mac

In example.py file I have: import libnet but when I execute it via: /opt/local/bin/python2.5 example.py I'm getting "ImportError: No module named libnet" How I tried to install it: went to http://pylibnet.sourceforge.net/ and downloaded it read…
kadrian
  • 4,761
  • 8
  • 39
  • 61