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')
()
| 1194 | |
| 1195 | |
| 1196 | def __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 | ############################################################################ |