Posts Tagged ‘python’

Linkedin Crawler

Friday, August 13th, 2010 by webstersprodigy

The following is also source used in the grad project. I’ll post the actual paper at some point. But here is the linkedin crawler portion with the applicable source. By it’s nature, this code is breakable, and may not work even at the time of posting. But it did work long enough for me to [...]

email_spider

Friday, August 13th, 2010 by webstersprodigy

This was a small part of a project that was itself about 1/3 of my graduate project. I used it to collect certain information. Here is the excerpt from the paper. Website Email Spider Program In order to automatically process publicly available email addresses, a simple tool was developed, with source code available in Appendix [...]

overthewire vortex level 0

Sunday, July 25th, 2010 by webstersprodigy

SPOILER. These games are awesome. Find them at http://www.overthewire.org. #!/usr/bin/python #edited so it doesn’t quite work… import socket import struct HOST=’host’ PORT=1111 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST,PORT)) blob = "" #no idea why 2 packets… but seems to be consistent for i in range (0,2): data = s.recv(2048) blob = blob + data print "DATA: [...]

Quick Redirect

Sunday, July 18th, 2010 by webstersprodigy

I was recently using this to have total control over a redirect response without having to muck around with real servers. I figure I may reuse this at some point as stupid as it is. #!/bin/python #python response.py | ncat -l 80 import sys import time REDIRECT_SITE= "http://webstersprodigy.net" gm_time = time.gmtime() content_response = ( """<!DOCTYPE [...]

pydbg reverseme solution update

Thursday, July 8th, 2010 by webstersprodigy

This is an update to http://webstersprodigy.net/2010/07/07/pydbg-reverseme-solution/. I change a register now to circumvent the isdebuggerpresent call. import sys import ctypes from pydbg import * from pydbg.defines import * print "This is a very stupid keygen that uses a debug method and grabs the key from memory" print "prints out the valid key, and writes it [...]

pydbg reverseme solution

Wednesday, July 7th, 2010 by webstersprodigy

Last week I wrote a keygen here: http://webstersprodigy.net/2010/06/22/reverseme-windows-keygen/. This is an almost identical problem, but the binary has been patched to allow debugging (I may do this programmaticly as well, but not yet). I wanted to solve this with programmatic debugging. Here is the exe: Ice9pch3. The code simply sets a breakpoint and prints the [...]

updated nessus-grep

Sunday, February 7th, 2010 by webstersprodigy

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.

nessus grep

Sunday, January 3rd, 2010 by webstersprodigy

The code is pretty self explanatory. It searches through a .nessus file and spits out matching hosts.

Nessus with Nikto – Running out of memory

Wednesday, December 30th, 2009 by webstersprodigy

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.

Auto Pw Change

Friday, November 13th, 2009 by webstersprodigy

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.

8-queens problem hill climbing python implementation

Saturday, October 31st, 2009 by webstersprodigy

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.

sorta captcha breaking thing

Monday, December 22nd, 2008 by webstersprodigy

“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.

modular exponentiation speedup

Monday, December 8th, 2008 by webstersprodigy

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.

stupid benchmark

Saturday, December 6th, 2008 by webstersprodigy

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.

modular exponentiation python program

Sunday, October 19th, 2008 by webstersprodigy

This is a simple – not efficient – but doable way to do modular exponentiation

python optparse example

Thursday, September 25th, 2008 by webstersprodigy

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 [...]

gnu readline – python

Thursday, September 25th, 2008 by webstersprodigy

This is the very start of our cryptanal program frontend. (for more up to date see the Software page).

Golay G24

Monday, September 8th, 2008 by webstersprodigy

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

isbn-10 validity identifier

Monday, September 1st, 2008 by webstersprodigy

Wellp, here’s a program that does the isbn error checking

python anagram finder

Wednesday, August 13th, 2008 by webstersprodigy

This is a silly little program that finds anagrams. Just hangin out practicing python-fu, and this was a challenge I found online.


No computers were harmed in the 0.416 seconds it took to produce this page.