Simple I.P Logger in Python

Satyam Kanojiya[547y4m]
InfoSec Write-ups
Published in
2 min readOct 17, 2020

--

Here I will be briefing, how I created my first python tool for grabbing I.P address(IPv4) and detecting OS (Operating System) of user present on same network.

#Only for educational purpose don’t perform any malicious action on the network which you did not own. Strict actions could be taken!

Hola Pal’s

Tested on Python3

Getting Started

It’s a simple python script comprises various python libraries which I made for college project you can check it out on my GitHub profile. Follow & feel free to add other features. P.S still n00b 😆

Source code

#NOTE - It only works for internal i.p address connected on LAN not public i.p address.

1. It inputs a IPv4 address for listening.

2. Then it opens a port for receiving incoming requests on the same IP which acts like a server and logs the i.p address of the visitor.

3. And performs a scan to detect OS for logged i.p and it is recursive can log mutilple ip’s at same time.

4. After step-1 our program begin to listen on given i.p address, if you want to know the i.p of any device or user in LAN just send this i.p to them & upon clicking or visting it, their i.p will be logged and expected OS will be printed.

Now you know the i.p address, operating system of that particular guy or user on the network. Congrats 🎉

In Action…

Sample case:

LAB Setup(for experiment purpose) — Laptop running Kali Linux on Vbox, host OS Win-10 both connected using bridge mode with my mobile hotspot(Android).

Android is my cell & Windows is my host OS

Do clap, share and follow for more.

Till then stay learning 💻.

Connect with me on :-)

GitHub

LinkedIn

--

--