
python
LogansCodingLife
人这一生浑浑噩噩就过去了, 来点什么!
展开
-
python 使用geoLiteCity 根据ip地址获取物理位置
GeoLite产品下载地址:http://dev.maxmind.com/zh-hans/geoip/legacy/geolite/ #!/usr/bin/env python3 # -*- coding: utf-8 -*- import pygeoip gi = pygeoip.GeoIP(r"I:\test\GeoLiteCity.dat") def regGeoStr(原创 2016-08-27 13:16:37 · 6258 阅读 · 0 评论 -
python ssh 批量连接linux服务器执行命令
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' 因为含有pxssh模块,该程序只能在 linux 环境中运行 ''' import optparse from pexpect import pxssh class Client: def __init__(self, host, user, password):原创 2016-08-26 14:00:38 · 5135 阅读 · 0 评论 -
python 调用 nmap 扫描服务器开放的端口
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import optparse import nmap def nmapScan(tgtHost, tgtPort): nmScan = nmap.PortScanner() results = nmScan.scan(tgtHost, tgtPort) state = res原创 2016-08-26 13:53:43 · 5526 阅读 · 2 评论