X7ROOT File Manager
Current Path:
/usr/libexec/webmin/pptp-client
usr
/
libexec
/
webmin
/
pptp-client
/
📁
..
📄
CHANGELOG
(448 B)
📄
backup_config.pl
(702 B)
📄
bootup.cgi
(863 B)
📄
config
(112 B)
📄
config.info
(274 B)
📄
config.info.ca
(310 B)
📄
config.info.de
(306 B)
📄
config.info.fr
(0 B)
📄
config.info.nl
(297 B)
📄
config.info.no
(292 B)
📄
config.info.pt_BR
(320 B)
📄
conn.cgi
(2.32 KB)
📄
disc.cgi
(543 B)
📄
edit.cgi
(6.59 KB)
📄
edit_opts.cgi
(1.43 KB)
📁
help
📁
images
📄
index.cgi
(2.69 KB)
📄
install_check.pl
(385 B)
📁
lang
📄
log_parser.pl
(733 B)
📄
module.info
(193 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(139 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(150 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(192 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(194 B)
📄
module.info.ca
(116 B)
📄
module.info.ca.auto
(13 B)
📄
module.info.cs
(24 B)
📄
module.info.cs.auto
(102 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(134 B)
📄
module.info.de
(121 B)
📄
module.info.de.auto
(13 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(216 B)
📄
module.info.es
(0 B)
📄
module.info.es.auto
(132 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(132 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(175 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(123 B)
📄
module.info.fr
(0 B)
📄
module.info.fr.auto
(137 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(134 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(130 B)
📄
module.info.hu
(0 B)
📄
module.info.hu.auto
(151 B)
📄
module.info.it
(0 B)
📄
module.info.it.auto
(133 B)
📄
module.info.ja
(0 B)
📄
module.info.ja.auto
(161 B)
📄
module.info.ko
(0 B)
📄
module.info.ko.auto
(156 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(133 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(136 B)
📄
module.info.ms
(118 B)
📄
module.info.ms.auto
(13 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(138 B)
📄
module.info.nl
(24 B)
📄
module.info.nl.auto
(111 B)
📄
module.info.no
(24 B)
📄
module.info.no.auto
(109 B)
📄
module.info.pl
(0 B)
📄
module.info.pl.auto
(128 B)
📄
module.info.pt
(0 B)
📄
module.info.pt.auto
(129 B)
📄
module.info.pt_BR
(28 B)
📄
module.info.pt_BR.auto
(110 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(130 B)
📄
module.info.ru
(0 B)
📄
module.info.ru.auto
(198 B)
📄
module.info.sk
(0 B)
📄
module.info.sk.auto
(124 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(128 B)
📄
module.info.sv
(0 B)
📄
module.info.sv.auto
(129 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(246 B)
📄
module.info.tr
(0 B)
📄
module.info.tr.auto
(139 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(194 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(244 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(150 B)
📄
module.info.zh
(0 B)
📄
module.info.zh.auto
(110 B)
📄
module.info.zh_TW
(0 B)
📄
module.info.zh_TW.auto
(119 B)
📄
pptp-client-lib.pl
(8.62 KB)
📄
save.cgi
(5.72 KB)
📄
save_opts.cgi
(910 B)
📄
secrets-lib.pl
(1.64 KB)
📄
start.pl
(779 B)
📄
stop.pl
(355 B)
Editing: edit.cgi
#!/usr/bin/perl # edit.cgi # Display a form for editing tunnel details require './pptp-client-lib.pl'; &ReadParse(); if ($in{'new'}) { &ui_print_header(undef, $text{'edit_title1'}, ""); } else { &ui_print_header(undef, $text{'edit_title2'}, ""); ($tunnel) = grep { $_->{'name'} eq $in{'tunnel'} } &list_tunnels(); &parse_comments($tunnel); $login = &find("name", $tunnel->{'opts'}); $sn = $login ? $login->{'value'} : &get_system_hostname(1); @secs = &list_secrets(); ($sec) = grep { $_->{'client'} eq $sn } @secs; } print "<form action=save.cgi method=post>\n"; print "<input type=hidden name=new value='$in{'new'}'>\n"; print "<input type=hidden name=old value='$in{'tunnel'}'>\n"; print "<table border width=100%>\n"; print "<tr $tb> <td><b>$text{'edit_header'}</b></td> </tr>\n"; print "<tr $cb> <td><table width=100%>\n"; print "<tr> <td><b>$text{'edit_name'}</b></td>\n"; printf "<td><input name=tunnel size=30 value='%s'></td>\n", $tunnel->{'name'}; print "<td><b>$text{'edit_server'}</b></td>\n"; printf "<td><input name=server size=20 value='%s'></td> </tr>\n", $tunnel->{'server'}; print "<tr> <td><b>$text{'edit_login'}</b></td>\n"; printf "<td nowrap><input type=radio name=login_def value=1 %s> %s\n", $login ? "" : "checked", $text{'edit_same'}; printf "<input type=radio name=login_def value=0 %s>\n", $login ? "checked" : ""; printf "<input name=login size=15 value='%s'></td>\n", $login->{'value'}; print "<td><b>$text{'edit_pass'}</b></td>\n"; printf "<td><input name=spass type=password value='%s'></td> </tr>\n", $sec->{'secret'}; $remote = &find("remotename", $tunnel->{'opts'}); print "<tr> <td><b>$text{'edit_remote'}</b></td>\n"; printf "<td nowrap><input type=radio name=remote_def value=1 %s> %s\n", $remote ? "" : "checked", $text{'edit_auto'}; printf "<input type=radio name=remote_def value=0 %s>\n", $remote ? "checked" : ""; printf "<input name=remote size=15 value='%s'></td>\n", $remote->{'value'}; print "</tr>\n"; # Show PPP include file $file = &find("file", $tunnel->{'opts'}); $fmode = $in{'new'} ? 1 : !$file ? 0 : $file->{'value'} eq $config{'pptp_options'} ? 1 : 2; print "<tr> <td><b>$text{'edit_file'}</b></td> <td colspan=3>\n"; printf "<input type=radio name=file_def value=0 %s> %s\n", $fmode == 0 ? "checked" : "", $text{'edit_none'}; printf "<input type=radio name=file_def value=1 %s> %s\n", $fmode == 1 ? "checked" : "", $text{'edit_global'}; printf "<input type=radio name=file_def value=2 %s> %s\n", $fmode == 2 ? "checked" : "", $text{'edit_ofile'}; printf "<input name=file size=30 value='%s'> %s</td> </tr>\n", $fmode == 2 ? $file->{'value'} : "", &file_chooser_button("file"); print "<tr> <td colspan=4><hr></td> </tr>\n"; # Parse all route comments foreach $r (@{$tunnel->{'routes'}}) { if ($r =~ /^\s*add\s+-net\s+(\S+)\s+netmask\s+(\S+)\s+gw\s+(\S+)\s*$/) { # Net route to specific gateway push(@kroutes, [ 1, $1, $2, $3 ]); } elsif ($r =~ /^\s*add\s+-net\s+(\S+)\s+gw\s+(\S+)\s+netmask\s+(\S+)\s*$/) { # Net route to specific gateway push(@kroutes, [ 1, $1, $3, $2 ]); } elsif ($r =~ /^\s*add\s+-net\s+(\S+)\s+netmask\s+(\S+)\s+dev\s+(TUNNEL_DEV)\s*$/) { # Net route to other end push(@kroutes, [ 1, $1, $2, 'GW' ]); } elsif ($r =~ /^\s*add\s+-net\s+(\S+)\s+dev\s+(TUNNEL_DEV)\s+netmask\s+(\S+)\s*$/) { # Net route to other end push(@kroutes, [ 1, $1, $3, 'GW' ]); } elsif ($r =~ /^\s*add\s+-host\s+(\S+)\s+gw\s+(\S+)\s*$/) { # Host route to specific gateway push(@kroutes, [ 2, $1, undef, $2 ]); } elsif ($r =~ /^\s*add\s+-host\s+(\S+)\s+dev\s+(TUNNEL_DEV)\s*$/) { # Host route to specific gateway push(@kroutes, [ 2, $1, undef, 'GW' ]); } elsif ($r =~ /^\s*add\s+default\s+gw\s+(\S+)\s*$/) { # Default route to specific gateway $adddef = $1; } elsif ($r =~ /^\s*add\s+default\s+dev\s+(TUNNEL_DEV)\s*$/) { # Default route to other end $adddef = 'GW'; } elsif ($r =~ /^\s*delete\s+default\s*$/) { # Deleting old default route $deldef = 1; } else { push(@uroutes, $r); } } # Show default route options print "<tr> <td><b>$text{'edit_adddef'}</b></td> <td colspan=3>\n"; printf "<input type=radio name=adddef value=1 %s> %s\n", $adddef eq "GW" ? "checked" : "", $text{'edit_def1'}; printf "<input type=radio name=adddef value=2 %s> %s\n", $adddef && $adddef ne "GW" ? "checked" : "", $text{'edit_def2'}; printf "<input name=def size=15 value='%s'>\n", $adddef eq "GW" ? "" : $adddef; printf "<input type=radio name=adddef value=0 %s> %s\n", $adddef ? "" : "checked", $text{'no'}; print "</td> </tr>\n"; print "<tr> <td><b>$text{'edit_deldef'}</b></td>\n"; printf "<td><input type=radio name=deldef value=1 %s> %s\n", $deldef ? "checked" : "", $text{'yes'}; printf "<input type=radio name=deldef value=0 %s> %s</td> </tr>\n", $deldef ? "" : "checked", $text{'no'}; # Show editable routes print "<tr> <td valign=top><b>$text{'edit_routes'}</b></td>\n"; print "<td colspan=3><table border width=100%>\n"; print "<tr $tb> <td><b>$text{'edit_type'}</b></td> ", "<td><b>$text{'edit_net'}</b></td> ", "<td><b>$text{'edit_mask'}</b></td> ", "<td><b>$text{'edit_gw'}</b></td> </tr>\n"; $i = 0; foreach $r (@kroutes, [ 0, undef, undef, 'GW' ]) { print "<tr $cb>\n"; print "<td><select name=type_$i>\n"; foreach $o (0 .. 2) { printf "<option value=%d %s>%s</option>\n", $o, $r->[0] == $o ? "selected" : "", $text{'edit_type'.$o}; } print "</select></td>\n"; print "<td><input name=net_$i size=15 value='$r->[1]'></td>\n"; print "<td><input name=mask_$i size=15 value='$r->[2]'></td>\n"; printf "<td nowrap><input type=radio name=gw_def_$i value=1 %s> %s\n", $r->[3] eq 'GW' ? "checked" : "", $text{'edit_gw_def'}; printf "<input type=radio name=gw_def_$i value=0 %s>\n", $r->[3] eq 'GW' ? "" : "checked"; printf "<input name=gw_$i size=15 value='%s'></td>\n", $r->[3] eq 'GW' ? "" : $r->[3]; print "</tr>\n"; $i++; } print "</table></td> </tr>\n"; # Show other route commands print "<tr> <td valign=top><b>$text{'edit_unknown'}</b></td>\n"; print "<td colspan=3><textarea name=unknown rows=3 cols=60>", join("\n", @uroutes),"</textarea></td> </tr>\n"; print "<tr> <td colspan=4><hr></td> </tr>\n"; # Show MPPE options print "<tr> <td colspan=4 align=center>$text{'opts_msdesc'}</td> </tr>\n"; &mppe_options_form($tunnel->{'opts'}); print "</table></td></tr></table>\n"; print "<table width=100%><tr>\n"; if ($in{'new'}) { print "<td><input type=submit value='$text{'create'}'></td>\n"; } else { print "<td><input type=submit value='$text{'save'}'></td>\n"; print "<td align=right><input type=submit name=delete ", "value='$text{'delete'}'></td>\n"; } print "</tr></table>\n"; &ui_print_footer("", $text{'index_return'});
Upload File
Create Folder