Skip to content

Commit 801d35f

Browse files
Add files via upload
1 parent 6b3c514 commit 801d35f

File tree

11 files changed

+263
-212
lines changed

11 files changed

+263
-212
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<table border="0" cellpadding="0" cellspacing="2" width="100%">
1212
<tr>
1313
<td width="100px" class="main2"><b>Tool:</b></td>
14-
<td width="780px" class="main2"><b>ATSCAN V 12.3.0 </b></td>
14+
<td width="780px" class="main2"><b>ATSCAN V 12.3.1 </b></td>
1515
</tr>
1616
<tr>
1717
<td width="100px" class="main2"><b>Codename:</b></td><td width="780px">4n0n4t</td>

inc/conf/configure.pl

+18-16
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## VERSION
1212
our ($Version, $logoVersion, $scriptUrl, $logUrl, $ipUrl, $conectUrl, $script, $scriptInstall, $script_bac, $scriptbash, $scriptv, $scriptCompletion, $scriptComplInstall, $readme, $uplog);
13-
$Version="12.3.0";
13+
$Version="12.3.1";
1414
$logoVersion="V $Version";
1515
$scriptUrl="https://raw.githubusercontent.com/AlisamTechnology/ATSCAN/master/atscan.pl";
1616
$logUrl="https://raw.githubusercontent.com/AlisamTechnology/ATSCAN/master/inc/conf/version.log";
@@ -29,6 +29,7 @@
2929
$scriptCompletion="/etc/bash_completion.d";
3030
$readme="/usr/share/doc/atscan";
3131
our $userSetting="$Bin/inc/conf/userSetting";
32+
our $deskIcon="$Bin/inc/conf/desktop/";
3233

3334
## DATE
3435
use POSIX qw(strftime);
@@ -49,6 +50,22 @@ sub deleteLists {
4950
require "$Bin/inc/theme/colors.pl";
5051
our @c=get_colors();
5152

53+
## USER CONFIGUATION
54+
our @configuration;
55+
sub get_configuration {
56+
@configuration=();
57+
if (-e $userSetting) {
58+
open(F1, $userSetting);
59+
while (my $set=<F1>) {
60+
if (!($set=~/^$/)) {
61+
push @configuration, $set;
62+
}
63+
}
64+
close( F1 );
65+
}
66+
return @configuration;
67+
}
68+
5269
## LOAD PAYLOADS
5370
require "$Bin/inc/payloads.pl";
5471
our @XSS=get_xss_payloads();
@@ -137,21 +154,6 @@ sub deleteLists {
137154
our @ERR=(@V_LFI, @V_XSS, @V_AFD, @E_MICROSOFT, @E_ORACLE, @E_DB2, @E_ODBC, @E_POSTGRESQL, @E_SYBASE, @E_JBOSSWEB, @E_JDBC, @E_JAVA, @E_PHP, @E_ASP, @E_UNDEFINED, @E_MARIADB, @E_SHELL);
138155
our @CMS=(@V_WP, @V_JOOM, @V_TP, @V_SMF, @V_PhpBB, @V_VB, @V_MyBB, @V_CF, @V_DRP, @V_PN, @V_AT, @V_PHPN, @V_MD, @V_ACM, @V_SS, @V_MX, @V_XO, @V_OSC, @V_PSH, @V_BB2, @V_MG, @V_ZC, @V_CC5, @V_OCR);
139156

140-
our @configuration=get_configuration();
141-
sub get_configuration {
142-
@configuration=();
143-
if (-e $userSetting) {
144-
open(F1, $userSetting);
145-
while (my $set=<F1>) {
146-
if (!($set=~/^$/)) {
147-
push @configuration, $set;
148-
}
149-
}
150-
close( F1 );
151-
}
152-
return @configuration;
153-
}
154-
155157
## MAIL VALIDATION
156158
our ($searchRegex, $regex);
157159
our $V_EMAIL='((([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6})';

inc/conf/userSetting

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
## Copy@right Alisam Technology see License.txt
22
## USER SETTING WILL BE STORED HERE !! DON'T DELETE !!
3-

inc/conf/version.log

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
VERSION 12.3 RELEASE
1+
VERSION 12.3.1 RELEASE
22
=====================================================
3-
CHANGES: 19/09/2017
3+
CHANGES: 22/09/2017
44
===================================================
5-
- Add interactive interface.
6-
- Add some missing arguments.
5+
- Add interactive interface to user config options.
6+
- Remove on/off options from use configuration.
77
- Enjoy!!
88
===================================================
99

inc/funcs.pl

+28-27
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ sub is_folder_empty {
2424
}
2525

2626
## USER PRE-CONFIGURATION
27-
our($userSetting, $proxy, $prandom, $password, $brandom, $mrandom, $zone, $motor, $nobanner, $beep, $timeout, $dateupdate, $activeUconf, $freq, $method, $checkVersion, $get, $post);
27+
our($userSetting, $proxy, $prandom, $password, $brandom, $mrandom, $zone, $motor, $nobanner, $beep, $timeout, $dateupdate, $freq, $method, $checkVersion, $get, $post, $SetInteractive,
28+
$scriptbash);
29+
##
2830
sub checkSetting {
2931
my $object=$_[0];
3032
my @ans;
@@ -67,40 +69,39 @@ sub getProx {
6769

6870
## DELETE USER SETTING
6971
sub deletSetting {
70-
our (@configuration, @LI2, $userSetting);
72+
my @config=get_configuration();
73+
our (@LI2, $userSetting);
7174
my $val=$_[0];
72-
for my $lines(@configuration) {
75+
unlink $userSetting;
76+
open FH, ">", $userSetting;
77+
for my $lines(@config) {
7378
if ($lines!~/^$val\s(.*)/) {
74-
push @LI2, $lines;
79+
print FH "$lines";
7580
}
7681
}
77-
unlink $userSetting; @configuration=();
78-
for my $lines2(@LI2) { printFile($userSetting, $lines2); }
82+
close FH;
7983
}
8084

8185
## CHECK USER CONFIGURATION
82-
$activeUconf=checkSetting("config");
8386
$password=checkSetting("password");
84-
85-
if ($activeUconf) {
86-
$proxy=checkSetting("proxy") if !defined $proxy;
87-
$prandom=checkSetting("proxy-random") if !defined $prandom;
88-
$payloads=checkSetting("payload") if !defined $payloads;
89-
$brandom=checkSetting("b-random") if !defined $brandom;
90-
$mrandom=checkSetting("m-random") if !defined $mrandom;
91-
$mlevel=checkSetting("level") if !defined $mlevel;
92-
$method=checkSetting("method") if !defined $get and !defined $post;
93-
$zone=checkSetting("zone");
94-
$motor=checkSetting("engine") if !defined $motor;
95-
$nobanner=checkSetting("nobanner") if !defined $nobanner;
96-
$noinfo=checkSetting("noinfo") if !defined $noinfo;
97-
$beep=checkSetting("beep") if !defined $beep;
98-
$ifend=checkSetting("ifend") if !defined $ifend;
99-
$unique=checkSetting("unique") if !defined $unique;
100-
$timeout=checkSetting("timeout") if !defined $timeout;
101-
$dateupdate=checkSetting("update");
102-
$freq=checkSetting("freq") if !defined $freq;
103-
}
87+
$SetInteractive=checkSetting("interactive");
88+
$proxy=checkSetting("proxy") if !defined $proxy;
89+
$prandom=checkSetting("proxy-random") if !defined $prandom;
90+
$payloads=checkSetting("payload") if !defined $payloads;
91+
$brandom=checkSetting("b-random") if !defined $brandom;
92+
$mrandom=checkSetting("m-random") if !defined $mrandom;
93+
$mlevel=checkSetting("level") if !defined $mlevel;
94+
$method=checkSetting("method") if !defined $get and !defined $post;
95+
$zone=checkSetting("zone") if !defined $zone;
96+
$motor=checkSetting("engine") if !defined $motor;
97+
$nobanner=checkSetting("nobanner") if !defined $nobanner;
98+
$noinfo=checkSetting("noinfo") if !defined $noinfo;
99+
$beep=checkSetting("beep") if !defined $beep;
100+
$ifend=checkSetting("ifend") if !defined $ifend;
101+
$unique=checkSetting("unique") if !defined $unique;
102+
$timeout=checkSetting("timeout") if !defined $timeout;
103+
$dateupdate=checkSetting("update");
104+
$freq=checkSetting("freq") if !defined $freq;
104105
## SET PROXY
105106
if (defined $proxy || $proxy) { @proxies=getProx($proxy); }
106107
if (defined $prandom || $prandom) { @proxies=getProx($prandom); }

inc/functions/clientConf.pl

+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
#!/usr/bin/perl
2+
use strict;
3+
use warnings;
4+
use FindBin '$Bin';
5+
use File::Copy qw(copy);
6+
## Copy@right Alisam Technology see License.txt
7+
8+
## USER CONFIGURATION SETTING
9+
our($config, $userSetting, $script_bac, @AUTH, @c);
10+
my @res=("proxy", "proxy-random", "show", "payload", "config", "m-random", "b-random", "zone", "timeout", "update", "engine", "nobanner",
11+
"noinfo", "beep", "ifend", "unique", "all", "config", "exit", "password", "freq", "level", "method", "interactive");
12+
my $res1=join("|", @res);
13+
my $x1="/usr/share/applications/atscan.desktop";
14+
my $x2="/usr/share/applications/atscan.desktop.back";
15+
our ($deskIcon, @l22, @l22bak);
16+
17+
sub ClientConfiguration {
18+
print $c[1]."[::] CONFIGURATION\n\n";
19+
if (-e $userSetting) {
20+
print $c[10];
21+
print " +---------------+-------------------------------------+--------------------+\n";
22+
print " | SHOW | SET | RESET |\n";
23+
print " +---------------+-------------------------------------+--------------------+\n";
24+
print " | | set interactive on (installed tool) | reset interactive |\n";
25+
print " | | set proxy <proxy> | reset proxy |\n";
26+
print " | | set proxy-random <proxy> | reset proxy-random |\n";
27+
print " | | set engine <option> | reset engine |\n";
28+
print " | | set timeout <in s> Default 10 | reset timeout |\n";
29+
print " | | set update <in days> Default 10 | reset update |\n";
30+
print " | | set password <password> | reset password |\n";
31+
print " | | set method <get/post> | reset method |\n";
32+
print " | show config | set freq <time in s> | reset freq |\n";
33+
print " | | set payload <payload> | reset payload |\n";
34+
print " | | set zone <zone> | reset zone |\n";
35+
print " | | set level <level> | reset level |\n";
36+
print " | | set b-random on | reset b-random |\n";
37+
print " | | set m-random on | reset m-random |\n";
38+
print " | | set nobanner on | reset nobanner |\n";
39+
print " | | set noinfo on | reset noinfo |\n";
40+
print " | | set beep on | reset beep |\n";
41+
print " | | set ifend on | reset ifend |\n";
42+
print " | | set unique on | reset unique |\n";
43+
print " | | | reset all |\n";
44+
print " +---------------+-------------------------------------+--------------------+\n";
45+
print "\n";
46+
47+
my $ps;
48+
my $finish = 0;
49+
while(!$finish) {
50+
my (@confReset, @confSet, @confShown)=();
51+
print $c[10]." [!] $AUTH[16]: ";
52+
$ps=<STDIN>;
53+
chomp ($ps);
54+
my @askMes=split(" ", $ps);
55+
my $xa=scalar(grep { defined $_} @askMes);
56+
if (($ps!~/$res1/) || (($ps=~/^set\s(.*)/ && $xa!=3) || ($ps=~/^(reset|show)\s(.*)/ && $xa!=2))) {
57+
print $c[4]." [!] $AUTH[14]\n";
58+
}
59+
####################################################################################################
60+
if ($ps eq "exit") {
61+
$finish++;
62+
}elsif ($ps=~/^set\s(.*)/) {
63+
my @askMes=split(" ", $ps);
64+
my $a=$askMes[1];
65+
my $b=$askMes[2];
66+
$b=~s/^'(.*)'$/$1/;
67+
$b=~s/^"(.*)"$/$1/;
68+
@confSet=get_configuration();
69+
for my $configuration(@confSet) {
70+
if ($configuration=~/$a\s(.*)/) {
71+
deletSetting($a);
72+
}
73+
}
74+
##################
75+
if ($a eq "interactive") {
76+
if (-e $x1) {
77+
copy $x1, $x2;
78+
unlink $x1;
79+
open(F23, $x2);
80+
@l22=<F23>;
81+
close(F23);
82+
open(F24, '>>', $x1);
83+
for my $l22(@l22) {
84+
$l22=~s/\"atscan\;/\"atscan --interactive\;/ig;
85+
print F24 "$l22\n";
86+
}
87+
close(F24);
88+
print $c[3]." [i] $a is Active!\n";
89+
}
90+
}
91+
##################
92+
if ($a eq "config") {
93+
if ($b eq "on") {
94+
printFile($userSetting, "config on config\n");
95+
print $c[3]." [i] Configuration is on! \n";
96+
}elsif ($b eq "off") {
97+
deletSetting("config");
98+
print $c[3]." [i] Configuration is off! \n";
99+
}
100+
##################
101+
}elsif ($a eq "password") {
102+
$b=Digest::MD5->md5_hex($b);
103+
printFile($userSetting, "password $b password\n");
104+
print $c[3]." [i] Password was set!\n";
105+
}else{
106+
if (-e $b) {
107+
open(F, $b);
108+
while (my $st=<F>) {
109+
unlink "$Bin/inc/conf/user/$a.txt" if -e "$Bin/inc/conf/user/$a.txt";
110+
printFile("$Bin/inc/conf/user/$a.txt", "$st\n");
111+
}
112+
close(F);
113+
printFile($userSetting, "$a $Bin/inc/conf/user/$a.txt $a");
114+
print $c[3]." [i] $a => $Bin/inc/conf/user/$a.txt \n";
115+
}else{
116+
printFile($userSetting, "$a $b $a");
117+
print $c[3]." [i] $a => $a \n";
118+
}
119+
}
120+
####################################################################################################
121+
}elsif ($ps=~/^reset\s(.*)/) {
122+
my @printConf2=split(" ", $ps);
123+
@confReset=get_configuration();
124+
if ($printConf2[1] eq "all") {
125+
for my $y(@res) {
126+
system "rm $Bin/inc/conf/user/$y.txt" if -e "$Bin/inc/conf/user/$y.txt";
127+
}
128+
unlink $userSetting;
129+
open FH, ">", $userSetting;
130+
for my $ln(@confReset) {
131+
if ($ln=~/^##/) {
132+
print FH "$ln";
133+
}
134+
}
135+
close FH;
136+
print $c[3]." [i] All configuration was reset! \n";
137+
}else{
138+
my $userfile="$Bin/inc/conf/user/$printConf2[1].txt";
139+
unlink $userfile if -e $userfile;
140+
deletSetting($printConf2[1]);
141+
142+
if ($printConf2[1] eq "interactive") {
143+
if (-e $x2 && -e $x1) {
144+
unlink $x1;
145+
copy $x2, $x1;
146+
unlink $x2;
147+
}
148+
}
149+
print $c[3]." [i] $printConf2[1] was reset!\n";
150+
}
151+
####################################################################################################
152+
}elsif ($ps=~/^show\sconfig/) {
153+
@confShown=get_configuration();
154+
my $a1=0;
155+
print $c[10]." +"."-" x 75 ."\n";
156+
print $c[10]." | $c[11]OPTION $c[10] | $c[11]VALUE\n";
157+
print $c[10]." +"."-" x 75 ."\n";
158+
for my $lines2(@confShown) {
159+
if ($lines2!~/(##|config)/) {
160+
$a1++;
161+
my @printConf3=split(" ", $lines2) if (!($lines2=~/^$/));
162+
my $length=length($printConf3[0]);
163+
my $addlength = 25 - $length;
164+
my $fname="$Bin/inc/conf/user/$printConf3[0].txt";
165+
if (-e $fname) {
166+
open(F4, $fname);
167+
while (my $st=<F4>) {
168+
print $c[10]." | $c[5]$printConf3[0]";
169+
print " " x $addlength;
170+
print $c[10]."| $st" if (!($st=~/^$/));
171+
}
172+
close(F4);
173+
}else{
174+
if ($printConf3[0] eq "password") {
175+
print $c[10]." | $c[5]$printConf3[0]";
176+
print " " x $addlength;
177+
print $c[10]."|********\n";
178+
}else{
179+
print $c[10]." | $c[5]$printConf3[0]";
180+
print " " x $addlength;
181+
print $c[10]."| $printConf3[1]\n";
182+
}
183+
}
184+
}
185+
}
186+
print $c[10]." | $c[4]$AUTH[11]\n" if $a1<1;
187+
print $c[10]." +"."-" x 75 ."\n\n";
188+
@confShown=();
189+
}
190+
(@confReset, @confSet, @confShown)=();
191+
}
192+
}else{
193+
print $c[2]." [!] $AUTH[15]\n"; logoff();
194+
}
195+
}
196+
####################################################################################################
197+
198+
1;

0 commit comments

Comments
 (0)