packet

How to install packetfence in Docker Container

送分小仙女□ 提交于 2020-06-17 09:37:10
问题 I've tried installing packetfence using CentOS image and instructions provided on https://packetfence.org/doc/PacketFence_Installation_Guide.html#_rhel_centos_based_systems and many other tutorials but failing every time. even if its installed once I can't access it configurator on https://IP_Address:1443/configurator I face similar issue to the one discussed here but don't know how to proceed with solution provided here / https://sourceforge.net/p/packetfence/mailman/message/34072044/

How to read a packet TLS meta-data with scapy python

China☆狼群 提交于 2020-05-30 07:55:14
问题 How can I read TLS information (record length, record type...) from a packet using scapy. I have used load_layer('tls') and I'm able to read some information when there is a single TLS record in a packet but when there is multiple TLS record in a packet I'm only able to read the first TLS record. For exemple this packet contain 3 TLS record and when I want to read the records length with scapy I only get the first record length 回答1: Total TLS decoding As you've found, scapy doesn't decode the

BPF filter source address == transmission address

我只是一个虾纸丫 提交于 2020-03-04 05:13:23
问题 What is the correct BPF filter for only recieving packets where the source MAC address is equal to the transmission MAC address? Looking at the documentation, it seems like the fields should be available through either wlan[21:12] or wlan.addr2 but I'm unable to get those to work. 回答1: According to the pcap-filter manpage, capture filters for tshark or Wireshark don't support comparing packet fields against each other . You can, however, do that with the display filter (top bar in Wireshark,

Read raw IPv4 in promiscuous mode on Linux?

别等时光非礼了梦想. 提交于 2020-02-06 02:57:47
问题 I am trying to write an application to sniff traffic being sent to an ethernet port on my server. My application never needs to send data. It only needs to receive and decode the 5-tuple. I am opening the socket with: socket (AF_INET, SOCK_RAW, htons (ETH_P_ALL)) and setting it to promiscuous mode: struct ifreq ifr; ioctl (raw_socket, SIOCGIFFLAGS, &ifr); /* Set the old flags plus the IFF_PROMISC flag */ ifr.ifr_flags |= IFF_PROMISC; ioctl (raw_socket, SIOCSIFFLAGS, &ifr); I am using recv to

Scapy packet sent cannot be received

风流意气都作罢 提交于 2020-01-22 20:11:29
问题 I'm trying to send UDP Packets with scapy with the following command: >> send(IP(dst="127.0.0.1",src="111.111.111.111")/UDP(dport=5005)/"Hello") . Sent 1 packets. And from tcpdump I can see: 22:02:58.384730 IP 111.111.111.111.domain > localhost.5005: [|domain] I'm trying to receive this packet with the following code: import socket UDP_IP = "127.0.0.1" UDP_PORT = 5005 sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP sock.bind((UDP_IP, UDP_PORT)) while True: data, addr

C# Reading Byte Array

馋奶兔 提交于 2020-01-13 17:56:20
问题 Okay so I am building server <-> client application. Basically server receives a packet that contains header[2bytes], cryptokeys[2bytes],and data I was thinking about building class to load whole packet (byte[]) into it and then process the packet with inside class methods. Now to the question. What would be best approach to this? I need to be able to read Int16 Int32 String(int lenght) and probably float Edit: Kinda like binaryreader but for byte[] as an input 回答1: I would say BinaryReader

Converting a sniffed scapy packet to bytes

与世无争的帅哥 提交于 2020-01-06 02:54:11
问题 When sniffing packets with scapy I can save them to a variable sniffed = sniff(count=1) Now I would like to see what's inside the packet by doing print sniffed or print str(sniffed) but all this gives me is something like the following: ������0� E4h@@����������� l�� which isn't quite what I need. So how can I convert a sniffed packet into human readable Binary, or an array of Bytes or something more useful so that I can see what's inside? I have already tried using struct.unpack(format,

Sending packets to Minecraft server: Objective c

梦想的初衷 提交于 2020-01-04 06:38:10
问题 I've been trying to send packets to a minecraft server from my custom Cocoa application (written in objective-c of course). I am a little confused as how to do that though. I did it in Java. That was very easy. Doing this is objective-c though is proving to be a bit more challenging. This is the code that I am using: - (void)handshake { PacketHandshake *packet = [PacketHandshake packetString:[NSString stringWithFormat:@"%@;%@:%i", username, IP, PORT]]; [packet writeData:dataOut]; } Which

java server: start a new thread for each received packet?

倖福魔咒の 提交于 2020-01-04 03:38:05
问题 I am currently learning how to program a tcp server in java. I am creating a new thread for new each client connection (multithreaded server). After the client connects to the server, I want to send data from the client to the server. On serverside the server is in a while loop reading data from the sockets inputstream. I want to ask now: Should I create a new thread for each received packet? For example the client sends the string "Hello". Should the server handle this packet in a new thread