[SQLinjection] test script

Gestart doorDylan44 reacties59 weergaven

45 berichten · pagina 3 van 3

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
[COLOR= #0000BB]<?php
    $a[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]){[/COLOR]
        [COLOR= #0000BB]$b[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
    }[/COLOR]
?>
Dan moet je het ID invullen? Maar ik wil juist dat het ID op de pagina komt?

Jij hield zeker niet van lezen, toen je op school zat?????????????????????????????
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Dylanh schreef:
[COLOR= #0000BB]<?php
    $a[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]){[/COLOR]
        [COLOR= #0000BB]$b[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
    }[/COLOR]
?>
Dan moet je het ID invullen? Maar ik wil juist dat het ID op de pagina komt?
Jij hield zeker niet van lezen, toen je op school zat?????????????????????????????

Klopt
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Shame you....
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Aarclay schreef:
Shame you....
emo
Afbeelding

Anti - simelie post
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Mysql verbinding[/COLOR]
[COLOR= #0000BB]$test[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$test1[/COLOR]  [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$test1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
?>


toevoeging op 10 april 2012, 191704:
Misschien staat ie er al tussen. Ik heb namelijk niet alle posts gelezen.
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mikeb schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Mysql verbinding[/COLOR]
[COLOR= #0000BB]$test[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$test1[/COLOR]  [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$test1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
?>
toevoeging op 10 april 2012, 191704:
Misschien staat ie er al tussen. Ik heb namelijk niet alle posts gelezen.

Geen mysql_real_escape_string redface
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben ik de enige die denkt dat de 2 reacties hierboven door de grootste kneuzen van one2xs zijn geplaatst?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Wauw, al 3 paginas over een onveilige query en een script van 4 regels.., zo moeilijk is het toch niet een query uit te voeren?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
En zet wel magic quotes uit.
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Hoe/
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
ga drie keer een rondje draaien, en roep daarbij 4 keer zonder te stotteren: Oekoeloeboeleboelekemoeboelekoe. Loop dan naar je voordeur toe en spring een gat in de lucht....

Even serieus:
Google

**kreun en diepe zucht**
0
Berichten
5.274
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien

Eindhoven, Nederland

[COLOR= #0000BB]<?php
$a[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]query[/COLOR][COLOR= #007700]]);[/COLOR]

[URL="http://www.php.net/Print_r"]Print_r[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]));[/COLOR]

?>


Mobiel ff snel getypt dit is onveilig.

toevoeging op 13 april 2012, 07:33:12:
Dylanh schreef:
Ik vraag het anders;
Wie heeft voor mij een script dat niet veilig is tegen SQLinjection?, graag met SQL (voor db) erbij??
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Wouterr schreef:
[COLOR= #0000BB]<?php
$a[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]query[/COLOR][COLOR= #007700]]);[/COLOR]

[URL="http://www.php.net/Print_r"]Print_r[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR][COLOR= #007700]));[/COLOR]

?>
Mobiel ff snel getypt dit is onveilig.

Duh, als je zelf nog de hele querie in vult, vind ik het niet echt een SQL injection. Meer een onzinnige querie generator and executer.

Pff..

Antwoord is al gegeven:
http://www.one2xs.com/threads/41208&p=3#638608

In combinatie met:
http://www.one2xs.com/threads/41208&p=3#639227
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Echt waar.. hoe moeilijk is het om een simpele query uit te voeren.. emo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren