Username: 
Password: 
Restrict session to IP 
Online within 1d

Double query  Go to the Training: MySQL II challenge

Global Rank: 89
Totalscore: 197906
Posts: 1
Thanks: 1
UpVotes: 1
Registered: 16y 357d





Last Seen: 1y 172d
The User is Offline
Double query
Google/translate1Thank You!1Good Post!0Bad Post! link
I'm trying to inject a second command that will get executed after the select, but before the password check. Am I on the right track?
This works locally for me, but when I try it on wechall I get an "GDO 1064". Is there something "blocking" executing two queries with the command "queryFirst"?
Global Rank: 198
Totalscore: 110647
Posts: 1795
Thanks: 1390
UpVotes: 961
Registered: 18y 258d




Last Seen: 64d 15h
The User is Offline
RE: Double query
Google/translate0Thank You!1Good Post!0Bad Post! link
You cannot execute two queries in a single query.
This is a limitation, once introduced for security, in mysql/mysqli (if i recall correctly)

Most other languages and their mysql bindings should have the same limits.

I googled a bit and it seems that it would be possible.

Take a look at https://stackoverflow.com/questions/802437/how-to-execute-two-mysql-queries-as-one-in-php-mysql
The geeks shall inherit the properties and methods of object earth.
Global Rank: 15707
Totalscore: 115
Posts: 1
Thanks: 1
UpVotes: 1
Registered: 8y 142d
Last Seen: 8y 140d
The User is Offline
RE: Double query
Google/translate1Thank You!1Good Post!0Bad Post! link
with the username, I can use the sql injection, but I don't know how to bypass the password check.
Global Rank: 2
Totalscore: 747640
Posts: 441
Thanks: 501
UpVotes: 478
Registered: 17y 96d












The User is Offline
RE: Double query
Google/translate1Thank You!1Good Post!0Bad Post! link
exp32, that is not a question. It also does not relate to the topic of this thread.

Perhaps research SQLi a bit more?
Global Rank: 198
Totalscore: 110647
Posts: 1795
Thanks: 1390
UpVotes: 961
Registered: 18y 258d




Last Seen: 64d 15h
The User is Offline
RE: Double query
Google/translate0Thank You!1Good Post!0Bad Post! link
@exp32: Just make your sent data fulfil the password check.... at least that's what i want you todo ;)
The geeks shall inherit the properties and methods of object earth.
Redknee, silenttrack, n0tHappy, nonfungiblesecurity, quangntenemy, TheHiveMind, Z, balicocat, Ge0, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, fpombal, csuquvq have subscribed to this thread and receive emails on new posts.
1 people are watching the thread at the moment.
This thread has been viewed 4975 times.

PHP Fatal Error(1): Constant E_STRICT is deprecated since 8.4, the error level was removed in www/protected/config.php line 6


Backtrace starts in [unknown file] line ?. GWF_Debug::shutdown_function() core/inc/util/GWF_Debug.php line 109. GWF_Debug::error_handler().... core/inc/util/GWF_Debug.php line 180.