Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/virtual-server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/webmin/virtual-server/create_newmysql.cgi
#!/usr/bin/perl
# Add a new MySQL or PostgreSQL clone module

require './virtual-server-lib.pl';
&can_edit_templates() || &error($text{'newmysqls_ecannot'});
&error_setup($text{'newmysqls_err'});
&ReadParse();

# Validate inputs
if ($in{'mode'} == 0) {
	&to_ipaddress($in{'host'}) || &error($text{'newmysqls_ehost'});
	&check_ipaddress($in{'host'}) && &error($text{'newmysqls_eip'});
	$host = $in{'host'};
	}
elsif ($in{'mode'} == 1) {
	$in{'sock'} =~ /^\/\S+$/ || &error($text{'newmysqls_esock'});
	$sock = $in{'sock'};
	}
if (!$in{'port_def'}) {
	$in{'port'} =~ /^\d+$/ || &error($text{'newmysqls_eport'});
	$port = $in{'port'};
	}
$in{'myuser'} =~ /^\S+$/ || &error($text{'newmysqls_euser'});
$user = $in{'myuser'};
$pass = $in{'mypass'};
$ssl = $in{'ssl'};

# Add the clone module
$mm = { 'minfo' => { },
	'config' => { 'host' => $host,
		      'port' => $port,
		      'login' => $user,
		      'pass' => $pass },
      };
if ($in{'type'} eq 'mysql') {
	# Add as MySQL module
	$mm->{'config'}->{'ssl'} = $ssl;
	$mm->{'config'}->{'sock'} = $sock;
	&create_remote_mysql_module($mm);

	# Check that the MySQL connection works, and delete if not
	$mod = $mm->{'minfo'}->{'dir'};
	&foreign_require($mod, "mysql-lib.pl");
	($ok, $err) = &foreign_call($mod, "is_mysql_running");
	if ($ok != 1) {
		&delete_remote_mysql_module($mm);
		&error(&text('newmysqls_econn', $err));
		}
	}
else {
	# Add as PostgreSQL module
	$sock && &error($text{'newmysqls_esock2'});
	$mm->{'config'}->{'sslmode'} = 'require' if ($ssl);
	&create_remote_postgres_module($mm);

	# Check that the connection works
	$mod = $mm->{'minfo'}->{'dir'};
	&foreign_require($mod, "postgresql-lib.pl");
	($ok, $err) = &foreign_call($mod, "is_postgresql_running");
	if ($ok != 1) {
		&delete_remote_postgres_module($mm);
		&error(&text('newmysqls_econn', $err));
		}
	}

&webmin_log("create", "newmysql", $host || $sock, $mm->{'config'});
&redirect("edit_newmysqls.cgi");


Youez - 2016 - github.com/yon3zu
LinuXploit