Server IP : 195.201.23.43 / Your IP : 18.222.193.130 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/usermin/telnet/ |
Upload File : |
#!/usr/bin/perl # index.cgi # Display the telnet applet require '../web-lib.pl'; use Socket; &init_config(); require '../ui-lib.pl'; &switch_to_remote_user(); &create_user_config_dirs(); $theme_no_table = 1 if ($userconfig{'sizemode'} == 1); &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); # Are we running SSH or telnet $telnet_port = $config{'telnet_port'} || 23; $ssh_port = $config{'ssh_port'} || 22; $port = $ssh_port; $mode = 1; socket(STEST, PF_INET, SOCK_STREAM, getprotobyname("tcp")); $rv = connect(STEST, pack_sockaddr_in($ssh_port, inet_aton("127.0.0.1"))); close(STEST); if (!$rv) { $port = $telnet_port; $mode = 0; $rv = connect(STEST, pack_sockaddr_in($telnet_port, inet_aton("127.0.0.1"))); close(STEST); } if (!$rv) { print "<p>$text{'index_econnect'}<p>\n"; } else { print "<center>\n"; if ($userconfig{'detach'}) { $w = 100; $h = 50; } elsif ($userconfig{'sizemode'} == 2 && $userconfig{'size'} =~ /^(\d+)\s*x\s*(\d+)$/) { $w = $1; $h = $2; } elsif ($userconfig{'sizemode'} == 1) { $w = "100%"; $h = "80%"; } else { $w = 590; $h = 360; } $jar = "jta26.jar"; print "<applet archive=\"$jar\" code=de.mud.jta.Applet ", "width=$w height=$h>\n"; printf "<param name=config value=%s>\n", $mode ? "ssh.conf" : "telnet.conf"; print "$text{'index_nojava'} <p>\n"; if ($userconfig{'sizemode'}) { print "<param name=Terminal.resize value='screen'>\n"; } if ($userconfig{'fontsize'}) { print "<param name=Terminal.fontSize value='$userconfig{'fontsize'}'>\n"; } if ($userconfig{'detach'}) { print "<param name=Applet.detach value='true'>\n"; print "<param name=Applet.detach.stopText value='Disconnect'>\n"; } if ($config{'port'}) { print "<param name=Socket.port value=$port>\n"; } print "<param name=Socket.host value=$ENV{'SERVER_NAME'}>\n"; print "</applet><br>\n"; print &text('index_credits', "http://www.mud.de/se/jta/"),"<br>\n"; if ($mode) { print &text('index_sshcredits', "http://www.systemics.com/docs/cryptix/"),"<br>\n"; } print "</center>\n"; } &ui_print_footer("/", $text{'index'});Private