[NetworkManager-fortisslvpn] contrib/fortiserve: disable OTP by default
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-fortisslvpn] contrib/fortiserve: disable OTP by default
- Date: Tue, 26 Mar 2019 09:45:18 +0000 (UTC)
commit a4d08ced9145280d31b12c46409a885224358927
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Mon Mar 25 20:17:39 2019 +0100
contrib/fortiserve: disable OTP by default
Add an option to enable it.
contrib/fortiserve.pl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/contrib/fortiserve.pl b/contrib/fortiserve.pl
index 29b7b78..7fd1168 100755
--- a/contrib/fortiserve.pl
+++ b/contrib/fortiserve.pl
@@ -50,6 +50,7 @@ my $local = '0.0.0.0:10443';
my $cert = 'server.crt';
my $key = 'server.key';
my $pppd = 'pppd';
+my $otp = undef;
# Gereate a RFC 1662 (appendix C.1) FCS-16 table
sub fcs16
@@ -252,7 +253,7 @@ sub serve_request
if ($request->uri eq '/remote/logincheck') {
- if ($request->content =~ /code=/) {
+ if (not $otp or $request->content =~ /code=/) {
$response = new HTTP::Response (200 => 'OK', [], '');
$response->header ('Set-Cookie' => 'SVPNCOOKIE=something;');
} else {
@@ -353,6 +354,10 @@ F<antipppd.pl> to simulate actual Fortigate traffic.
Defaults to F<pppd>.
+=item B<--otp>
+
+Ask for a One-Time-Password.
+
=back
=cut
@@ -362,6 +367,7 @@ new Getopt::Long::Parser (config => ['no_ignore_case'])->getoptions (
'cert=s' => \$cert,
'key=s' => \$key,
'pppd=s' => \$pppd,
+ 'otp' => \$otp,
'h|help' => sub { pod2usage (-exitval => 0, -verbose => 1) },
'H|man' => sub { pod2usage (-exitval => 0, -verbose => 2) },
) or pod2usage (2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]