
Are you a QOTWer? Do you want to start a thread that isn't a direct answer to the current QOTW? Then this place, gentle poster, is your friend.
( , Sun 1 Apr 2001, 1:00)
« Go Back | See The Full Thread

( , Sat 16 Oct 2010, 17:32, 2 replies, latest was 15 years ago)

Did you get a screencap? So overcome was I with excitement that I forgot to use a proxy, so my IP address is all over that bitch. Hopefully they'll be hunting down the 4chan haxxorz.
( , Sat 16 Oct 2010, 17:33, Reply)

4chan ripped it to shreds and it was blocked soon after.
( , Sat 16 Oct 2010, 17:52, Reply)

( , Sat 16 Oct 2010, 17:56, Reply)

I doubt they'd be interested in us though. I believe, and I could be wrong here, they'd have to prove that me and you had something to profit out of it and that the one page we did each caused it to crash out.
( , Sat 16 Oct 2010, 18:06, Reply)

Some people did, I'll check my cache, hang on. Edit: nah, all gone, sorry.
( , Sat 16 Oct 2010, 18:08, Reply)

so i'll just ask what you are all up to tonight?
i'm watching "the simpsons" then heading south of the river for dinner!
gonz, that there below has just proved my point!!!
( , Sat 16 Oct 2010, 18:22, Reply)

IT WILL HAPPEN!
( , Sat 16 Oct 2010, 18:24, Reply)

More to the point, do you expect me to care?
I won't point out that 'Kilngons' aren't real either
( , Sat 16 Oct 2010, 18:38, Reply)

why am i not down with the kidz any more?
edit - south of the river. i presumed it was something on tv or summat.
god i'm thick.
we're off to streatham, whereabouts be you then??
( , Sat 16 Oct 2010, 18:33, Reply)

Ignore Al, he's just jealous he doesn't live here.
( , Sat 16 Oct 2010, 18:42, Reply)

$sql = "SELECT * FROM users WHERE (username='$username') AND (password = '$password);";
So that 'sql' script will look in a table (like a spreadsheet) called 'users' and select all the rows where the column 'username' is the same as the input ($username), and the column password = $password... and then return that row so you can do something with it.
By making the $username = 'admin', which is pretty standard (at least, shouldn't be, but is used a lot) is almost always there, it turns the script into
$sql = "SELECT * FROM users WHERE (username='admin') AND (password = '$password');";
By setting $password to ') OR ('1' = '1 means that it'll run
$sql = "SELECT * FROM users WHERE (username='admin') AND (password = '') OR ('1' = '1');";
So we're looking for where the username = 1, the password = 'blank' OR 1 = 1..... 1 always = 1 and so would return the row and allow the aurtherisation to take place.
For you geeks out there, I only know MySQL, which doesn't use the () on select statements, so I'm guessing that's the syntax for whatever database system they're using, maybe MS SQL? I donno, that bit is an estimate.
( , Sat 16 Oct 2010, 18:19, Reply)

For example, in my framework I've built, it'll do....
$table = "users";
$data = array('username' => $username, 'password' => $password);
$row = $core -> db -> select_row($table, $data);
'select_row' inside 'db' inside 'core' is a function that would build the sql statement, making sure that all everything in the $data array is Escaped. There are sevrel ways of doing this, but this is the most basic example that people might understand. Another one would be
$sql = $core -> -> db -> makeSQL("Select * from users where username = ? and password = ?", $username, $password);
Which would do something similar.
The bold stuff I would normally do a few things with it first, but a lot of people give that direct access to a database.
The vars and names are changed to protect the innocent.
( , Sat 16 Oct 2010, 18:31, Reply)

someone with such a tenuous grip on the English language has such an eye for coding. This is more praise than criticism I'll admit.
( , Sat 16 Oct 2010, 18:33, Reply)

Take this just as a brief example
"Jane has a cat, the cat was painted red. She threw it into a mirror until the mirror smashed"
// This is already created before this point normally
$mirror = new Object();
$cat = new Cat();
$jane = new User();
// This is the only bit I'd have to do really
while($user -> action('throw', array($cat,$mirror) ) !== $mirror->get('integraty') {
$mirror->set('integraty', 'smashed');
}
So with that, it'll tell the user to perform the action 'throw' the 'cat' into the 'mirror' until the mirror's var 'integraty' is smashed.... in this case, it would do it the once.
..... That doesn't quite make sense, but my brain deffo sees code better than english.
What I'm currently working on at work is 7gb worth of objects, views and stuff, so most of it is already written, but I have to find out exactly where it is, and make sure I don't over-write it. But in the same way if this was writting in english, I would have to find out who jane is, what a cat is and what a mirror is. In english, it's ovbouse what a mirror and cat is, and to me it is in code too, 'cus I can read it and know where to look to find it (almost like knowing the page numbers that describe the jane/mirror/cat).
( , Sat 16 Oct 2010, 18:44, Reply)

CodeIgnitor might be a better way to go about it though, you won't have to re-learn a lot, just a few core functions. I managed to learn the base of it inside a few days... it sounds like you wouldn't be too far off from me if you're already doing OOP.
( , Sat 16 Oct 2010, 19:01, Reply)

This puts a slash before the ' (so it would look like this
$sql = "SELECT * FROM users WHERE (username='admin') AND (password = '/') OR (/'1/' = /'1');";
So it would be looking for a password called ') OR ('1' = '1, and therefore wouldn't match up in the database, not return a row, and the page will say "Incorrect combination".
( , Sat 16 Oct 2010, 18:24, Reply)

*shakes head* *lights pipe* Classic.
( , Sat 16 Oct 2010, 18:31, Reply)

codeigniter.com/
Almost _every_ job I applied for said that was a major factor. Another one to learn is something called jQuery for javascript. Both are amazing tools, I've built stuff inside days which would have taken months without it.
( , Sat 16 Oct 2010, 18:34, Reply)

I think a sojourn into constructing PHP apps is a little out of my comfort zone =o)
( , Sat 16 Oct 2010, 18:36, Reply)

They both use ActiveRecord syntax for database stuff though, which is cool.
( , Sat 16 Oct 2010, 18:46, Reply)
« Go Back | See The Full Thread