How To Make Own IP Tracker In Python – Only 16 Line Of Codes
Today’s post is very interesting for those people who want to create something using the programming languages this is a very simple program using this you can easily make your own IP tracker. Do not be scared in this post we will discuss everything if you don’t know anything about programming then easily you can understand.
What is IP tracker
IP Tracker also is known as IP Tracer will show you not only what is your Internet Protocol Address but will give you also information about IP location of your IP address and other related information to your IP.
I’m sure most of you know this already, but for those that don’t, each network that is connected to the Internet is given one public IP address (this is due to the implication of NAT). This means that each user on the Internet has a unique address that doesn’t belong to anyone else. This address is what allows us to communicate and access resources on the Internet, such as this very site!
Procedure:
this technique is for windows platform only if you are using MAC os or Linux based platforms then do stay with us we will cover it for those platforms.
Step 1 :
Because this programming is based on python so you can download python any version for this program we use python 2.7 version for this program Python download
Step 2:
After download Python, you have set the python environment variable manually for doing this follow these steps
Right click on my pc > Advanced system settings > for next check image
Add new path > syntax is
- c:\Python27\
- c:\Python27\scripts
now you are totally ready to run any programming in Python.
Step 3:
Now open Python Idle ( Python GUI ) open new file and start your coding for creating your own IP tracker
import os import urllib2 import jsonwhile True: ip=raw_input (“what is your target ip:”) url = “http://ip-api.com/json/” response = urllib2.urlopen (url +ip) data = response.read() values = json.loads(data)print(“IP:” + values [‘query’]) print(“City:” + values [‘city’]) print(“ISP:” + values [‘isp’]) print(“Country:” + values [‘country’]) print(“Region:” + values [‘region’]) print(“Time Zoen:” + values [‘timezone’]) break |
Step 4:
From here is our main code start don’t worry we put a text file of code you can direct this code do copy paste and save this file at a decent place where is too easy to find for you and save this file into python files (Py extension )
for this programme we have to use API module for that we use { http://ip-api.com/json } API to get this API use this to link to find Download API > API Documentation > for this programme we use JSON API If you do not use Sytax {query} don’t worry {query}
can be an IP address or a domain, or none to use the current IP address.
Step 5:
your code is fully ready to world do run your code
Step 6:
this window will be popping out and put your IP address to track
Step 7:
and after putting IP address this will be looking like this window and it shows you some basic about your IP address and you done.
See More: FireDL Codes 2019 Latest List
You Can Also Open This File Into The Command Prompt or Power Shell Programme
- you just simply copy this python file and,
- open the python path which you create on your c drive.
- and paste that file on this path.
- press right click and open in power shell.
- now you have to execute the code
- use python.exe .\iptract.py( your save name with extension).
- now it will ask for IP address put your IP address then press enter.
- and now it shows IP details.
This is just a small coding although you can implement more function to work more.