Skip to content

Commit 0dbd02b

Browse files
Add files via upload
1 parent 0394692 commit 0dbd02b

File tree

5 files changed

+30
-35
lines changed

5 files changed

+30
-35
lines changed

atscan.pl

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Digest::MD5;
1111
use MIME::Base64;
1212
use Net::Ping;
13+
use HTTP::Cookies;
14+
1315
## Copy@right Alisam Technology see License.txt
1416

1517
## INTRODUCTION ###########################################################################################

inc/conf/version.log

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ATSCAN SCANNER VERSION 13.1.0 RELEASE
22
=====================================================
33
CHANGES: 12/05/2018
44
- Fix update.
5+
- Fix validation by url.
56
- Enjoy!
67
=================
78

inc/funcs.pl

+15-24
Original file line numberDiff line numberDiff line change
@@ -176,39 +176,31 @@ sub get_psx {
176176

177177
our ($system, $agent, $ua);
178178

179-
## TIMEOUT
180-
sub get_timeout {
181-
my $time;
182-
if (defined $timeout || $timeout) { $time=$timeout; }
183-
else{ $time=5; }
184-
return $time;
185-
}
186-
187179
## HEADERS
188180
@defaultHeaders = (
189-
'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,image/png, */*',
190-
'Accept-Charset' => 'iso-8859-1,*,utf-8',
191-
'Accept-Language' => 'en-US',
192-
'Accept' => 'text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, image/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8,
193-
text/css, */*;q=0.1',
194-
'Accept-Encoding' => 'gzip, deflate, compress;q=0.9',
195-
'Connection' => 'keep-alive'
181+
"Accept => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,image/png, */*",
182+
"Accept-Charset => iso-8859-1,*,utf-8",
183+
"Accept-Language => en-US",
184+
"Accept => text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, image/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8,
185+
text/css, */*;q=0.1",
186+
"Accept-Encoding => gzip, deflate, compress;q=0.9",
187+
"Connection => keep-alive"
196188
);
197189
our $headers;
198190

199191
if (defined $headers) {
200-
@userHeaders=split (",", $headers);
201-
push @defaultHeaders, @userHeaders;
192+
push @defaultHeaders, $headers;
202193
}
203194

204-
use HTTP::Cookies;
205195
## SET PROXY
206196
$agent="Mozilla/5.0 (".$systems[rand @systems];
207197
$ua=LWP::UserAgent->new( agent => $agent, @defaultHeaders, cookie_jar => HTTP::Cookies->new());
208198
$ua->cookie_jar({});
209199
$ua->env_proxy;
210-
$timeout=get_timeout();
211-
$ua->timeout($timeout);
200+
if (defined $timeout || $timeout) {
201+
$ua->timeout($timeout);
202+
}
203+
212204
if ($proxy || $prandom || defined $proxy || defined $prandom) {
213205
$ua->proxy([qw/ http https ftp ftps /] => $psx); $ua->cookie_jar({ });
214206
}
@@ -621,11 +613,10 @@ sub checkUloadedShell {
621613
my $URL1=$_[0];
622614
my $isUploaded="";
623615
$URL1=getHost($URL1);
624-
$URL1="$URL1/$validShell";
625-
$ua = LWP::UserAgent->new;
616+
$URL1.=$validShell;
626617
my $reShell = $ua->get("$URL1");
627618
if ($reShell->is_success and ($reShell->code eq "200")) {
628-
$URL1=$isUploaded;
619+
$isUploaded=$URL1;
629620
}
630621
return $isUploaded;
631622
}
@@ -739,7 +730,7 @@ sub printProxy {
739730
sub Targs {
740731
our ($mindex, $Hstatus, $validText);
741732
my @Targs=($xss, $data, $lfi, $ifinurl, $WpSites, $Hstatus, $validText, $adminPage, $subdomain, $JoomRfi, $WpAfd, $mindex, $port, $mupload, $mzip, $JoomSites, $eMails, $searchIps,
742-
$regex, $command, $ping, $interactive);
733+
$regex, $command, $ping, $interactive, $validShell);
743734
my $Targ=0;
744735
for (@Targs) { $Targ++ if defined $_; }
745736
return $Targ;

inc/search/print.pl

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ sub printResults {
8484
my $o=OO();
8585
if ($o<$limit) {
8686
if ($result) {
87-
titleSCAN() if $result && (defined $Hstatus || defined $validText || defined $notIn);
87+
titleSCAN() if $result && (defined $Hstatus || defined $validText || defined $notIn || defined $validShell);
8888
validateResult($URL1, $status, $html, $response, $result);
8989
}
9090
elsif ($reg) {
@@ -163,10 +163,10 @@ sub checkValidation {
163163
if (defined $noExist || defined $Hstatus || $validText) {
164164
if (defined $noExist) {
165165
if (defined $Hstatus) { if ($status == $Hstatus) { $cV=""; } }
166-
if (defined $validText) { if ($html=~m/^$validText$/i) { $cV=""; } }
166+
if (defined $validText) { if ($html=~m/\b$validText\b/) { $cV=""; } }
167167
}else{
168168
if (defined $Hstatus) { if ($status ne $Hstatus) { $cV=""; } }
169-
if (defined $validText) { if ($html!~m/^$validText$/i) { $cV=""; } }
169+
if (defined $validText) { if ($html!~m/\b$validText\b/) { $cV=""; } }
170170
}
171171
}
172172
if (defined $notIn) { if (index($html, $notIn) != -1) { $cV=""; } }

inc/search/process.pl

+9-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Copy@right Alisam Technology see License.txt
66

77
our ($browserLang, $mrand, $motorparam, $motor, $motor1, $motor2, $motor3, $motor4, $motor5, $mrandom, $googleDomain, $prandom, $proxy, $psx, $mlevel, $ifinurl, $unique, $mdom,
8-
$searchRegex, $Target, $dork, $ua, $Id, $MsId, $V_SEARCH,$nolisting, $mindex, $zone, $agent, $noExist, $notIn, $expHost, $mupload, $expIp);
8+
$searchRegex, $Target, $dork, $ua, $Id, $MsId, $V_SEARCH,$nolisting, $mindex, $headers, $zone, $agent, $noExist, $notIn, $expHost, $mupload, $expIp);
99
our (@motor, @TODO, @V_TODO, @c, @TT, @DS, @DT, @dorks, @SCAN_TITLE, @motors, @mrands, @aTsearch, @proxies);
1010
our ($limit, $post, $get, $replace, $output, $data, $noQuery, $V_IP, $replaceFROM, $eMails, $searchIps, $brandom, $validShell, $noinfo, $timeout, $method, $command, @defaultHeaders, @OTHERS, @ErrT);
1111

@@ -188,7 +188,8 @@ sub printInfoUrl {
188188
elsif (defined $post || ($method and $method eq "post")) { print "$DT[32]\n"; }
189189
elsif (defined $mupload || ($method and $method eq "upload")) { print "UPLOAD\n"; }
190190
else{ print "$DS[15]\n"; }
191-
if ($timeout !=10) { print $c[1]." $TT[10] ".$c[10]."$timeout s\n"; }
191+
if ($timeout or defined $timeout) { print $c[1]." $TT[10] ".$c[10]."$timeout s\n"; }
192+
if (defined $headers) { print $c[1]." HEADERS ".$c[10]."$headers\n"; }
192193
for (our @replace) {
193194
if (defined $_) {
194195
print $c[1]." $OTHERS[14] "; print $c[10]."[$_]\n";
@@ -237,23 +238,23 @@ sub getHtml {
237238
}
238239
if ($data) {
239240
if (defined $post || ($method && $method eq "post")) {
240-
$response=$ua->post($URL, @defaultHeaders, Content => [$data]);
241+
$response=$ua->post($URL, Content => [$data]);
241242
}elsif (defined $mupload || ($mupload && $mupload eq "upload")) {
242-
$response=$ua->post($URL, @defaultHeaders, Content_Type => 'multipart/form-data', Content => [$data]);
243+
$response=$ua->post($URL, Content_Type => 'multipart/form-data', Content => [$data]);
243244
}elsif (defined $get || ($method && $method eq "get")) {
244245
$data=~s/\=>/\=/g; $data=~s/\,/&/g; $data=~s/\s//g;
245246
$data=~s/(\'|\")//g;
246247
$URL.="?".$data;
247248
$URL=~s/\s//g;
248-
$response=$ua->get($URL, @defaultHeaders);
249+
$response=$ua->get($URL);
249250
}
250251
}else{
251252
if (defined $post || ($method && $method eq "post")) {
252-
$response=$ua->post($URL, @defaultHeaders); }
253+
$response=$ua->post($URL); }
253254
elsif (defined $get || ($method && $method eq "get")) {
254-
$response=$ua->get($URL, @defaultHeaders);
255+
$response=$ua->get($URL);
255256
}else{
256-
$response=$ua->get($URL, @defaultHeaders);
257+
$response=$ua->get($URL);
257258
}
258259
}
259260
my $html=$response->decoded_content;

0 commit comments

Comments
 (0)