skip to main |
skip to sidebar
portsweep.c loops through a file of IPs and checks whether a particular port is open:
dennis@ipa:~/projects/sockets/portsweep$ ./portsweep
portsweep [-l logfile] ipfile port1[,port2,...]
dennis@ipa:~/projects/sockets/portsweep$ ./portsweep ips 22,23,80,2049
192.168.1.1: 23 80
192.168.1.101:
127.0.0.1: 22 2049
location.c is a plain and simple gpsd client:
dennis@ipa:~/projects/sockets/location$ ./location
41.909431,XXX.XXXXXX
I've been working my way through Stevens' Unix Network Programming. One of my non-book exercises has been portscan.c:
dennis@ipa:~/projects/sockets/portscan$ ./portscan -l 127.0.0.1.log 127.0.0.1
Port scanning 127.0.0.1:
Port 13 is open.
Port 22 is open.
Port 25 is open.
Port 37 is open.
Here are my notes on getting the Garmin Geko 201 GPS handheld working with the OpenBSD gpsd port.
On the Geko 201:
1) Page to and select "Setup" option.
2) Select "Interface" option.
3) Set "I/O Format" to "NMEA"
4) Set "Baud" to "4800"
I'm using a serial to USB converter (unknown type) that looks like:
uftdi0 at uhub4 port 1 "FTDI FT232R USB UART" rev 2.00/6.00 addr 2
ucom0 at uftdi0 portno 1
The associated device file for this ucom(4) is/dev/ttyU0 which I provide to gpsd:
dennis@ipa:~$ sudo gpsd /dev/ttyU0
dennis@ipa:~$
Then I test everything with the cgps (no command line options) client.