Archive for the ‘Programming’ Category

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

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

nmap script to try and detect login pages

Wednesday, April 7th, 2010 by webstersprodigy

The title sort of explains it. description = [[ Attempts to check if a login page exists on the port. ]] — — @output — 80/tcp open http — |_ http-login-form: HTTP login detected — HTTP authentication information gathering script — rev 1.0 (2010-02-06) author = "Rich Lundeen <mopey@webstersprodigy.net>" license = "Same as Nmap–See http://nmap.org/book/man-legal.html" [...]

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.

bash script for nmap list scan

Wednesday, October 14th, 2009 by webstersprodigy

This is a stupid script to scan a class b network. I only wanted a detailed scan of hosts that exist (which I generated with a ping scan). I also wanted this information separated by file.

The square of random is less uniform (derr)

Sunday, July 26th, 2009 by webstersprodigy

This is something obvious to statisticians but maybe less obvious to most programmers. I recently came across some code that essentially looks like this: x = rand^2. The programer was for some reason assuming that x was still uniform between [0,1]. Of course, this isn’t the case. Although the domain is still between [0,1] the numbers will now be squished down closer to 0.

Finished RTOS similar to FreeRTOS

Saturday, July 25th, 2009 by webstersprodigy

This is an RTOS developed by myself, with some code taken from FreeRTOS. This is some of the most difficult code I have ever written, although it really doesn’t do anything useful. Man, context switching in C can be a bear! It’s like a programatic buffer overflow! (seriously, you do a function call and just pop off enough stuff to overwrite the instruction pointer).

execv-like system call

Tuesday, June 30th, 2009 by webstersprodigy

From the system man page, it explicitely says: Do not use system() from a program with set-user-ID or set-group-ID privileges, because strange values for some environment variables might be used to subvert system integrity. Since system is basically a fork and wait, it’s pretty easy to use execv instead. Here is a snippet from the [...]

RTOS and the Parallax Propeller

Tuesday, May 26th, 2009 by webstersprodigy

In CS 504:Real Time Operating Systems, the class built a functional Real Time Operating system based on the UIK API. In my implementation, I heavily relied on the source code of FreeRTOS. The process focused primarily on demonstrating the atmel processor, multitasking, and and basic interprocess communication, which are fundamental parts of an RTOS. In this project, the same problems are achieved with a very different architecture. Namely, all the first programming projects – generating a sound wave, counting LEDs, timing how long buttons were pressed, and handling hardware events – were programmed similarly and multi-tasked on the propeller chip. This project included interfacing with the ntsc and peripheral drivers, writing a sound driver, learning spin and propeller assembly, and comprehending the propeller architecture.

playing a scale with the atmega16

Monday, May 4th, 2009 by webstersprodigy

A musical “note” is a waveform that has a certain fundamental frequency. A perfect sine wave consists only of the fundamental frequency, and sounds very “pure” or mellow, like a flute. For this project, you are to use interrupts to generate the notes of a musical scale, while at the same time using another interrupt to update a count. We will generate square waves by toggling a bit within a port on and off. Specifically, your program should play the notes from middle C to the next higher C, each of approximately one second in duration. These notes should be playing at the same time that an 8-bit binary count is being displayed in the LED’s, updating at approximately 1/4 second.

avr interrupts

Wednesday, April 8th, 2009 by webstersprodigy

The purpose of this assignment is to give you experience with the AVR’s timers and the use of interrupts. You are to repeat assignment #1, this time performing the timing using an interrupt-driven timer. You are to write an interrupt service routine (ISR) for one of the hardware timers on the AVR. Each time the timer interrupts, you should update a counter variable. Then, when determining the amount of time that the switch is held down, use the counter value. Then, use the counter again to determine how long to turn on the LED. As before, in addition to writing the code, determine the size of the code in your program, including main and the ISR.

stk500 avr atmega16 linux gcc hello, world

Saturday, April 4th, 2009 by webstersprodigy

Does my title sound like buz-word central? You bet it does. That’s because it was a bit difficult to find any good introductory material on this. Maybe that’s because there’s so much information out there…

Count number of lines in a file

Thursday, February 26th, 2009 by webstersprodigy

“find . -type f -exec cat {} \; | wc -l;” and if you don’t want repeats “find . -type f -exec cat {} \; | egrep \\S | wc -l”

Bash Error Checking

Saturday, January 24th, 2009 by webstersprodigy

I was reading an oriley bash scripting book, and they had an entire chapter dedicated to error checking in bash. For me, this was a little weird since I think the way they handled it made the code cluttered.


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