stwalkerster /
waca
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /****************************************************************************** |
||
| 3 | * Wikipedia Account Creation Assistance tool * |
||
| 4 | * * |
||
| 5 | * All code in this file is released into the public domain by the ACC * |
||
| 6 | * Development Team. Please see team.json for a list of contributors. * |
||
| 7 | ******************************************************************************/ |
||
| 8 | |||
| 9 | $toolList = array( |
||
| 10 | 'tparis-pcount' => '//tools.wmflabs.org/supercount/index.php?user=%DATA%&project=en.wikipedia', |
||
| 11 | 'luxo-contributions' => '//tools.wmflabs.org/quentinv57-tools/tools/globalcontribs.php?username=%DATA%', |
||
| 12 | 'guc' => '//tools.wmflabs.org/guc/?user=%DATA%', |
||
| 13 | 'oq-whois' => 'https://whois.domaintools.com/%DATA%', |
||
| 14 | 'sulutil' => '//tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php?showinactivity=1&showblocks=1&username=%DATA%', |
||
|
0 ignored issues
–
show
|
|||
| 15 | 'google' => 'https://www.google.com/search?q=%DATA%', |
||
| 16 | 'link' => 'http://%DATA%/', |
||
| 17 | ); |
||
| 18 | |||
| 19 | if (isset($_GET['round2'])) { |
||
| 20 | $data = $_GET['data']; |
||
| 21 | $tool = $_GET['tool']; |
||
| 22 | |||
| 23 | if ($tool === 'link') { |
||
| 24 | // quick security check - if you want to exploit something, you better be sure your exploit resolves via dns. |
||
| 25 | // this is not intended to catch everything, just as a quick sanity check. |
||
| 26 | if (gethostbyname($data) == $data) { |
||
| 27 | echo 'Error resolving hostname, it doesn\'t look like this domain exists.'; |
||
| 28 | die(); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>'; |
||
| 33 | } |
||
| 34 | else { |
||
| 35 | header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true"); |
||
| 36 | } |
||
| 37 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.