TCPDUMP

dynamically modify HTTP POST data

谁说我不能喝 提交于 2019-12-24 04:18:08
问题 I set up a squid proxy server, and I would like to monitor and modify certain HTTP POST requests before it goes out of squid. What are my options? 回答1: Take a look at the Squid page on Content Adaptation to find what you're looking for. Those are valid options, although the only really good one is new in Squid 3. Another option, and what I use personally for this, is to transparently redirect the request to a script which modifies it and then forwards the changed version to the original

tcpdump抓包分析具体解释

孤街浪徒 提交于 2019-12-24 03:35:43
說實在的,對於 tcpdump 這個軟體來說,你甚至能够說這個軟體其實就是個駭客軟體, 因為他不但能够分析封包的流向,連封包的內容也能够進行『監聽』, 假设你使用的傳輸資料是明碼的話,不得了,在 router 上面就可能被人家監聽走了! 非常可怕吶!所以,我們也要來瞭解一下這個軟體啊!(註:這個 tcpdump 必須使用 root 的身份執行) [root@linux ~]# tcpdump [-nn] [-i 介面] [-w 儲存檔名] [-c 次數] [-Ae] [-qX] [-r 檔案] [所欲擷取的資料內容] 参數: -nn:直接以 IP 及 port number 顯示,而非主機名與服務名稱 -i :後面接要『監聽』的網路介面,比如 eth0, lo, ppp0 等等的介面; -w :假设你要將監聽所得的封包資料儲存下來,用這個参數就對了!後面接檔名 -c :監聽的封包數,假设沒有這個参數, tcpdump 會持續不斷的監聽, 直到使用者輸入 [ctrl]-c 為止。 -A :封包的內容以 ASCII 顯示,通经常使用來捉取 WWW 的網頁封包資料。 -e :使用資料連接層 (OSI 第二層) 的 MAC 封包資料來顯示; -q :僅列出較為簡短的封包資訊,每一行的內容比较精簡 -X :能够列出十六進位 (hex) 以及 ASCII 的封包內容,對於監聽封包內容非常实用

tcpdump抓包分析具体解释

南笙酒味 提交于 2019-12-24 03:35:22
說實在的,對於 tcpdump 這個軟體來說,你甚至能够說這個軟體其實就是個駭客軟體, 因為他不但能够分析封包的流向,連封包的內容也能够進行『監聽』, 假设你使用的傳輸資料是明碼的話,不得了,在 router 上面就可能被人家監聽走了! 非常可怕吶!所以,我們也要來瞭解一下這個軟體啊!(註:這個 tcpdump 必須使用 root 的身份執行) [root@linux ~]# tcpdump [-nn] [-i 介面] [-w 儲存檔名] [-c 次數] [-Ae] [-qX] [-r 檔案] [所欲擷取的資料內容] 参數: -nn:直接以 IP 及 port number 顯示,而非主機名與服務名稱 -i :後面接要『監聽』的網路介面,比如 eth0, lo, ppp0 等等的介面; -w :假设你要將監聽所得的封包資料儲存下來,用這個参數就對了!後面接檔名 -c :監聽的封包數,假设沒有這個参數, tcpdump 會持續不斷的監聽, 直到使用者輸入 [ctrl]-c 為止。 -A :封包的內容以 ASCII 顯示,通经常使用來捉取 WWW 的網頁封包資料。 -e :使用資料連接層 (OSI 第二層) 的 MAC 封包資料來顯示; -q :僅列出較為簡短的封包資訊,每一行的內容比较精簡 -X :能够列出十六進位 (hex) 以及 ASCII 的封包內容,對於監聽封包內容非常实用

tcpdump抓包分析具体解释

柔情痞子 提交于 2019-12-24 03:34:24
說實在的,對於 tcpdump 這個軟體來說,你甚至能够說這個軟體其實就是個駭客軟體, 因為他不但能够分析封包的流向,連封包的內容也能够進行『監聽』, 假设你使用的傳輸資料是明碼的話,不得了,在 router 上面就可能被人家監聽走了! 非常可怕吶!所以,我們也要來瞭解一下這個軟體啊!(註:這個 tcpdump 必須使用 root 的身份執行) [root@linux ~]# tcpdump [-nn] [-i 介面] [-w 儲存檔名] [-c 次數] [-Ae] [-qX] [-r 檔案] [所欲擷取的資料內容] 参數: -nn:直接以 IP 及 port number 顯示,而非主機名與服務名稱 -i :後面接要『監聽』的網路介面,比如 eth0, lo, ppp0 等等的介面; -w :假设你要將監聽所得的封包資料儲存下來,用這個参數就對了!後面接檔名 -c :監聽的封包數,假设沒有這個参數, tcpdump 會持續不斷的監聽, 直到使用者輸入 [ctrl]-c 為止。 -A :封包的內容以 ASCII 顯示,通经常使用來捉取 WWW 的網頁封包資料。 -e :使用資料連接層 (OSI 第二層) 的 MAC 封包資料來顯示; -q :僅列出較為簡短的封包資訊,每一行的內容比较精簡 -X :能够列出十六進位 (hex) 以及 ASCII 的封包內容,對於監聽封包內容非常实用

tcpdump抓包分析具体解释

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:33:31
說實在的,對於 tcpdump 這個軟體來說,你甚至能够說這個軟體其實就是個駭客軟體, 因為他不但能够分析封包的流向,連封包的內容也能够進行『監聽』, 假设你使用的傳輸資料是明碼的話,不得了,在 router 上面就可能被人家監聽走了! 非常可怕吶!所以,我們也要來瞭解一下這個軟體啊!(註:這個 tcpdump 必須使用 root 的身份執行) [root@linux ~]# tcpdump [-nn] [-i 介面] [-w 儲存檔名] [-c 次數] [-Ae] [-qX] [-r 檔案] [所欲擷取的資料內容] 参數: -nn:直接以 IP 及 port number 顯示,而非主機名與服務名稱 -i :後面接要『監聽』的網路介面,比如 eth0, lo, ppp0 等等的介面; -w :假设你要將監聽所得的封包資料儲存下來,用這個参數就對了!後面接檔名 -c :監聽的封包數,假设沒有這個参數, tcpdump 會持續不斷的監聽, 直到使用者輸入 [ctrl]-c 為止。 -A :封包的內容以 ASCII 顯示,通经常使用來捉取 WWW 的網頁封包資料。 -e :使用資料連接層 (OSI 第二層) 的 MAC 封包資料來顯示; -q :僅列出較為簡短的封包資訊,每一行的內容比较精簡 -X :能够列出十六進位 (hex) 以及 ASCII 的封包內容,對於監聽封包內容非常实用

Getting stdout from a tcpdump subprocess after terminating it

ⅰ亾dé卋堺 提交于 2019-12-23 08:05:59
问题 I am running tcpdump in a subprocess like this: pcap_process = subprocess.Popen(['tcpdump', '-s 0', '-w -', 'tcp'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) The -w - argument is important: it tells tcpdump to print the resulting .pcap file to stdout . I then go on to access a website using urllib.open() . After this is done, I would like to kill tcpdump and put whatever it printed into a string. I have tried the following: pcap_process.terminate() result = pcap_process.stdout.read() #

Getting stdout from a tcpdump subprocess after terminating it

做~自己de王妃 提交于 2019-12-23 08:05:29
问题 I am running tcpdump in a subprocess like this: pcap_process = subprocess.Popen(['tcpdump', '-s 0', '-w -', 'tcp'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) The -w - argument is important: it tells tcpdump to print the resulting .pcap file to stdout . I then go on to access a website using urllib.open() . After this is done, I would like to kill tcpdump and put whatever it printed into a string. I have tried the following: pcap_process.terminate() result = pcap_process.stdout.read() #

how to save a new file when tcpdum file size reaches 10Mb

跟風遠走 提交于 2019-12-23 07:48:25
问题 I want to capture my network traffic with using tcpdump and if captured packet rise is 10mb i want to make another file.how can i schedule this with tcpdump. please be kind enough to help me. thank you. 回答1: tcpdump -W 5 -C 10 -w capfile What the above command does is create a rotating buffer of 5 files (-W 5) and tcpdump switches to another file once the current file reaches 10,000,000 bytes, about 10MB (-C works in units of 1,000,000 bytes, so -C 10 = 10,000,000 bytes). The prefix of the

how to save a new file when tcpdum file size reaches 10Mb

荒凉一梦 提交于 2019-12-23 07:48:15
问题 I want to capture my network traffic with using tcpdump and if captured packet rise is 10mb i want to make another file.how can i schedule this with tcpdump. please be kind enough to help me. thank you. 回答1: tcpdump -W 5 -C 10 -w capfile What the above command does is create a rotating buffer of 5 files (-W 5) and tcpdump switches to another file once the current file reaches 10,000,000 bytes, about 10MB (-C works in units of 1,000,000 bytes, so -C 10 = 10,000,000 bytes). The prefix of the

Write tcpdump output to compressed / gziped file

早过忘川 提交于 2019-12-23 02:25:15
问题 I want to write the textual output of tcpdump to a compressed file. First I tried the most obvious: # tcpdump -l -i eth0 | gzip -c > test.gz tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C63 packets captured 244 packets received by filter 0 packets dropped by kernel 4 packets dropped by interface # file test.gz test.gz: empty # Then I found the following solution for Debian 9 (Stretch) : #