Tuesday, November 13, 2012

SSID Switcher

I am taking a wireless security class and one of the projects I was working on is to defend a wireless network. I thought it would be cool to create some program that would switch the SSID of the router at a set time interval. This combined with not broadcasting your SSID should make it hard for a hacker to break your WLAN. I used a pool of 5 SSID's and had them already loaded on my computer to see how practical this would be. It seemed to be fine with longer time intervals, but I think a designated computer would need to have a physical line to the router to run the program. Anyway the code and a better write up are given after the break.

Sunday, August 5, 2012

I'm a Tweeting Robot


Or at least I have a tweeting robot. I've had the idea to automate a twitter account for a while now after seeing other various robotweeters such as the one that tweets poetry. It doesn't do much right now (as a matter of fact its offline right now) other than tweet out a number every hour. I have been working on writing some additional functionality to tweet out the weather in the morning, a word of the day in the afternoon, and a picture of the day at night. As with all my projects this is still in its beginning stages. The program was written in Python and uses the Twitter API to tweet. Maybe someday I'll actually complete something, but until then you can follow my robot @RoboCWOOD. Below is the code I use to do it excluding my access keys and such.

Follow @RoboCWOOD


Thursday, June 28, 2012

I HAZ ALL THE VOTES

I'm living in the DC area for the summer and am a huge NBA fan. Not having cable forced me to watch the NBA playoffs on the Internet. The Western Conference Finals were hosted on TNT's website where you could vote for a fan cam to follow a player from each team. I wanted to put two unlikely players on the fan cam so I wrote a little program with the help of Selenium WebDriver to repeatedly vote for me. The expected results were for Tony Parker and Kevin Durant to be the leading vote getters. Instead it was to bench warmers. The script is after the jump.


Tuesday, May 29, 2012

OINK OINK

Some progress has been made on the Snort GUI including the general template of the GUI as well as the ability to make a rule and save a list of rules. For the first version I just want a simple edit rules interface that is clean and usable with the ability to save and load the rules as needed. Below is a picture of how it looks right now. I need to clean some of it up, but I think you will get the idea of what goes where if you've ever written a Snort rule.


Thursday, April 19, 2012

Colorduino

Been working on setting up a colorduino as a network monitor. Took a little while, but I have it displaying colors now. Still trying to figure out why its not clearing correctly, but have a sweet video of it.

Lincomatic Colorduino Library: http://blog.lincomatic.com/?p=148
Steve Ocepek Blinkie Lights Talk: http://defcon.org/html/links/dc-archives/dc-19-archive.html#Ocepek



UPDATE: Got it to print my name!



Thursday, February 9, 2012

1st Android App

While not technically the 1st Android App I've made it is the 1st one I have put on the Android market. Just a simple animal soundboard. You can get it here: https://market.android.com/details?id=com.chuckwoodraska Also found this useful for signing them:

Compile and sign with Eclipse ADT
If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed .apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows you to sign the package using a GUI instead of performing the manual procedures to compile, sign, and align, as discussed above. Once the wizard has compiled and signed your package, it will also perfom package alignment with zipalign. Because the Export Wizard uses both Keytool and Jarsigner, you should ensure that they are accessible on your computer, as described above in the Basic Setup for Signing.
To create a signed and aligned .apk in Eclipse:
  1. Select the project in the Package Explorer and select File > Export.
  2. Open the Android folder, select Export Android Application, and click Next.
    The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key).
  3. Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.

Friday, October 28, 2011

Too Slow - 11849 CD

So I was writing a program today to solve this problem. First I had some issues compiling because my arrays were too big. It seems that if you allocate them within the main function it takes up stack space where as initializing them as global variables takes up heap space. Good to know! The first five times I submitted I got a response of time limit exceeded. I did some minor things the first two times to break out of a loop if I had incremented my counter and if the CD number of Jack's was bigger than Jill's because all CDs were in order. This helped a little bit and then I remembered reading an article on competitive coding tips that suggested using scanf/printf functions instead of cin/cout. This dramatically improved my time, but was still getting rejected for exceeding the limit. I tried a couple other minor tweaks that improved my timing and finally decided a linear search was just too slow to work. Went to a binary search and submitted which gave me a response of ACCEPTED. :)


#include <stdio.h>

int array[1000000];
int array2[1000000];

int binary_search(int a[], int low, int high, int target) {
    while (low <= high) {
        int middle = low + (high - low)/2;
        if (target < a[middle])
            high = middle - 1;
        else if (target > a[middle])
            low = middle + 1;
        else
            return middle;
    }
    return -1;
}

int main()
{
int a = 1, b = 1;

scanf("%d %d", &a, &b);
while(a != 0 && b != 0)
{
int count = 0;
int i = 0;
for(i = 0; i < a; ++i)
{
int temp;
scanf("%d", &temp);
array[i] = temp;
}

for(i = 0; i < b; ++i)
{
int temp;
scanf("%d", &temp);
int found = binary_search(array, 0, a - 1, temp);
if(array[found] == temp)
++count;

}
printf("%d\n", count);
count = 0;
scanf("%d %d", &a, &b);
}
return 0;
}