TCP. UDP. Network
June 17, 2020 · View on GitHub
TCP. UDP. Network
- Internet 101
- Networking for Web Developers
- How DNS Works
- :vertical_traffic_light:Node.js:vertical_traffic_light:TCP client in Node.js:vertical_traffic_light:Node.js:vertical_traffic_light:
- :vertical_traffic_light:Python:vertical_traffic_light:TCP Communication:vertical_traffic_light:Python:vertical_traffic_light:
- :vertical_traffic_light:Golang:vertical_traffic_light:TCP client and server in Golang:vertical_traffic_light:Golang:vertical_traffic_light:
Finish the courses (1), and (2) and read article (3) above.
- Make screenshots of your finished lessons from (1), (2)
and put the screenshots in
task_networksfolder in yourkottans-backendrepo - In your
kottans-backendrepoREADME.md:- add header
## TCP. UDP. Network - embed the screenshots or add links to the screenshots
- list your reflections on all subtasks (what was new to you, what surprised you, what you intend to use in future)
- add header
- In your
task_networksfolder build a following program:
TCP Port Sniffer :nose:
Sniffer is CLI tool which allows user to easily search for opened TCP ports on particular host (using IP adderess or domain). Example of usage:
:vertical_traffic_light:Node.js:vertical_traffic_light:
node sniffer.js --ports 10-9999 --host 172.217.3.110
....
22,54,80,443 ports are opened
:vertical_traffic_light:Node.js:vertical_traffic_light:
:vertical_traffic_light:Golang:vertical_traffic_light:
go run sniffer.go --ports 10-9999 --host 172.217.3.110
....
22,54,80,443 ports are opened
:vertical_traffic_light:Golang:vertical_traffic_light:
:vertical_traffic_light:Python:vertical_traffic_light:
python sniffer.py --ports 10-9999 --host 172.217.3.110
....
22,54,80,443 ports are opened
:vertical_traffic_light:Python:vertical_traffic_light:
TCP Sniffer User Stories
- As the user, I can call sniffer from my shell with one required argument
--hostwhich can be either domain name, likegoogle.comor IP address like172.217.3.110. - After call program will start TCP ports scan, trying to dial each port from
0to65535. If dial is successful program will print dot.tostdoutand save found open port to buffer array. IMPORTANT: Each dial attempt should have300mstimeout. (If client fails to connect in300msport is skipped). - After scan is finished program will print the list of opened ports to
stdoutand exit with status code0. - As the user, I can limit the range of ports to scan by providing
--portsargument in format<start_port>-<end_port>, for instance:3-600. - As the user, I can get a descriptive error if required argument is missing or if some of them have incorrect format.
- As the user, I can provide
--helpflag to see hint about how to useTCP sniffer.
TCP Sniffer Submission
Save your program in a file. Follow instructions in this repo to submit your code.
- You did lot already! If you honestly finished all the previous steps then go ahead
and share it with others –
post a message in course channel:
TCP. UDP. Network — #done(orTCP. UDP. Network — #doneif you are p2p course student) and add the link to your repo. This step is important, as it helps mentors to track your progress! When complete do the following:
Extra materials
- Introduction to TCP/IP. Course
- What happens when you type google.com into your browser and press enter?
- Big list of TCP/UDP ports
- :vertical_traffic_light:Node.js:vertical_traffic_light:Module 'net' Node.js docs:vertical_traffic_light:Node.js:vertical_traffic_light:
- :vertical_traffic_light:Golang:vertical_traffic_light:Package 'net' Golang docs:vertical_traffic_light:Golang:vertical_traffic_light:
- :vertical_traffic_light:Python:vertical_traffic_light:TCP echo client in Python:vertical_traffic_light:Python:vertical_traffic_light:
Done?
➡️ Go forward to HTTP & HTTPs
⤴️ Back to Contents