l337 h4X!!!1!

You have got to love MySpace. Their code has got to be so nasty, I mean, just the markup on a profile makes me sick to my stomach, I can’t imagine the pasted together backend that would generate that mess.

When I got an event invitation I went to RSVP and had a thought. I wondered how well they error checked their inputs. I mean, I’m sure they strip and escape for SQL injection, but do they constrain anything?

I busted out Firebug, edited the source for the RSVP and now I’m bringing several tens of thousands of friends with me to the party. Awesome.

Click for biggies.


(Note: the 91213 didn’t work, too big I bet)

Posted November 14th, 2007 - Permalink
Categories: Internet
No Comments »
 
Really Cool Video

I found this really neat video on web 2.0. Yay KSU.

Posted July 3rd, 2007 - Permalink
Categories: Internet
1 Comment »
 
OurUNO & mod_rewrite

Over the last day or so I’ve spent some time restructuring OurUNO to fix it up in time for the end of the semester. One of the biggest and most visible things I’ve done is to start using mod_rewrite to make super-slick URLs for everything. For example, in the old system to view Robert Fulkerson’s information and get reviews, you would have to go to “http://www.ouruno.com/instructors.php?action=view&id=1″. With the new system you can simply go to “http://www.ouruno.com/instructor/fulkerson/robert/”. mod_rewrite is darn cool.

Along with that is a shift in the design paradigm, setting apart the actions on the site into 3 sets, (View/Edit/Create) and 3 sections (Course/Instructor/Review) with a deeper backend and wiki style rollbacks on edits. Also, at Dave’s suggestion, I’m adding in the ability to generate a review or other content without signing up. You just have to enter it, got to your UNO email, and click through on the link to validate your address. Rad.

Posted March 17th, 2007 - Permalink
Categories: Internet - OurUNO - PHP - Programming - Projects
No Comments »
 
MediaWiki and OmahaWiki.org

A ways back in the past I had a MediaWiki install at WikiOmaha.org with the hopes that a wiki could be formed for the omaha community, by the omaha community (sound familiar?). Anyway, I never really did much with it, and a few days ago a professor from Creighton contacted me about my domain and pooling resources.

He has created OmahaWiki.org which WikiOmaha.org now re-directs to. He is having students flesh it out. I came into the picture to help set up some bots to manage the content.

It turns out there is a cool framework for MediaWiki’s called the “Python Wikipedia Robot Framework” that is written in python. I got the scripts working on my machine and then I turned my attention to writing a bot that would do a word-count on every page, and add a stub to that page if it was under a given threshold.

I had forgotten how awesome Python is. It really is a good language, I just wish I had call to use it every once in a while. Anyway, here is my Python bot for that framework. You can grab a file version here

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/python
# -*- coding: utf-8  -*-
"""
-----// Stub Adder //------------------------------------------------------
File: jmh_addstubs.py
Version: 1.0
Author: John Hobbs
Contact: john@velvetcache.org
 
This bot will iterate through all pages of the wiki and append a generic
stub ('{{Stub}}') to them if they do not have one already and have under
a given number of "words" in them.  Words, here, are counted as _any_ series
of characters seperated by a space.  The default maximum number of words
that the bot will work on is 5, so it is recommended that you pass it a more
realistic value.
 
Call
 
python wordcount.py
 
to have your change be done on all pages of the wiki. If that takes too
long to work in one stroke, run:
 
python wordcount.py Pagename
 
to do all pages starting at pagename.
 
There are two command line options:
 
-dryrun
    This will check and notify you but will not actually change anything.
 
-words=XX
  This is the word threshold. Replace XX with the biggest wordcount that you
  want the bot to append stubs to.
 
"""
import wikipedia
import pagegenerators
import sys
 
def workon(page):
    try:
        text = page.get()
    except wikipedia.IsRedirectPage:
        return
 
    jmh_tokens = text.split(' ')
    if len(jmh_tokens) <= jmh_count and -1 == text.find('Stub}}'):
      text += '{{Stub}}'
      if jmh_dryrun:
        print '--// MATCH: [['+page.title()+']] -> Dry Run, No Change //--'
      else:
        print '--// MATCH: [['+page.title()+']] -> Stub Added //--'
        page.put(text)
 
try:
    start = []
    test = False
    jmh_dryrun = False
    jmh_count = 5
    for arg in wikipedia.handleArgs():
        if arg.startswith("-words="):
            temp = arg.split('=')
            jmh_count = int(temp[1])
        elif arg.startswith("-dryrun"):
            jmh_dryrun = True
        else:
            start.append(arg)
    if start:
        start = " ".join(start)
    else:
        start = "!"
    mysite = wikipedia.getSite()
    basicgenerator = pagegenerators.AllpagesPageGenerator(start=start)
    generator = pagegenerators.PreloadingGenerator(basicgenerator)
    for page in generator:
        workon(page)
 
finally:
    wikipedia.stopme()

Posted March 2nd, 2007 - Permalink
Categories: Internet - Programming - Python
No Comments »
 
Possibly The Best Spam Ever

I got a fantastic spam today. It was one of those “buy this stock now!” spams, and it was fairly well done to get past the filter at UNO, which usually stops, well, everything. Even my real mail.

Anyway, the choice lines were the openers: “We live in a time of unthinkable technologies such as self-cooled beer, artificial retinas of the eye, full automated plants. All these open modern methods of saving and transfering of energy.

Holy cow! Self-cooled beer! Thats, unthinkable, impossible, a feat that soars above and beyond such simple bionic augmentation like artificial retinas. And don’t even get me started on “full automated plants“, thats just too cutting edge for me.

So what was all this dazzling technology a lead in for? Batteries that never need charging. The madness! A revolutionary zero-point energy source, and I can get in on the ground floor! “AC Energy’s Technology “The battery that never needs to be charged” could work in cell phones, laptops, music players or any other portable device.

As I neared the end of the email, I was beginning to think that this was perhaps a hoax or something. There was simply no way that this could be real, and good things like getting an offer like this never happen to me. But wait, there it was, my reassurance: It’s not some kind of story or something like this, we provide you with 100% information. Energy is our future, don’t waste time. I’m glad they included that in the email, or I might not have spent all my money on AC Energy stocks.

Thats all for now, but I’ll see you in the never-need-to-charge-your-cell-phone future. I’ll be the one looking at you with my artificial retina while pouring my self-cooling beer into a nearby automated plant.

Posted February 28th, 2007 - Permalink
Categories: Funny - Internet
No Comments »
 
More Posts
« Older
Newer »