packet-capture

How can I edit a js file sent by the server before it gets to my browser?

*爱你&永不变心* 提交于 2019-12-06 11:07:41
During a normal browsing session I want to edit a specific javascript file before the browser receives since once it gets there it's impossible to edit. Is there are any tool for this? For what I need it I can't just save it and edit it on my disk. I'm ready to learn how to program it myself but if anyone can point out more or less what I have to do I'd be very grateful. I'd have to intercept the packets until I have the whole file while blocking the browser from receiving it any part of it, then edit it manually and forward it to the same port. I don't think I can do this by just using pcap,

writing a http sniffer

自古美人都是妖i 提交于 2019-12-06 09:55:30
问题 I would like to write a program to extract the URLs of websites visited by a system (an IP address) through packet capture.. I think this URL will come in the data section ( ie not in any of the headers - ethernet / ip / tcp-udp ).. ( Such programs are sometimes referred to as http sniffers , i'm not supposed to use any available tool ). As a beginner , I've just now gone through this basic sniffer program : sniffex.c.. Can anyone please tell me in which direction i should proceed.. 回答1: Note

Scapy and rdpcap function

↘锁芯ラ 提交于 2019-12-05 05:45:53
I'm using rdpcap function of Scapy to read a PCAP file. I also use the module described in a link to HTTP support in Scapy which is needed in my case, as I have to retrieve all the HTTP requests and responses and their related packets. I noticed that parsing a large PCAP file the rdpcap function takes too much time to read it. Is there a solution to read a pcap file faster? wonder Scapy has another method sniff which you can use to read the pcap files too: def method_filter_HTTP(pkt): #Your processing sniff(offline="your_file.pcap",prn=method_filter_HTTP,store=0) rdpcap loads the entire pcap

How can I determine which packet in Wireshark corresponds to what I sent via Postman?

只愿长相守 提交于 2019-12-05 03:33:51
I'm trying to figure out why REST calls sent from my handheld device (Windows CE / Compact Framework) are not making it to my server app (regular, full-fledged .NET app running on my PC). The handheld device and the PC are connected - I know that because I can see the handheld device in the PC's Windows Explorer, Windows Mobile Device Center verifies the connection between the two is valid, etc. I reach the breakpoint on my server app running on my PC when I pass the same REST call via Postman, namely: http://192.168.125.50:21609/api/inventory/sendXML/duckbill/platypus/poisontoe ...but not

How to properly keep the UI updated while transferring packets in C#?

删除回忆录丶 提交于 2019-12-04 18:06:28
I have this form that spawns a new thread and starts listening and waiting for UDP packets in a loop. What I need is to keep the UI updated with the number of bytes received. For that, I have setup an event which I'll raise as soon as a packet is received and pass the number of bytes received as an argument. Since I'm not running on the UI thread, I cannot simply update the UI directly. Here's what I'm currently doing: private void EVENTHANDLER_UpdateTransferProgress(long receivedBytes) { if(InvokeRequired) { Invoke(new MethodInvoker(() => { totalReceivedBytes += receivedBytes; Label.Text =

writing a http sniffer

无人久伴 提交于 2019-12-04 17:27:40
I would like to write a program to extract the URLs of websites visited by a system (an IP address) through packet capture.. I think this URL will come in the data section ( ie not in any of the headers - ethernet / ip / tcp-udp ).. ( Such programs are sometimes referred to as http sniffers , i'm not supposed to use any available tool ). As a beginner , I've just now gone through this basic sniffer program : sniffex.c .. Can anyone please tell me in which direction i should proceed.. Note: In the info below, assume that GET also includes POST and the other HTTP methods too. It's definitely

Adding payload in packet

青春壹個敷衍的年華 提交于 2019-12-04 02:38:09
Can I insert image or document (in MBs) as a data in packet using scapy? This is what I did to send data. data = "University of texas at San Antonio" a = IP(dst="129.132.2.21")/TCP()/data send(a) Yes, you can send raw data like this. In this example, data will be ASCII encoded. >>> data = 'University of Texas at San Antonio' >>> a = IP(dst='129.132.2.21') / TCP() / Raw(load=data) >>> sendp(a) 来源: https://stackoverflow.com/questions/6605118/adding-payload-in-packet

How to filter wireshark to see only dns queries that are sent/received from/by my computer?

断了今生、忘了曾经 提交于 2019-12-03 15:34:00
问题 I am new to wireshark and trying to write simple queries. To see the dns queries that are only sent from my computer or received by my computer, i tried the following: dns and ip.addr==159.25.78.7 where 159.25.78.7 is my ip address. It looks like i did it when i look at the filter results but i wanted to be sure about that. Does that filter really do what i am trying to find out? I doubted a little bit because in the filter results i also see only 1 other result whose protocol is ICMP and its

How to filter wireshark to see only dns queries that are sent/received from/by my computer?

你说的曾经没有我的故事 提交于 2019-12-03 10:16:50
I am new to wireshark and trying to write simple queries. To see the dns queries that are only sent from my computer or received by my computer, i tried the following: dns and ip.addr==159.25.78.7 where 159.25.78.7 is my ip address. It looks like i did it when i look at the filter results but i wanted to be sure about that. Does that filter really do what i am trying to find out? I doubted a little bit because in the filter results i also see only 1 other result whose protocol is ICMP and its info says "Destination unreachable (Port unreachable)". Can anyone help me with this? Thanks I would

Python raw socket listening for UDP packets; only half of the packets received

主宰稳场 提交于 2019-12-03 09:53:43
问题 I am trying to create a raw socket in Python that listens for UDP packets only: import socket s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_UDP) s.bind(('0.0.0.0', 1337)) while True: print s.recvfrom(65535) This needs to be run as root, and creates a raw socket on port 1337, which listens for UDP packets and prints them whenever they are received; no problems there. Now let's make a little client to test if this works: import socket c = socket.socket(socket.AF_INET, socket