Cialis online Biaxin Buy levitra online Internet casino gambling Personal trainer Vicodin Best anti virus spyware Payday cash loan Clarithromycin Purchase aciphex Stop Smoking Payday loans Debt consolidation program Online pharmacy valium Online trading Cheap soma Proscar Zithromax Viagra uk Adultfriendfinder Online gambling Arizona auto insurance Buy zoloft Cialis levitra Online internet casino Cash advance payday loan Antivirus Oncology Zithromax without prescription Neurontin Viagra Cheap ticket to russia Discount cialis Casino Cholesterol Medical assistant Cheap tickets California homeowner insurance Wellbutrin sr Evista Order ambien online Ephedrine Home inspector Home loan Order ambien Buy hydrocodone Buy cialis viagra Buy wellbutrin Ophthalmology Viagra information Personal loan Low cost car insurance Midwife Online casino bonus Duromine (Brand Ionamin) Asthma Free auto insurance quote Lexapro Get propecia Cheap hotels 
Home > IT, Python, Security, Tools > Playing with Python – nmap XML port frequency

Playing with Python – nmap XML port frequency

December 16th, 2008 Leave a comment Go to comments

Two Python libraries have caught my attention lately, the first is lxml and the second is matplotlib. Ideally I wanted to write something short, just to get a feel for the basics of them. The goal was figuring out what I could do quickly so that I could play around with arguments and output, yet still have an actual result. I also wanted a nicely formatted useful XML file to parse. I ended up going with nmap's XML output. I also decided that I would plot the frequency of ports in the file.

Is this useful... perhaps? I could see a sys admin wanting a count of specific open ports on the network or a pen tester wanting to know the most common ports on a target network.

The python script is extremely basic and is called via nmap_port_frequency.py <XML Input> <png Output>. The result is an image similar to this:

The above image is the output from scanning three hosts.

Categories: IT, Python, Security, Tools Tags: , , , , ,