MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / __get_last_online_version

Function __get_last_online_version

pager_lib/nmap/nmap.py:1196–1210  ·  view source on GitHub ↗

Gets last python-nmap published version WARNING : it does an http connection to http://xael.org/pages/python-nmap/python-nmap_CURRENT_VERSION.txt :returns: a string which indicate last published version (example :'0.4.3')

()

Source from the content-addressed store, hash-verified

1194
1195
1196def __get_last_online_version():
1197 """
1198 Gets last python-nmap published version
1199
1200 WARNING : it does an http connection to http://xael.org/pages/python-nmap/python-nmap_CURRENT_VERSION.txt
1201
1202 :returns: a string which indicate last published version (example :'0.4.3')
1203
1204 """
1205 import http.client
1206
1207 conn = http.client.HTTPConnection("xael.org")
1208 conn.request("GET", "/pages/python-nmap/python-nmap_CURRENT_VERSION.txt")
1209 online_version = bytes.decode(conn.getresponse().read()).strip()
1210 return online_version
1211
1212
1213############################################################################

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected