I have been using the following on my Raspberry pi which basically captures data from a weather hub I have connected to a USB port on the PI.
sudo tcpdump -A -n -p -l -i eth1 -s0 -w - tcp dst port 80 |
stdbuf -oL strings -n8 |
./parser
The output buffer is read via a python script.
I want to move the whole process onto a windows (10) machine and so far I have the following working via CMD under Win10.
tcpdump -A -n -p -l -i eth1 -s0 -w - tcp dst port 80
The output however, is totally unreadable because I can not figure out the rest of the command under windows. Specifically
| stdbuf -oL strings -n8 |./parser
Any help with this would greatly be appreciated
I have tried this under PowerShell but I end up with the same garbled text
./tcpdump -A -n -p -l -i 5 | ForEach-Object {
[Console]::WriteLine($_)
[Console]::Out.Flush()
$_
} | Set-Content program.log
======================================
When I issue the following command RaspPi
sudo tcpdump -A -n -p -l -i eth1 -s0 -w - tcp dst port 80 | stdbuf -oL strings -n8
I will get the following output
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
GET /weatherstation/updateweatherstation?dateutc=now&action=updateraw&realtime=1
&id=24C86E010F25&mt=tower&sensor=00015666
&humidity=74&tempf=26.6
&baromin=30.39&battery=normal&rssi=4
HTTP/1.1
hubapi.myacurite.com
User-Agent: Hub/224
Connection: close
Cor Dikland is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3