Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

#!/usr/bin/php <?php goto U5Nm2; fwBZj: $license_id = License::getLicenseID(); goto p..

Decoded Output download

#!/usr/bin/php  
<?php  
 goto U5Nm2; fwBZj: $license_id = License::getLicenseID(); goto p4DxD; SKTM1: sql_query_nostop("UPDATE nas SET controller = temp_controller"); goto sFsct; XtIcA: $freeradius_version = Freeradius::Version(); goto iowWP; F6836: if (!(version_compare($local_firmwareversion, "8.5.0") < 0)) { goto X0StH; } goto Wb3U1; zvT1g: sVuZJ: goto n6vNG; kz318: exec("touch /var/log/named/queries.log; chown bind /var/log/named/queries.log; chgrp bind /var/log/named/queries.log"); goto JsfF7; Iu2Sh: exec("cp /home/portal/config/freeradius30/sqlcounter   /etc/freeradius/3.0/mods-available/sqlcounter"); goto xayYU; Jqds_: sql_query_nostop("DELETE FROM operators_acl;"); goto zqW4l; L68k9: sql_query(" 
		ALTER TABLE loginpage 
		ADD login_btnsignup varchar(64) DEFAULT 'Sign Up' after login_signup_in_mainpage 
 "); goto sjjaT; tGSso: sql_query("UPDATE dictionary SET attribute = 'Max-All-Octets' WHERE attribute = 'Max-Octets'"); goto oFoVX; eP5mN: sql_query_nostop("ALTER TABLE nas ADD parentid int(10) after controller"); goto Q96E9; iowWP: if (version_compare($freeradius_version, "3.0.0") < 0) { goto sVuZJ; } goto buu1p; eOQUL: sql_query_nostop("ALTER TABLE userinfo CHANGE COLUMN gender_na temp_gender_na SMALLINT"); goto kFF2t; QKzWj: if (!(strpos($localStructure, ""birthdate","gender_na"") !== false)) { goto X19v8; } goto TsAX2; xIYBh: $operators = Operator::GetAllOperators(); goto pRMbW; s3PDb: $local_firmwareversion = License::GetOwnFirmwareVersion(); goto x3a0p; N0kdu: if (!(version_compare($local_firmwareversion, "9.2.0") < 0)) { goto vXCEt; } goto AXHKo; Qu31J: if (!(version_compare($local_firmwareversion, "8.6.0") < 0)) { goto nBkMT; } goto L68k9; rQ6EO: require_once "Apache.inc.php"; goto srR_D; AQkrR: sql_query_nostop("ALTER TABLE operators_acl_files ADD description varchar(1024) NOT NULL default '' after resource;"); goto hYN2A; FfuHD: exec("cp /home/portal/config/freeradius30/default      /etc/freeradius/3.0/sites-available/default"); goto Mca7f; NPe8S: exec("cp /home/portal/config/default         /etc/freeradius/sites-available/default"); goto erWzN; fv0WN: if (!(version_compare($local_firmwareversion, "9.0.0") < 0)) { goto vuUTm; } goto pK8uD; jdGw0: if (version_compare($freeradius_version, "3.0.0") < 0) { goto z7PK1; } goto GXpkH; zW89m: sql_query_nostop("INSERT INTO settings (id, name, value) VALUES 
 	(501,	'Voucher Creation - Default Profile',	  ''), 
  (502, 'Voucher Creation - Name Mode', 	 	 '2'), 
	 (503, 'Voucher Creation - Name Static Part',		 'wifigem'), 
	 (504, 'Voucher Creation - Sequential length',  	'6'), 
	 (505, 'Voucher Creation - Random string length', 	'6'), 
 	(506,	'Voucher Creation - Random number length',		'6'), 
		(507, 'Voucher Creation - Last sequential',   '0') 
  ; 
	"); goto BTdnU; tq02M: mVyUI: goto kTiGJ; iANdK: DHSFC: goto eOQUL; buu1p: exec("cp /home/portal/config/freeradius30/default     /etc/freeradius/3.0/sites-available/default"); goto Aq9Zu; GXpkH: exec("cp /home/portal/config/freeradius30/default      /etc/freeradius/3.0/sites-available/default"); goto Iu2Sh; c316K: sql_query_nostop("ALTER TABLE nas CHANGE COLUMN controller temp_controller SMALLINT"); goto vuThQ; oFoVX: sql_query("UPDATE dictionary_smart SET maxval =  '100000000000' WHERE attribute = 'Max-Daily-Octets'"); goto pFkYS; sOo25: MXB7h: goto vvOa4; LD3ja: BK5pk: goto GY9vg; hVSI0: X0StH: goto Qu31J; wR17c: exec("apt-get --assume-yes install php7.4-mbstring >/dev/null 2>&1"); goto rQ6EO; ZDXir: $sql = " 
 INSERT INTO operators_acl_files 
 ( file, 			category, 	   section, 					 resource,    description) 
 VALUES 
 ('dashboard',  'Dashboard',	  '',  			 	 'dashboard',	 'Administration home page'), 
	('nas', 	 	'Access Points',  'Devices', 	    'nas_manage', 	'Access point management'), 
 ('nas', 	  'Access Points', 	'Devices', 	 	  'nas_stats',		'Access point statistics'), 
	('nasgroup',	 'Access Points',	 'Groups',				 	'nasgroup',   'Access point group management'), 
	('nassearch', 	'Access Points',	 'Search & Recovery',			'nassearch',  'Access point search (deprecated)'), 
 ('profile', 		'Profiles', 	  '', 		   	 'profile_manage', 'Profile management'), 
	('profile',   'Profiles',    '',					 		'profile_users', 'Users associated to a profile'), 
 ('user',   'User Authentication',	'User List',	    'user_manage',		'User management'), 
 ('user',	  'User Authentication', 'User List', 	  	'user_profiles', 'Profiles associated to a user'), 
	('user',	  'User Authentication', 'User List',    	'user_ap',	  'Access point groups associated to a user'), 
	('user',		 'User Authentication', 'User List', 	 		'user_stats',  'User statistics'), 
	('macauth',  	'User Authentication',	'MAC Address Authentication',	'macauth', 	 'MAC address accounts management'), 
 ('fastuser',		'User Authentication', 'Fast Creation', 			'fastuser',   'Fast user creation'), 
 ('anonymuser',	 'User Authentication', 'Anonymous Users',				'anonymuser',	 'Configure anonymous accounts'), 
	('ldap',	  'User Authentication',	'LDAP Authentication', 		'ldap',   	'Configure LDAP authentication'), 
	('signup',  	'User Authentication', 'Self Sign Up',		 	 'signup',			'Configure self sign-up'), 
 ('social', 		'User Authentication',	'Customize Social Login',  'social',	  'Configure social media login'), 
 ('loginpage',	 'Login Pages',		 '',			  	 	'loginpage',  'Login page management'), 
	('stats_topusers',	'Statistics',		 'Top Users',	  	 'stats_topusers', 'Statistics - top users'), 
 ('stats_byuser', 'Statistics', 		'By User',		  	 'stats_byuser', 	'Statistics - by user'), 
 ('stats_summary',	'Statistics',  	'Summary',  	   'stats_summary', 'Statistics - total and average values'), 
	('stats_topnas',	'Statistics',			'Top Access Points', 		'stats_topnas', 	'Statistics - top access points'), 
	('webfilter',		'Web Filter',  	'',	    			'webfilter',		'Web filter configuration'), 
	('traffic',  	'Traffic Control',	 '',			 	  	'traffic',			'Traffic control configuration'), 
	('license',	  'Maintenance',	  'License Management',			'license', 		'License information'), 
	('certificates',	'Maintenance',		 'Certificates',  	  'certificates',  'Site certificates'), 
 ('export',  	'Maintenance',   'Import - Export', 			'export',	  'import - export data'), 
 ('operator',  'Maintenance',			'Operators',	    'operator',   'System operators and ACL'), 
 ('database_backup', 'Maintenance',  	'Backup - Restore', 		 'database_backup', 'Backup - restore database'), 
 ('database_cleanup','Maintenance',	  'Database Housekeeping',	 'database_cleanup',	'Configure database cleanup'), 
	('network',	  'System Configuration',	'Network Settings',		 	'network',		 'Configure network settings'), 
 ('networktools', 'System Configuration',	'Network Tools', 	 	'networktools',	 'Use network tools'), 
 ('smtp',	  'System Configuration', 'Email Setup', 	 	 'smtp',	 	 'Configure email sender'), 
	('datetime',  'System Configuration', 'Date, Time & Time Zone',	 'datetime',	  'Configure date, time and time zone'), 
 ('apisetup',	 'System Configuration', 'REST API',		 	 	'apisetup',	  'Configure REST API ID and secret'), 
 ('branding',	 'System Configuration', 'Product Branding', 	  'branding',	 	'Manage product branding - white label') 
 
	; 
"; goto hY2ap; FZSUS: amPR4: goto MXMNn; gdWHR: sql_query("UPDATE dictionary_smart SET maxval = '9000000000000' WHERE attribute = 'Max-All-Octets'"); goto P1pfL; P1pfL: j57l4: goto F6836; jmW8a: foreach ($operators as $row) { goto pPDWh; KpZcK: $acl = new Acl($row["id"]); goto zFGab; zFGab: $acl->Create($accesslist); goto m_c5X; m_c5X: Ff3w6: goto ovgav; LaIX_: $accesslist = array(array("function" => "voucher", "access" => "{$access}")); goto KpZcK; pPDWh: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_NONE; goto LaIX_; ovgav: } goto FZSUS; Q96E9: sql_query_nostop("CREATE INDEX parentid ON nas (parentid);"); goto T5B0d; IoJyw: vXCEt: goto sSAHD; srR_D: Apache::Restart(); goto DlvYR; zqg6c: sql_query_nostop(" 
		ALTER TABLE userinfo 
 	ADD securitycode varchar(20) default '' after enableportallogin, 
		ADD securitycode_expiry timestamp after securitycode 
	"); goto Y3YJn; kTzcO: if (!(sql_fetch_scalar("SELECT count(*) FROM operators_acl_files WHERE file = 'voucher'") == 0)) { goto DHSFC; } goto PZpjL; yzJ_g: sql_query_nostop("INSERT INTO operators_acl_files 
	 	  ( file, category, section, resource, description) 
	 	  VALUES 
    	('stats_webaccess', 'Web Access', 'Access Log', 'stats_webaccess', 'Report on Web Access') 
			 	"); goto Q67XZ; N7M16: sql_query_nostop("ALTER TABLE operators_acl CHANGE file resource varchar(128) NOT NULL;"); goto JAe2n; REoWn: require_once "database.inc.php"; goto s3PDb; UC3YW: sql_query_nostop("ALTER TABLE operators_acl_files ADD resource varchar(128) NOT NULL default '' after section;"); goto AQkrR; dvL3F: exec("cp /home/portal/config/named.conf.options          /etc/bind/named.conf.options"); goto yrDFJ; S0jV6: sql_query_nostop("CREATE INDEX resource_operator_id ON operators_acl (resource,operator_id);"); goto UC3YW; jtd6F: require_once "Freeradius.inc.php"; goto FfuHD; pFkYS: sql_query("UPDATE dictionary_smart SET maxval =  '400000000000' WHERE attribute = 'Max-Weekly-Octets'"); goto QDIdO; n6vNG: exec("cp /home/portal/config/default                  /etc/freeradius/sites-available/default"); goto ommkF; fh6K6: X19v8: goto U633u; HzIgk: si03l: goto N0kdu; Xcl3K: ym1N2: goto LJEV6; Eha7t: z7PK1: goto NPe8S; Mca7f: exec("cp /home/portal/config/freeradius30/sqlcounter   /etc/freeradius/3.0/mods-available/sqlcounter"); goto zW89m; T5B0d: sql_query_nostop("ALTER TABLE license ADD demo varchar(64) DEFAULT '' AFTER trial"); goto sOo25; qIbJ2: Freeradius::Restart(); goto tGSso; R3_Ye: exec("service bind9 restart"); goto pUNhV; zBMTZ: hq_CQ: goto wgWdP; LJEV6: if (!(version_compare($local_firmwareversion, "8.4.0") < 0)) { goto j57l4; } goto Wl592; IcsQ_: exec("apt-get --assume-yes install php-mbstring >/dev/null 2>&1"); goto wR17c; vuThQ: sql_query_nostop("ALTER TABLE nas ADD controller SMALLINT NOT NULL default 0 after codesnippet"); goto SKTM1; VF_l3: if (!(version_compare($local_firmwareversion, "9.5.3") < 0 && $license_id == "LA99cxUf5D")) { goto SoDKE; } goto aIC1f; q3Fo5: exec("cp /home/portal/config/db.blacklist                /etc/bind/db.blacklist"); goto mWdIk; jPtra: GA4M3: goto TQp4K; xK_10: sql_query("INSERT INTO operators_acl (operator_id, resource, access) 
		  SELECT operators.id, 'stats_conns', CASE WHEN operators.admin = 1 THEN 2 ELSE 1 END 
	 	 FROM operators 
   "); goto hVSI0; PZm2a: vuUTm: goto MMEH3; TeA1m: CI0uK: goto tq02M; xayYU: goto EtpUr; goto Eha7t; st9Y2: require_once "log.inc.php"; goto Ckqpw; VWWdE: sql_query_nostop("UPDATE userinfo SET gender_na = temp_gender_na"); goto MmW4P; MMEH3: if (!(version_compare($local_firmwareversion, "9.1.0") < 0)) { goto si03l; } goto XwfSI; auqus: sql_query_nostop(" 
		UPDATE loginmode SET description='A Voucher or Customer ID is required to login. This login method is applicable to both users who self-registered using a Customer ID and to Vouchers. It is compatible with Username/Password.' 
 	WHERE name='Customer ID'"); goto kTzcO; mYmUN: Freeradius::Restart(); goto IoJyw; mWdIk: exec("mkdir /var/log/named; chown bind /var/log/named; chgrp bind /var/log/named"); goto kz318; sFsct: sql_query_nostop("ALTER TABLE nas DROP COLUMN temp_controller"); goto TeA1m; hHtxl: $operators = Operator::GetAllOperators(); goto jmW8a; ommkF: exec("cp /home/portal/config/dictionary.chillispot    /usr/share/freeradius/dictionary.chillispot"); goto RD_Z4; kTiGJ: $license_id = License::getLicenseID(); goto VF_l3; erWzN: exec("cp /home/portal/config/counter.conf    /etc/freeradius/sql/mysql/counter.conf"); goto aTB6x; n2xmQ: sql_query_nostop("INSERT INTO operators_acl_files 
	    ( file, category, section, resource, description) 
		  	VALUES 
  	  ('voucher', 'User Authentication', 'Vouchers', 'voucher', 'Configure and manage vouchers') 
 	  	"); goto hHtxl; JsfF7: exec("chmod 744 /var/log/named/queries.log"); goto R3_Ye; P73_2: myOlo: goto jPtra; zqW4l: $operators = Operator::GetAllOperators(); goto U3IRU; tfUku: if (!($days == -1)) { goto BK5pk; } goto gXR1j; dmsaB: sql_query_nostop(" 
 	UPDATE loginmode SET description='A Voucher or Customer ID is required to login. This login method is applicable to both users who self-registered using a Customer ID and to Vouchers. It is compatible with Username/Password.' 
  WHERE name='Customer ID'"); goto n2xmQ; x3a0p: $ubuntu20 = SystemStatus::OsVersionIsAtleast20(); goto GtuWP; sSAHD: if (!(version_compare($local_firmwareversion, "9.3.0") < 0)) { goto Lu30i; } goto fwBZj; U633u: if (!(strpos($localStructure, ""created","controller"") !== false)) { goto CI0uK; } goto c316K; JAe2n: sql_query_nostop("CREATE INDEX operator_id_resource ON operators_acl (operator_id,resource);"); goto S0jV6; GtuWP: if (!(version_compare($local_firmwareversion, "8.1.0") < 0)) { goto GA4M3; } goto N7M16; Y3YJn: exec("rm -f /var/www/html/login/templates/fonts/fontawesome-webfont.*"); goto aufgW; hYN2A: sql_query_nostop("CREATE INDEX resource ON operators_acl_files (resource);"); goto allpo; yrDFJ: exec("cp /home/portal/config/named.conf.local            /etc/bind/named.conf.local"); goto q3Fo5; sDuM0: sql_query_nostop("ALTER TABLE nas ADD location varchar(256) NOT NULL default '' after description"); goto bilR7; allpo: sql_query_nostop("DELETE FROM operators_acl_files;"); goto ZDXir; gXR1j: sql_query("UPDATE cleanup SET days = 90 WHERE id = 6"); goto LD3ja; U3IRU: foreach ($operators as $row) { goto RB4jU; xE9PC: $acl->Create($acl->GetDefaultAccessList($role)); goto QAk1h; Xv6GG: $acl = new Acl($row["id"]); goto xE9PC; RB4jU: $role = $row["admin"] == "1" ? Operator::ROLE_ADMIN : Operator::ROLE_OPERATOR; goto Xv6GG; QAk1h: v4QPd: goto I8FeK; I8FeK: } goto P73_2; vvOa4: if (!(version_compare($local_firmwareversion, "8.3.0") < 0)) { goto ym1N2; } goto sDuM0; MXMNn: Lu30i: goto XVQma; U5Nm2: require_once "all.inc.php"; goto st9Y2; Rloxu: sql_query_nostop("ALTER TABLE userinfo DROP COLUMN temp_gender_na"); goto fh6K6; XVQma: if (!(version_compare($local_firmwareversion, "9.5.1") < 0)) { goto mVyUI; } goto RAgWQ; z42Jh: $freeradius_version = Freeradius::Version(); goto jdGw0; rsBfx: $localStructure = json_encode($localStructure); goto QKzWj; TsAX2: sql_query_nostop("ALTER TABLE userinfo CHANGE COLUMN gender_na temp_gender_na SMALLINT"); goto ishfr; xAxtr: foreach ($operators as $row) { goto nl6De; db7p1: tVA11: goto wza9n; wV3tS: $acl = new Acl($row["id"]); goto aV1sm; SksB7: $accesslist = array(array("function" => "stats_webaccess", "access" => "{$access}")); goto wV3tS; nl6De: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_READ; goto SksB7; aV1sm: $acl->Create($accesslist); goto db7p1; wza9n: } goto zBMTZ; sjjaT: nBkMT: goto kuKua; GY9vg: sql_query_nostop("UPDATE operators_acl_files SET 
 	   	category='Web Access', section='Web Filter' 
 	  	 WHERE file = 'webfilter'"); goto yzJ_g; bilR7: sql_query_nostop("ALTER TABLE nas ADD created datetime NOT NULL DEFAULT now() after parentid"); goto Xcl3K; Ih2dg: goto nqw1G; goto zvT1g; BTdnU: sql_query_nostop(" 
	 INSERT INTO settings_license (license_id, id, name, value) 
	 SELECT '{$license_id}' as license_id, id, name, value FROM settings 
 	 WHERE (id >= 501 AND id <= 507) 
	"); goto auqus; aufgW: exec("rm -f /var/www/html/layout/fonts/fontawesome-webfont.*"); goto HzIgk; MmW4P: sql_query_nostop("ALTER TABLE userinfo DROP COLUMN temp_gender_na"); goto wj0B2; XwfSI: sql_query_nostop(" 
		ALTER TABLE loginpage 
	 ADD login_forgotpassword tinyint DEFAULT 0 after login_background 
	"); goto zqg6c; RAgWQ: Database::CheckStructure($localStructure); goto rsBfx; PZpjL: sql_query_nostop("INSERT INTO operators_acl_files 
 	    ( file, category, section, resource, description) 
				 	VALUES 
	  			('voucher', 'User Authentication', 'Vouchers', 'voucher', 'Configure and manage vouchers') 
			  	"); goto xIYBh; TQp4K: if (!(version_compare($local_firmwareversion, "8.2.0") < 0)) { goto MXB7h; } goto JXQyo; Q67XZ: $operators = Operator::GetAllOperators(); goto xAxtr; pUNhV: $days = sql_fetch_scalar("SELECT days FROM cleanup WHERE id = 6"); goto tfUku; D1ruX: require_once "Freeradius.inc.php"; goto z42Jh; RD_Z4: nqw1G: goto qIbJ2; kFF2t: sql_query_nostop("ALTER TABLE userinfo ADD gender_na SMALLINT NOT NULL default 0 after gender"); goto VWWdE; kuKua: if (!(version_compare($local_firmwareversion, "8.7.0") < 0)) { goto FWAgI; } goto dvL3F; Wb3U1: sql_query("INSERT INTO operators_acl_files 
 	( file, 		 category,  		 section,   	   resource, 	 	description) 
 	VALUES 
 	('stats_conns',		'Statistics', 	 'Connections by Date', 		'stats_conns',	 'Statistics - connections by date') 
	"); goto xK_10; wj0B2: Freeradius::Restart(); goto iNKYR; QDIdO: sql_query("UPDATE dictionary_smart SET maxval = '1000000000000' WHERE attribute = 'Max-Monthly-Octets'"); goto gdWHR; pK8uD: if (!$ubuntu20) { goto GdU8Q; } goto lXhX1; lXhX1: exec("apt-get --assume-yes update >/dev/null 2>&1"); goto IcsQ_; aIC1f: sql_query_nostop(" 
		ALTER TABLE radacct 
	 	ADD acctsessiontime_h24 int(12) unsigned default 0, 
 	 ADD acctinputoctets_h24 bigint(20) default 0 after acctsessiontime_h24, 
   ADD acctoutputoctets_h24 bigint(20) default 0 after acctinputoctets_h24 
		; 
	"); goto jtd6F; pRMbW: foreach ($operators as $row) { goto bzUcx; aTBLr: $acl = new Acl($row["id"]); goto jO135; sEUtA: $accesslist = array(array("function" => "voucher", "access" => "{$access}")); goto aTBLr; Hx300: VDfuX: goto pBbiN; jO135: $acl->Create($accesslist); goto Hx300; bzUcx: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_NONE; goto sEUtA; pBbiN: } goto kyv_n; AXHKo: sql_query_nostop(" 
		ALTER TABLE radacct 
		 ADD acctsessiontime_h24 int(12) unsigned default 0, 
   ADD acctinputoctets_h24 bigint(20) default 0 after acctsessiontime_h24, 
   ADD acctoutputoctets_h24 bigint(20) default 0 after acctinputoctets_h24 
	 ; 
	"); goto D1ruX; Aq9Zu: exec("cp /home/portal/config/dictionary.chillispot    /usr/share/freeradius/dictionary.chillispot"); goto Ih2dg; iNKYR: SoDKE: goto SXxd0; bkXxd: sql_query_nostop(" 
		INSERT INTO settings_license (license_id, id, name, value) 
  SELECT '{$license_id}' as license_id, id, name, value FROM settings 
   WHERE (id >= 501 AND id <= 507) 
	"); goto dmsaB; p4DxD: sql_query_nostop("INSERT INTO settings (id, name, value) VALUES 
	 (501,	'Voucher Creation - Default Profile',		 ''), 
		(502, 'Voucher Creation - Name Mode',	 		 '2'), 
  (503,	'Voucher Creation - Name Static Part',  	'wifigem'), 
	 (504,	'Voucher Creation - Sequential length', 	 '6'), 
  (505, 'Voucher Creation - Random string length',  '6'), 
	 (506,	'Voucher Creation - Random number length', 	'6'), 
  (507,	'Voucher Creation - Last sequential',  	'0') 
  ; 
	"); goto bkXxd; ishfr: sql_query_nostop("ALTER TABLE userinfo ADD gender_na SMALLINT NOT NULL default 0 after gender"); goto fqzDd; kyv_n: ThhBl: goto iANdK; JXQyo: sql_query_nostop("ALTER TABLE nas ADD controller SMALLINT NOT NULL default 0 after codesnippet"); goto eP5mN; aTB6x: EtpUr: goto mYmUN; DlvYR: GdU8Q: goto PZm2a; Ckqpw: require_once "SystemStatus.inc.php"; goto REoWn; fqzDd: sql_query_nostop("UPDATE userinfo SET gender_na = temp_gender_na"); goto Rloxu; Wl592: require_once "Freeradius.inc.php"; goto XtIcA; wgWdP: FWAgI: goto fv0WN; hY2ap: sql_query_nostop($sql); goto Jqds_; SXxd0: exit(0);  ?>

Did this file decode correctly?

Original Code

#!/usr/bin/php 
<?php 
 goto U5Nm2; fwBZj: $license_id = License::getLicenseID(); goto p4DxD; SKTM1: sql_query_nostop("UPDATE nas SET controller = temp_controller"); goto sFsct; XtIcA: $freeradius_version = Freeradius::Version(); goto iowWP; F6836: if (!(version_compare($local_firmwareversion, "8.5.0") < 0)) { goto X0StH; } goto Wb3U1; zvT1g: sVuZJ: goto n6vNG; kz318: exec("touch /var/log/named/queries.log; chown bind /var/log/named/queries.log; chgrp bind /var/log/named/queries.log"); goto JsfF7; Iu2Sh: exec("cp /home/portal/config/freeradius30/sqlcounter   /etc/freeradius/3.0/mods-available/sqlcounter"); goto xayYU; Jqds_: sql_query_nostop("DELETE FROM operators_acl;"); goto zqW4l; L68k9: sql_query("
		ALTER TABLE loginpage
		ADD login_btnsignup varchar(64) DEFAULT 'Sign Up' after login_signup_in_mainpage
 "); goto sjjaT; tGSso: sql_query("UPDATE dictionary SET attribute = 'Max-All-Octets' WHERE attribute = 'Max-Octets'"); goto oFoVX; eP5mN: sql_query_nostop("ALTER TABLE nas ADD parentid int(10) after controller"); goto Q96E9; iowWP: if (version_compare($freeradius_version, "3.0.0") < 0) { goto sVuZJ; } goto buu1p; eOQUL: sql_query_nostop("ALTER TABLE userinfo CHANGE COLUMN gender_na temp_gender_na SMALLINT"); goto kFF2t; QKzWj: if (!(strpos($localStructure, ""birthdate","gender_na"") !== false)) { goto X19v8; } goto TsAX2; xIYBh: $operators = Operator::GetAllOperators(); goto pRMbW; s3PDb: $local_firmwareversion = License::GetOwnFirmwareVersion(); goto x3a0p; N0kdu: if (!(version_compare($local_firmwareversion, "9.2.0") < 0)) { goto vXCEt; } goto AXHKo; Qu31J: if (!(version_compare($local_firmwareversion, "8.6.0") < 0)) { goto nBkMT; } goto L68k9; rQ6EO: require_once "Apache.inc.php"; goto srR_D; AQkrR: sql_query_nostop("ALTER TABLE operators_acl_files ADD description varchar(1024) NOT NULL default '' after resource;"); goto hYN2A; FfuHD: exec("cp /home/portal/config/freeradius30/default      /etc/freeradius/3.0/sites-available/default"); goto Mca7f; NPe8S: exec("cp /home/portal/config/default         /etc/freeradius/sites-available/default"); goto erWzN; fv0WN: if (!(version_compare($local_firmwareversion, "9.0.0") < 0)) { goto vuUTm; } goto pK8uD; jdGw0: if (version_compare($freeradius_version, "3.0.0") < 0) { goto z7PK1; } goto GXpkH; zW89m: sql_query_nostop("INSERT INTO settings (id, name, value) VALUES
 	(501,	'Voucher Creation - Default Profile',	  ''),
  (502, 'Voucher Creation - Name Mode', 	 	 '2'),
	 (503, 'Voucher Creation - Name Static Part',		 'wifigem'),
	 (504, 'Voucher Creation - Sequential length',  	'6'),
	 (505, 'Voucher Creation - Random string length', 	'6'),
 	(506,	'Voucher Creation - Random number length',		'6'),
		(507, 'Voucher Creation - Last sequential',   '0')
  ;
	"); goto BTdnU; tq02M: mVyUI: goto kTiGJ; iANdK: DHSFC: goto eOQUL; buu1p: exec("cp /home/portal/config/freeradius30/default     /etc/freeradius/3.0/sites-available/default"); goto Aq9Zu; GXpkH: exec("cp /home/portal/config/freeradius30/default      /etc/freeradius/3.0/sites-available/default"); goto Iu2Sh; c316K: sql_query_nostop("ALTER TABLE nas CHANGE COLUMN controller temp_controller SMALLINT"); goto vuThQ; oFoVX: sql_query("UPDATE dictionary_smart SET maxval =  '100000000000' WHERE attribute = 'Max-Daily-Octets'"); goto pFkYS; sOo25: MXB7h: goto vvOa4; LD3ja: BK5pk: goto GY9vg; hVSI0: X0StH: goto Qu31J; wR17c: exec("apt-get --assume-yes install php7.4-mbstring >/dev/null 2>&1"); goto rQ6EO; ZDXir: $sql = "
 INSERT INTO operators_acl_files
 ( file, 			category, 	   section, 					 resource,    description)
 VALUES
 ('dashboard',  'Dashboard',	  '',  			 	 'dashboard',	 'Administration home page'),
	('nas', 	 	'Access Points',  'Devices', 	    'nas_manage', 	'Access point management'),
 ('nas', 	  'Access Points', 	'Devices', 	 	  'nas_stats',		'Access point statistics'),
	('nasgroup',	 'Access Points',	 'Groups',				 	'nasgroup',   'Access point group management'),
	('nassearch', 	'Access Points',	 'Search & Recovery',			'nassearch',  'Access point search (deprecated)'),
 ('profile', 		'Profiles', 	  '', 		   	 'profile_manage', 'Profile management'),
	('profile',   'Profiles',    '',					 		'profile_users', 'Users associated to a profile'),
 ('user',   'User Authentication',	'User List',	    'user_manage',		'User management'),
 ('user',	  'User Authentication', 'User List', 	  	'user_profiles', 'Profiles associated to a user'),
	('user',	  'User Authentication', 'User List',    	'user_ap',	  'Access point groups associated to a user'),
	('user',		 'User Authentication', 'User List', 	 		'user_stats',  'User statistics'),
	('macauth',  	'User Authentication',	'MAC Address Authentication',	'macauth', 	 'MAC address accounts management'),
 ('fastuser',		'User Authentication', 'Fast Creation', 			'fastuser',   'Fast user creation'),
 ('anonymuser',	 'User Authentication', 'Anonymous Users',				'anonymuser',	 'Configure anonymous accounts'),
	('ldap',	  'User Authentication',	'LDAP Authentication', 		'ldap',   	'Configure LDAP authentication'),
	('signup',  	'User Authentication', 'Self Sign Up',		 	 'signup',			'Configure self sign-up'),
 ('social', 		'User Authentication',	'Customize Social Login',  'social',	  'Configure social media login'),
 ('loginpage',	 'Login Pages',		 '',			  	 	'loginpage',  'Login page management'),
	('stats_topusers',	'Statistics',		 'Top Users',	  	 'stats_topusers', 'Statistics - top users'),
 ('stats_byuser', 'Statistics', 		'By User',		  	 'stats_byuser', 	'Statistics - by user'),
 ('stats_summary',	'Statistics',  	'Summary',  	   'stats_summary', 'Statistics - total and average values'),
	('stats_topnas',	'Statistics',			'Top Access Points', 		'stats_topnas', 	'Statistics - top access points'),
	('webfilter',		'Web Filter',  	'',	    			'webfilter',		'Web filter configuration'),
	('traffic',  	'Traffic Control',	 '',			 	  	'traffic',			'Traffic control configuration'),
	('license',	  'Maintenance',	  'License Management',			'license', 		'License information'),
	('certificates',	'Maintenance',		 'Certificates',  	  'certificates',  'Site certificates'),
 ('export',  	'Maintenance',   'Import - Export', 			'export',	  'import - export data'),
 ('operator',  'Maintenance',			'Operators',	    'operator',   'System operators and ACL'),
 ('database_backup', 'Maintenance',  	'Backup - Restore', 		 'database_backup', 'Backup - restore database'),
 ('database_cleanup','Maintenance',	  'Database Housekeeping',	 'database_cleanup',	'Configure database cleanup'),
	('network',	  'System Configuration',	'Network Settings',		 	'network',		 'Configure network settings'),
 ('networktools', 'System Configuration',	'Network Tools', 	 	'networktools',	 'Use network tools'),
 ('smtp',	  'System Configuration', 'Email Setup', 	 	 'smtp',	 	 'Configure email sender'),
	('datetime',  'System Configuration', 'Date, Time & Time Zone',	 'datetime',	  'Configure date, time and time zone'),
 ('apisetup',	 'System Configuration', 'REST API',		 	 	'apisetup',	  'Configure REST API ID and secret'),
 ('branding',	 'System Configuration', 'Product Branding', 	  'branding',	 	'Manage product branding - white label')

	;
"; goto hY2ap; FZSUS: amPR4: goto MXMNn; gdWHR: sql_query("UPDATE dictionary_smart SET maxval = '9000000000000' WHERE attribute = 'Max-All-Octets'"); goto P1pfL; P1pfL: j57l4: goto F6836; jmW8a: foreach ($operators as $row) { goto pPDWh; KpZcK: $acl = new Acl($row["id"]); goto zFGab; zFGab: $acl->Create($accesslist); goto m_c5X; m_c5X: Ff3w6: goto ovgav; LaIX_: $accesslist = array(array("function" => "voucher", "access" => "{$access}")); goto KpZcK; pPDWh: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_NONE; goto LaIX_; ovgav: } goto FZSUS; Q96E9: sql_query_nostop("CREATE INDEX parentid ON nas (parentid);"); goto T5B0d; IoJyw: vXCEt: goto sSAHD; srR_D: Apache::Restart(); goto DlvYR; zqg6c: sql_query_nostop("
		ALTER TABLE userinfo
 	ADD securitycode varchar(20) default '' after enableportallogin,
		ADD securitycode_expiry timestamp after securitycode
	"); goto Y3YJn; kTzcO: if (!(sql_fetch_scalar("SELECT count(*) FROM operators_acl_files WHERE file = 'voucher'") == 0)) { goto DHSFC; } goto PZpjL; yzJ_g: sql_query_nostop("INSERT INTO operators_acl_files
	 	  ( file, category, section, resource, description)
	 	  VALUES
    	('stats_webaccess', 'Web Access', 'Access Log', 'stats_webaccess', 'Report on Web Access')
			 	"); goto Q67XZ; N7M16: sql_query_nostop("ALTER TABLE operators_acl CHANGE file resource varchar(128) NOT NULL;"); goto JAe2n; REoWn: require_once "database.inc.php"; goto s3PDb; UC3YW: sql_query_nostop("ALTER TABLE operators_acl_files ADD resource varchar(128) NOT NULL default '' after section;"); goto AQkrR; dvL3F: exec("cp /home/portal/config/named.conf.options          /etc/bind/named.conf.options"); goto yrDFJ; S0jV6: sql_query_nostop("CREATE INDEX resource_operator_id ON operators_acl (resource,operator_id);"); goto UC3YW; jtd6F: require_once "Freeradius.inc.php"; goto FfuHD; pFkYS: sql_query("UPDATE dictionary_smart SET maxval =  '400000000000' WHERE attribute = 'Max-Weekly-Octets'"); goto QDIdO; n6vNG: exec("cp /home/portal/config/default                  /etc/freeradius/sites-available/default"); goto ommkF; fh6K6: X19v8: goto U633u; HzIgk: si03l: goto N0kdu; Xcl3K: ym1N2: goto LJEV6; Eha7t: z7PK1: goto NPe8S; Mca7f: exec("cp /home/portal/config/freeradius30/sqlcounter   /etc/freeradius/3.0/mods-available/sqlcounter"); goto zW89m; T5B0d: sql_query_nostop("ALTER TABLE license ADD demo varchar(64) DEFAULT '' AFTER trial"); goto sOo25; qIbJ2: Freeradius::Restart(); goto tGSso; R3_Ye: exec("service bind9 restart"); goto pUNhV; zBMTZ: hq_CQ: goto wgWdP; LJEV6: if (!(version_compare($local_firmwareversion, "8.4.0") < 0)) { goto j57l4; } goto Wl592; IcsQ_: exec("apt-get --assume-yes install php-mbstring >/dev/null 2>&1"); goto wR17c; vuThQ: sql_query_nostop("ALTER TABLE nas ADD controller SMALLINT NOT NULL default 0 after codesnippet"); goto SKTM1; VF_l3: if (!(version_compare($local_firmwareversion, "9.5.3") < 0 && $license_id == "LA99cxUf5D")) { goto SoDKE; } goto aIC1f; q3Fo5: exec("cp /home/portal/config/db.blacklist                /etc/bind/db.blacklist"); goto mWdIk; jPtra: GA4M3: goto TQp4K; xK_10: sql_query("INSERT INTO operators_acl (operator_id, resource, access)
		  SELECT operators.id, 'stats_conns', CASE WHEN operators.admin = 1 THEN 2 ELSE 1 END
	 	 FROM operators
   "); goto hVSI0; PZm2a: vuUTm: goto MMEH3; TeA1m: CI0uK: goto tq02M; xayYU: goto EtpUr; goto Eha7t; st9Y2: require_once "log.inc.php"; goto Ckqpw; VWWdE: sql_query_nostop("UPDATE userinfo SET gender_na = temp_gender_na"); goto MmW4P; MMEH3: if (!(version_compare($local_firmwareversion, "9.1.0") < 0)) { goto si03l; } goto XwfSI; auqus: sql_query_nostop("
		UPDATE loginmode SET description='A Voucher or Customer ID is required to login. This login method is applicable to both users who self-registered using a Customer ID and to Vouchers. It is compatible with Username/Password.'
 	WHERE name='Customer ID'"); goto kTzcO; mYmUN: Freeradius::Restart(); goto IoJyw; mWdIk: exec("mkdir /var/log/named; chown bind /var/log/named; chgrp bind /var/log/named"); goto kz318; sFsct: sql_query_nostop("ALTER TABLE nas DROP COLUMN temp_controller"); goto TeA1m; hHtxl: $operators = Operator::GetAllOperators(); goto jmW8a; ommkF: exec("cp /home/portal/config/dictionary.chillispot    /usr/share/freeradius/dictionary.chillispot"); goto RD_Z4; kTiGJ: $license_id = License::getLicenseID(); goto VF_l3; erWzN: exec("cp /home/portal/config/counter.conf    /etc/freeradius/sql/mysql/counter.conf"); goto aTB6x; n2xmQ: sql_query_nostop("INSERT INTO operators_acl_files
	    ( file, category, section, resource, description)
		  	VALUES
  	  ('voucher', 'User Authentication', 'Vouchers', 'voucher', 'Configure and manage vouchers')
 	  	"); goto hHtxl; JsfF7: exec("chmod 744 /var/log/named/queries.log"); goto R3_Ye; P73_2: myOlo: goto jPtra; zqW4l: $operators = Operator::GetAllOperators(); goto U3IRU; tfUku: if (!($days == -1)) { goto BK5pk; } goto gXR1j; dmsaB: sql_query_nostop("
 	UPDATE loginmode SET description='A Voucher or Customer ID is required to login. This login method is applicable to both users who self-registered using a Customer ID and to Vouchers. It is compatible with Username/Password.'
  WHERE name='Customer ID'"); goto n2xmQ; x3a0p: $ubuntu20 = SystemStatus::OsVersionIsAtleast20(); goto GtuWP; sSAHD: if (!(version_compare($local_firmwareversion, "9.3.0") < 0)) { goto Lu30i; } goto fwBZj; U633u: if (!(strpos($localStructure, ""created","controller"") !== false)) { goto CI0uK; } goto c316K; JAe2n: sql_query_nostop("CREATE INDEX operator_id_resource ON operators_acl (operator_id,resource);"); goto S0jV6; GtuWP: if (!(version_compare($local_firmwareversion, "8.1.0") < 0)) { goto GA4M3; } goto N7M16; Y3YJn: exec("rm -f /var/www/html/login/templates/fonts/fontawesome-webfont.*"); goto aufgW; hYN2A: sql_query_nostop("CREATE INDEX resource ON operators_acl_files (resource);"); goto allpo; yrDFJ: exec("cp /home/portal/config/named.conf.local            /etc/bind/named.conf.local"); goto q3Fo5; sDuM0: sql_query_nostop("ALTER TABLE nas ADD location varchar(256) NOT NULL default '' after description"); goto bilR7; allpo: sql_query_nostop("DELETE FROM operators_acl_files;"); goto ZDXir; gXR1j: sql_query("UPDATE cleanup SET days = 90 WHERE id = 6"); goto LD3ja; U3IRU: foreach ($operators as $row) { goto RB4jU; xE9PC: $acl->Create($acl->GetDefaultAccessList($role)); goto QAk1h; Xv6GG: $acl = new Acl($row["id"]); goto xE9PC; RB4jU: $role = $row["admin"] == "1" ? Operator::ROLE_ADMIN : Operator::ROLE_OPERATOR; goto Xv6GG; QAk1h: v4QPd: goto I8FeK; I8FeK: } goto P73_2; vvOa4: if (!(version_compare($local_firmwareversion, "8.3.0") < 0)) { goto ym1N2; } goto sDuM0; MXMNn: Lu30i: goto XVQma; U5Nm2: require_once "all.inc.php"; goto st9Y2; Rloxu: sql_query_nostop("ALTER TABLE userinfo DROP COLUMN temp_gender_na"); goto fh6K6; XVQma: if (!(version_compare($local_firmwareversion, "9.5.1") < 0)) { goto mVyUI; } goto RAgWQ; z42Jh: $freeradius_version = Freeradius::Version(); goto jdGw0; rsBfx: $localStructure = json_encode($localStructure); goto QKzWj; TsAX2: sql_query_nostop("ALTER TABLE userinfo CHANGE COLUMN gender_na temp_gender_na SMALLINT"); goto ishfr; xAxtr: foreach ($operators as $row) { goto nl6De; db7p1: tVA11: goto wza9n; wV3tS: $acl = new Acl($row["id"]); goto aV1sm; SksB7: $accesslist = array(array("function" => "stats_webaccess", "access" => "{$access}")); goto wV3tS; nl6De: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_READ; goto SksB7; aV1sm: $acl->Create($accesslist); goto db7p1; wza9n: } goto zBMTZ; sjjaT: nBkMT: goto kuKua; GY9vg: sql_query_nostop("UPDATE operators_acl_files SET
 	   	category='Web Access', section='Web Filter'
 	  	 WHERE file = 'webfilter'"); goto yzJ_g; bilR7: sql_query_nostop("ALTER TABLE nas ADD created datetime NOT NULL DEFAULT now() after parentid"); goto Xcl3K; Ih2dg: goto nqw1G; goto zvT1g; BTdnU: sql_query_nostop("
	 INSERT INTO settings_license (license_id, id, name, value)
	 SELECT '{$license_id}' as license_id, id, name, value FROM settings
 	 WHERE (id >= 501 AND id <= 507)
	"); goto auqus; aufgW: exec("rm -f /var/www/html/layout/fonts/fontawesome-webfont.*"); goto HzIgk; MmW4P: sql_query_nostop("ALTER TABLE userinfo DROP COLUMN temp_gender_na"); goto wj0B2; XwfSI: sql_query_nostop("
		ALTER TABLE loginpage
	 ADD login_forgotpassword tinyint DEFAULT 0 after login_background
	"); goto zqg6c; RAgWQ: Database::CheckStructure($localStructure); goto rsBfx; PZpjL: sql_query_nostop("INSERT INTO operators_acl_files
 	    ( file, category, section, resource, description)
				 	VALUES
	  			('voucher', 'User Authentication', 'Vouchers', 'voucher', 'Configure and manage vouchers')
			  	"); goto xIYBh; TQp4K: if (!(version_compare($local_firmwareversion, "8.2.0") < 0)) { goto MXB7h; } goto JXQyo; Q67XZ: $operators = Operator::GetAllOperators(); goto xAxtr; pUNhV: $days = sql_fetch_scalar("SELECT days FROM cleanup WHERE id = 6"); goto tfUku; D1ruX: require_once "Freeradius.inc.php"; goto z42Jh; RD_Z4: nqw1G: goto qIbJ2; kFF2t: sql_query_nostop("ALTER TABLE userinfo ADD gender_na SMALLINT NOT NULL default 0 after gender"); goto VWWdE; kuKua: if (!(version_compare($local_firmwareversion, "8.7.0") < 0)) { goto FWAgI; } goto dvL3F; Wb3U1: sql_query("INSERT INTO operators_acl_files
 	( file, 		 category,  		 section,   	   resource, 	 	description)
 	VALUES
 	('stats_conns',		'Statistics', 	 'Connections by Date', 		'stats_conns',	 'Statistics - connections by date')
	"); goto xK_10; wj0B2: Freeradius::Restart(); goto iNKYR; QDIdO: sql_query("UPDATE dictionary_smart SET maxval = '1000000000000' WHERE attribute = 'Max-Monthly-Octets'"); goto gdWHR; pK8uD: if (!$ubuntu20) { goto GdU8Q; } goto lXhX1; lXhX1: exec("apt-get --assume-yes update >/dev/null 2>&1"); goto IcsQ_; aIC1f: sql_query_nostop("
		ALTER TABLE radacct
	 	ADD acctsessiontime_h24 int(12) unsigned default 0,
 	 ADD acctinputoctets_h24 bigint(20) default 0 after acctsessiontime_h24,
   ADD acctoutputoctets_h24 bigint(20) default 0 after acctinputoctets_h24
		;
	"); goto jtd6F; pRMbW: foreach ($operators as $row) { goto bzUcx; aTBLr: $acl = new Acl($row["id"]); goto jO135; sEUtA: $accesslist = array(array("function" => "voucher", "access" => "{$access}")); goto aTBLr; Hx300: VDfuX: goto pBbiN; jO135: $acl->Create($accesslist); goto Hx300; bzUcx: $access = $row["admin"] == "1" ? Acl::ACCESS_MODIFY : Acl::ACCESS_NONE; goto sEUtA; pBbiN: } goto kyv_n; AXHKo: sql_query_nostop("
		ALTER TABLE radacct
		 ADD acctsessiontime_h24 int(12) unsigned default 0,
   ADD acctinputoctets_h24 bigint(20) default 0 after acctsessiontime_h24,
   ADD acctoutputoctets_h24 bigint(20) default 0 after acctinputoctets_h24
	 ;
	"); goto D1ruX; Aq9Zu: exec("cp /home/portal/config/dictionary.chillispot    /usr/share/freeradius/dictionary.chillispot"); goto Ih2dg; iNKYR: SoDKE: goto SXxd0; bkXxd: sql_query_nostop("
		INSERT INTO settings_license (license_id, id, name, value)
  SELECT '{$license_id}' as license_id, id, name, value FROM settings
   WHERE (id >= 501 AND id <= 507)
	"); goto dmsaB; p4DxD: sql_query_nostop("INSERT INTO settings (id, name, value) VALUES
	 (501,	'Voucher Creation - Default Profile',		 ''),
		(502, 'Voucher Creation - Name Mode',	 		 '2'),
  (503,	'Voucher Creation - Name Static Part',  	'wifigem'),
	 (504,	'Voucher Creation - Sequential length', 	 '6'),
  (505, 'Voucher Creation - Random string length',  '6'),
	 (506,	'Voucher Creation - Random number length', 	'6'),
  (507,	'Voucher Creation - Last sequential',  	'0')
  ;
	"); goto bkXxd; ishfr: sql_query_nostop("ALTER TABLE userinfo ADD gender_na SMALLINT NOT NULL default 0 after gender"); goto fqzDd; kyv_n: ThhBl: goto iANdK; JXQyo: sql_query_nostop("ALTER TABLE nas ADD controller SMALLINT NOT NULL default 0 after codesnippet"); goto eP5mN; aTB6x: EtpUr: goto mYmUN; DlvYR: GdU8Q: goto PZm2a; Ckqpw: require_once "SystemStatus.inc.php"; goto REoWn; fqzDd: sql_query_nostop("UPDATE userinfo SET gender_na = temp_gender_na"); goto Rloxu; Wl592: require_once "Freeradius.inc.php"; goto XtIcA; wgWdP: FWAgI: goto fv0WN; hY2ap: sql_query_nostop($sql); goto Jqds_; SXxd0: exit(0); 

Function Calls

None

Variables

None

Stats

MD5 14b8f74d6bbe699a229d9ac24aaa0873
Eval Count 0
Decode Time 93 ms