AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-571756

marcelo12's questions

Martin Hope
marcelo12
Asked: 2020-04-26 14:56:19 +0800 CST

Webmin 在尝试打开登录页面时显示普通 Perl 脚本

  • 0

当我尝试打开 webmin 登录页面“ https://192.168.1.13:10000 ”时,它显示如下纯 Perl 脚本,有什么问题?我正在运行 Ubuntu 18.04 和最新版本的 webmin。

#!/usr/bin/perl

#
# 正宗主题(https://github.com/authentic-theme/authentic-theme)
# 版权所有伊利亚·罗斯托夫采夫
# 在 MIT 下获得许可 (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE)
#
使用严格;

使用 File::Basename;

我们的 (%in, %gconfig, %tconfig, %text, $config_directory, $current_theme, %theme_text);

do(dirname(__FILE__) . "/authentic-lib.pl");

我的 %miniserv;
get_miniserv_config(\%miniserv);

我的 $charset = &get_charset();

# 检查添加错误处理程序
error_40x_handler();

我们的 %theme_config = (settings($config_directory . "/$current_theme/settings-admin", 'settings_'),
                     settings($config_directory . "/$current_theme/settings-root", 'settings_'));

# 显示登录前文本横幅
if ($gconfig{'loginbanner'} &&
    get_env('http_cookie') !~ /banner=1/ &&
    !$in{'注销'} &&
    !$in{'失败'} &&
    !$in{'timed_out'})
{

    print "Auth-type: auth-required=1\r\n";
    print "Set-Cookie: banner=1; path=/\r\n";
    &PrintHeader($charset);
    打印'', "\n";
    打印'', "\n";
    embed_login_head();
    打印 '' 。"\n";
    embed_overlay_prebody();
    打印
' 

' . "\n"; 我的 $url = $in{'page'}; 打开(横幅,$gconfig{'loginbanner'}); 尽管 () { s/LOGINURL/$url/g; 打印; } 关闭(横幅); &footer(); 返回; } 我的 $sec = lc(get_env('https')) eq 'on' ?“; 安全的” : ””; 我的 $sidname = $miniserv{'sidname'} || “西德”; print "Auth-type: auth-required=1\r\n"; print "Set-Cookie: banner=0; path=/$sec\r\n" if ($gconfig{'loginbanner'}); print "Set-Cookie: $sidname=x; path=/$sec\r\n" if ($in{'logout'}); print "Set-Cookie: redirect=1; path=/\r\n"; print "Set-Cookie: testing=1; path=/$sec\r\n"; &PrintHeader($charset); 打印'', "\n"; 打印'', "\n"; embed_login_head(); 打印 '' 。"\n"; embed_overlay_prebody(); 打印 '' 。"\n"; 如果(定义($in{'失败'})){ if ($in{'twofactor_msg'}) { 打印 ”

“,,”

\n"; 打印 '' 。"\n"; 打印' '。$theme_text{'login_warning'} 。 '
' 。&theme_text('session_twofailed', &html_escape($in{'twofactor_msg'})) 。"\n"; 打印 '' 。"\n"; } 别的 { 打印 '' 。"\n"; 打印' '。 $theme_text{'login_warning'} 。'
' 。"\n"; 打印 '' 。$theme_text{'theme_xhred_session_failed'} 。"\n"; 打印 '' 。"\n"; } } elsif ($in{'logout'}) { 打印 '' 。"\n"; 打印' '。$theme_text{'login_success'} 。'
' 。"\n"; 打印 '' 。$theme_text{'session_logout'} 。"\n"; 打印 '' 。"\n"; } elsif ($in{'timed_out'}) { 打印 '' 。"\n"; 打印' '。 $theme_text{'login_warning'} 。'
' 。"\n"; 打印 '' 。&theme_text('session_timed_out', int($in{'timed_out'} / 60)) 。"\n"; 打印 '' 。"\n"; } 打印 "$text{'session_prefix'}\n"; 打印 '' 。"\n"; 打印 ' ' . (&get_product_name() eq 'webmin' ? $theme_text{'theme_xhred_titles_wm'} : $theme_text{'theme_xhred_titles_um'} ) . '' 。"\n"; # 工艺标志 嵌入徽标(); # 登录信息 我的 $host; if ($gconfig{'realname'}) { $host = &get_display_hostname(); } 别的 { $host = get_env('server_name'); $host =~ s/:\d+//g; $host = &html_escape($host); } 打印 '' 。&theme_text('login_message') 。' ' 。$主机。'

' . "\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; if ($miniserv{'twofactor_provider'}) { 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; 打印 '' 。"\n"; } if (!$gconfig{'noremember'}) { 打印 ' ' . $theme_text{'login_save'} 。' ' . "\n"; } 打印 ''; 打印 ' ' 。 &theme_text('login_signin') 。'' 。"\n"; if ($text{'session_postfix'} =~ "href") { 我的 $link = get_link($text{'session_postfix'}, '丑陋'); 打印'[0]。'", "' . $链接->[1] 。 '", "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=500");return false;\' class="btn btn-warning"> ' . &theme_text('login_reset') . '' 。"\n"; } 打印 ''; 打印 '' 。"\n"; &footer();
ubuntu cgi perl login webmin
  • 1 个回答
  • 307 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve