Posts Tagged ‘python’
Sunday, February 7th, 2010 by mopey
This program takes a regular expression for a problem and returns the
affected hosts. It iterates through all reports saved in a .nessus file
making no attempt at uniqueness, (eg if you scanned a host more than once)
searching through titles, data, port, and IDs for matches.
Tags: grep, nessus, python
Posted in Programming | No Comments »
Sunday, January 3rd, 2010 by mopey
The code is pretty self explanatory. It searches through a .nessus file and spits out matching hosts.
Tags: nessus, python
Posted in GrayHat, Programming | No Comments »
Wednesday, December 30th, 2009 by mopey
Kind of an annoying problem, but sometimes nikto runs out of control. This is made worse by nessus, which can have a lot of nikto instances running at once.
Tags: nikto, python
Posted in GrayHat, Programming | No Comments »
Friday, November 13th, 2009 by mopey
I had to change this script a lot, so take with a grain of salt. That said, we changed about 1000 LOCAL passwords in a couple hours – which would have really taken all day and been more boring.
Tags: python
Posted in Network, Programming | No Comments »
Saturday, October 31st, 2009 by mopey
This program is a hillclimbing program solution to the 8 queens problem. The algorithm is silly in some places, but suits the purposes for this assignment I think. It was tested with python 2.6.1 with psyco installed. If big runs are being tried, having psyco may be important to maintain sanity, since it will speed things up significanlty. Otherwise, you may want to stick to –numrun being less than around 50.
Tags: artificial intelligence, python
Posted in Programming | No Comments »
Monday, December 22nd, 2008 by mopey
“The pixels in the above image are numbered 0..99 for the first row, 100..199 for the second row etc. White pixels represent ascii codes. The ascii code for a particular white pixel is equal to the offset from the last white pixel. For example, the first white pixel at location 65 would represent ascii code 65 (‘A’), the next at location 131 would represent ascii code (131 – 65) = 66 (‘B’) and so on.
Tags: hackthissite, python
Posted in GrayHat, Programming | No Comments »
Monday, December 8th, 2008 by mopey
Trying to do this in a somewhat intelligent way this time. The results are better. timing in at around 4 seconds instead of the brute force 11 minutes. I’m very positive it could be sped up much much more by writing in C, but this is just algorithmic, and I’m writing in python.
Tags: benchmark, python
Posted in Programming | No Comments »
Saturday, December 6th, 2008 by mopey
Stupid single core opteron vs xeon benchmark. This benchmark is to test the single core speed of some operations of a 2.2 GHz Opteron 170 vs a Xeon X5460 3.16 GHz. Our old main server had 4 Opteron cores simlar to the ones used in the benchmard, and the Xeon is the processor in our new server.
Tags: benchmark, python
Posted in Programming | No Comments »
Sunday, October 19th, 2008 by mopey
This is a simple – not efficient – but doable way to do modular exponentiation
Tags: python
Posted in Programming | No Comments »
Thursday, September 25th, 2008 by mopey
This is a short commented optparse example
#!/usr/bin/env python
from optparse import OptionParser
#action, type, dest (destination), and help, default
#can optionally pass usage in here as a string
parser = OptionParser()
#notice the first arguments are a list – they define the synonomous commands
#destination is the most important – it is what your file is
#help is for the –help options
parser.add_option("-f", [...]
Tags: python
Posted in Programming | No Comments »
Thursday, September 25th, 2008 by mopey
This is the very start of our cryptanal program frontend. (for more up to date see the Software page).
Tags: python
Posted in Programming, Security Tools | No Comments »
Monday, September 8th, 2008 by mopey
This is a dirty implemenation of Golay correcting code using python. This is a solution to 18.13 problem 1 from Trappe and Washington’s Crytography book. To run this, you need bash, python, and the numpy libraries. To run, run golay.sh. The algorithm is located in golay.py
Tags: bash, cryptography, python
Posted in Programming | No Comments »
Monday, September 1st, 2008 by mopey
Wellp, here’s a program that does the isbn error checking
Tags: python
Posted in Programming | No Comments »
Wednesday, August 13th, 2008 by mopey
This is a silly little program that finds anagrams. Just hangin out practicing python-fu, and this was a challenge I found online.
Tags: python
Posted in Programming | No Comments »
Wednesday, July 23rd, 2008 by mopey
Though there are many ways to format your gui code, the following seems to work well for me. It is not pretty, but the important thing is just how I laid it out. Basically, I like making a subclass of frame for almost everything.
Tags: gui, python
Posted in Programming | 1 Comment »
Friday, July 18th, 2008 by mopey
This is pretty straightforward. I tend to structure all my gui programs so far in almost the same way, with the inherited frame class doing all the packing.
Tags: gui, python
Posted in Programming | No Comments »
Saturday, July 12th, 2008 by mopey
This is a python script that recursively md5sums all the files in your directory and compares it with another directory. It is similar, and probably less good than “find /dirone -type f -print0 | md5sum”
Tags: python
Posted in Programming | No Comments »
Monday, July 7th, 2008 by mopey
In the book Programming Python’, an entire chapter is dedicated to recursive copyting of directories, recursive deletion, etc. He uses the os tools to accomplish this. The reason something like this is necessary is the fact that the os tools do not have a built-in recusive delete. For example, if in my current directory I had a folder named ‘test2′, I would get the following error when trying to remove it.
Tags: python
Posted in Programming | No Comments »
Thursday, July 3rd, 2008 by mopey
This is a stupid script similar to cat. Again, I am using it for windows.
Tags: python
Posted in Programming, windoze | No Comments »
Wednesday, June 25th, 2008 by mopey
This is something I do again and again… traverse down a directory tree searching and replacing for a certain amount of text. Especially since dynamic content is not allowed on ISU’s main webserver (how lame!)
Tags: bash, python
Posted in Programming | 2 Comments »