I hereby claim:
- I am savon-noir on github.
- I am ronaldb (https://keybase.io/ronaldb) on keybase.
- I have a public key whose fingerprint is CA8A 6456 24D5 4B8B D302 FB0C 2DDF 8B7D 9A96 E85E
To claim this, I am signing this object:
# -*- coding: utf-8 -*- | |
# | |
# get file from https://check.torproject.org/exit-addresses | |
def parse_torexitnodes(fileobj): | |
torlist = [] | |
btemplate = { | |
'nodename': '', | |
'create_date': '', | |
'last_update': '', |
I hereby claim:
To claim this, I am signing this object:
from libnmap.parser import NmapParser | |
p = NmapParser.parse_fromfile("<path to the result of command>.xml") | |
for host in p.hosts: | |
for service in host.services: | |
for script_output in service.scripts_results: | |
print "Output of {0}: {1}".format(script_output['id'], script_output['output']) |
In [1]: from libnmap.parser import NmapParser | |
In [2]: p = NmapParser.parse_fromfile('libnmap/test/files/fullscan.xml') | |
In [3]: h = p.hosts.pop() | |
In [4]: s = h.services[2] | |
In [5]: for s in h.services: | |
for cpe in s.cpelist: |
In [1]: from libnmap.parser import NmapParser | |
In [2]: p = NmapParser.parse_fromfile('/root/all6.nmap') | |
In [3]: h = p.hosts.pop() | |
In [4]: print h.os | |
Linux 3.7 - 3.9: 98 | |
|__ os class: general purpose: Linux, Linux(3.X) | |
|__ cpe:/o:linux:linux_kernel:3 | |
Netgear DG834G WAP or Western Digital WD TV media player: 95 | |
|__ os class: WAP: Netgear, embedded |
(pydev)vagrant@devbox:~/fork/python-libnmap/libnmap$ python process.py | |
Task Ping Scan (started): ETC: 0 DONE: 0% | |
Task Ping Scan (started): ETC: 1399047911 DONE: 50.00% | |
Task Ping Scan (started): ETC: 1399047913 DONE: 50.00% | |
Task Ping Scan (started): ETC: 1399047913 DONE: 75.00% | |
Task Ping Scan (ended): ETC: 1399047913 DONE: 75.00% | |
Task Parallel DNS resolution of 1 host. (started): ETC: 0 DONE: 0% | |
Task Parallel DNS resolution of 1 host. (ended): ETC: 0 DONE: 0% | |
Task Connect Scan (started): ETC: 0 DONE: 0% | |
Task Connect Scan (started): ETC: 1399048212 DONE: 1.00% |
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
def __ne__(self, other): | |
rval = True | |
if(self.__class__ == other.__class__ and self.id == other.id): | |
diffobj = self.diff(other) | |
rval = (len(diffobj.changed()) != 0 or | |
len(diffobj.added()) != 0 or | |
len(diffobj.removed()) != 0 | |
) | |
return rval | |
>>>>>>>>>>>>>>>>> |
http://jsfiddle.net/CJxAk/3/ |
#!/usr/bin/env python | |
from libnmap.parser import NmapParser | |
def nested_obj(objname): | |
rval = None | |
splitted = objname.split("::") | |
if len(splitted) == 2: | |
rval = splitted |