Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python get ip info

import requests

# get your current public ip's info:
req = requests.get('https://utilities.tk/network/info')

# or specify an ip to check
req = requests.get('https://utilities.tk/network/info?ip=1.1.1.1')

print(req.status_code)
print(req.json())
Comment

get ip python

import re

f = open('C:/Users/Admin/Downloads/iplogs.txt', 'r') #Text file with many ip address
o = f.read()
ip1 = re.findall( r"d{1,3}.d{1,3}.d{1,3}.d{1,3}", o )
hosts = ip1
for host in hosts:
                    print(host)
Comment

PREVIOUS NEXT
Code Example
Python :: find python path windows 
Python :: program to split the list between even and odd python 
Python :: matplotlib display axis in scientific notation 
Python :: import py to exe 
Python :: jupyter notebook for loop progress bar 
Python :: django rest framework delete file 
Python :: tensorflow binary cross entropy loss 
Python :: save np array as mat file 
Python :: pd.merge left join 
Python :: convert categorical variable to numeric python 
Python :: f string python not working in linux 
Python :: tag for deleting from a list in python 
Python :: get package share vs FindPackageShare 
Python :: os.walk python 
Python :: python stack class 
Python :: tf tensor from numpy 
Python :: check if env variable exists python 
Python :: scrape with beautiful soup 
Python :: access dataframe column with space 
Python :: # list all keywords in Python 
Python :: How to convert a string to a dataframe in Python 
Python :: python get all characters 
Python :: Get value from TextCtrl wxpython 
Python :: python sum of digits in a string 
Python :: pytest installation windows 
Python :: scikit learn linear regression 
Python :: print nested list in new lines in python 
Python :: how to delete the last item in a list python 
Python :: python scatterplot 
Python :: plot pandas figsize 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =