Líderes
-
-
-
Thony D. Serv
MembroPontos207Total de itens
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 12/02/22 em todas áreas
-
[Tutorial] Protegendo seu Gesior e XAMPP!
[Tutorial] Protegendo seu Gesior e XAMPP!
ArielZeRah reagiu a Erimyth por uma resposta no tópico
1 pontoGalerinha todo mundo sabe que o Gesior é uma bosta no quesito segurança e o XAMPP também tem suas falhas, porém muitos ainda utilizam o Gesior e o XAMP por diversos motivos, até mesmo por afinidade. Hoje eu vim aqui dar algumas dicas valiosas para que você possa tornar seu querido Gesior e seu XAMPP um pouco mais seguro. 1 - Se você utiliza XAMPP, siga os passos abaixo para tornar-lo mais seguro: Crie um senha relativamente boa e segura para o seu xampp/phpMyAdmin. Exclua completamente a pasta webdav. Vá até o seu phpMyAdmin > Privilégios e exclua o usuário pma. Vá até a pasta phpMyadmin/config.inc.php e procure pela seguinte tag: $cfg['blowfish_secret'] = 'xampp'; E mude a palava xampp por algo completamente sem sentido, exemplo: $cfg['blowfish_secret'] = 'hsdewu1721has1au'; Ainda em config.inc.php e procure pela seguinte tag: $cfg['Servers'][$i]['auth_type'] = 'config'; E mude-a para: $cfg['Servers'][$i]['auth_type'] = 'cookie'; Agora vá até php/php.ini e procure pela seguinte tag: Safe_mode = Off Ative-o, deixando assim: Safe_mode = On Prontinho, seu XAMPP está bem mais seguro! 2 - Bom agora vamos ao Gesior, vá até o arquivo config/config.php e faça as edições nas seguintes tags: $config['site']['access_news'] = 6; // access level needed to edit news $config['site']['access_tickers'] = 6; // access level needed to edit tickers $config['site']['access_admin_panel'] = 6; // access level needed to open admin panel Mude todas para 6 para não termos problemas com invasões ao sistema de tickers, porém lembre de por page_acess 6 na sua account pelo phpMyAdmin para você administrar seu site. 3 - Vá até layouts/sua-skin/layout.php e procure a tag <body e substitua por essa: <body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();" oncontextmenu="return false" onselectstart="return false" ondragstart="return false"> Agora, logo abaixo da tag <body>, você adicionará o seguinte código: <?php { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql); return $sql; } function protect($str) { if( !is_array($str) ) { $str = preg_replace("/(from|select|insert|delete|where|drop table|show tables)/i","",$str); $str = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))',$str); $str = preg_replace('~&#([0-9]+);~e', 'chr("\\1")',$str); $str = str_replace("<script","",$str); $str = str_replace("script>","",$str); $str = str_replace("<Script","",$str); $str = str_replace("Script>","",$str); $str = trim($str); $tbl = get_html_translation_table(HTML_ENTITIES); $tbl = array_flip($tbl); $str = addslashes($str); $str = strip_tags($str); return strtr($str,$tbl); } else return $str; } $nome = anti_injection($_POST["nome"]); $senha = anti_injection($_POST["senha"]); $link = htmlspecialchars($_POST['link'], ENT_QUOTES); echo $link; header("Content-Type: text/html; charset=ISO-8859-1",true)?> Ainda em layout.php logo abaixo da tag <head>, você adicionará o seguinte código: <script type="text/javascript"> function click() { if (event.button==2||event.button==3) { oncontextmenu='return false'; } } document.onmousedown=click document.oncontextmenu = new Function("return false;") </script> Esses códigos te ajudarão a se previr contra SQL Injection, mas eu afirmo logo que isso não é 100% seguro. 4 - Vá até o arquivo guilds.php e localize a seguinte tag: $guild_logo = $guild->getCustomField('logo_gfx_name'); if(empty($guild_logo) || !file_exists("guilds/".$guild_logo)) $guild_logo = "default_logo.gif"; Agora substitua por isso: foreach (array("/", "\\", "..") as $char) { $guild_logo = str_replace($char, "", $guild->getCustomField('logo_gfx_name')); } if (empty($guild_logo) || !file_exists("guilds/".$guild_logo)) { $guild_logo = "default_logo.gif"; } Pronto, seu guilds.php está seguro agora. 5 - Exclua completamente o arquivo houses.php, ele é um arquivo muito inutilizado e ainda muito vulnerável, pessoas maliciosas podem conseguir ver sua config.lua através dele, portanto apenas exclua. Pronto, por enquanto é só, se você tiver mais dicas para deixar o Gesior e o XAMPP mais seguro, poste nesse tópico que você com certeza estará ajudando muitas pessoas necessitadas! Créditos: Matheus gpedro Red Stian Você gostou deste conteúdo!? Este conteúdo te ajudou!? Isso será realmente útil pra você!? Então, se possível, faça uma doação (de qualquer valor) que estará me ajudando também!1 ponto -
Bless Db
Bless Db
thonysz reagiu a Thony D. Serv por uma resposta no tópico
1 pontotfs 0.4 (não testei em outras apenas na 0.4) Esse script eu fiz pois, meu servidor sempre que reiniciava todos os players voltavam sem bless, então para sanar isso eu fiz um check de bless pela database para poder sempre que cair o servidor os players não morressem sem bless e dropassem os itens vamos lá! Primeiro Execute Este Comando Em Sua Db: Va No Fim E Adicione 050-function.lua Agora vá no seu comando de Bless ou Npc e ponha cada um no seu devido lugar Agora Em Creaturescript/scripts Crie Uma Pasta Chamada Bless E Ponha La Dentro: blessingdeath.lua blessinglogin.lua Adicione Ambas No Login.lua Creaturescript.xml -- Creditos A Mim Mesmo hahaha. Espero Ajudar Vocês ?1 ponto -
[MODERN AAC] Missing tables etc... [Tutorial]
Já teve esses erros? Quer se livrar deles? Já postou esses erros e ninguem te ajuda ?? Exemplos: Trago aqui uma listinha básica com a Solução !! Você só tem que procurar o seu erro ou o que está faltando usando CRTL + F aqui no tópico... ALTER TABLE `accounts` ADD `page_access` int(11); ALTER TABLE `accounts` ADD `page_lastday` int(11); ALTER TABLE `accounts` ADD `email_new` varchar(255); ALTER TABLE `accounts` ADD `email_new_time` int(15); ALTER TABLE `accounts` ADD `rlname` varchar(255); ALTER TABLE `accounts` ADD `location` varchar(255); ALTER TABLE `accounts` ADD `created` int(16); ALTER TABLE `accounts` ADD `email_code` varchar(255); ALTER TABLE `accounts` ADD `next_email` int(11); ALTER TABLE `accounts` ADD `premium_points` int(11); ALTER TABLE `accounts` ADD `nickname` char(48); ALTER TABLE `accounts` ADD avatar char(48); ALTER TABLE `accounts` ADD about_me text; ALTER TABLE `accounts` ADD `nickname` varchar(255) not null default ''; ALTER TABLE `accounts` CHANGE `key` `key` VARCHAR( 128 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT ''; ALTER TABLE `players` ADD `old_name` varchar(255); ALTER TABLE `players` ADD `hide_char` int(11); ALTER TABLE `players` ADD `worldtransfer` int(11); ALTER TABLE `players` ADD `created` int(16); ALTER TABLE `players` ADD `nick_verify` int(11); ALTER TABLE `players` ADD `comment` text; UPDATE `players` SET `hide_char` = 0; UPDATE `accounts` SET `key` = ''; INSERT INTO `players` (`name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `worldtransfer`, `comment`) VALUES ('Rook Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, 0, 'This player has no comment at this moment.'), ('Sorcerer Sample', 0, 1, 1, 8, 1, 185, 185, 4200, 0, 0, 0, 0, 110, 0, 0, 35, 35, 0, 0, 1, 50, 50, 7, '', 440, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, 0, 'This player has no comment at this moment.'), ('Druid Sample', 0, 1, 1, 8, 2, 185, 185, 4200, 0, 0, 0, 0, 110, 0, 0, 35, 35, 0, 0, 1, 50, 50, 7, '', 440, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, 0, 'This player has no comment at this moment.'), ('Paladin Sample', 0, 1, 1, 8, 3, 185, 185, 4200, 0, 0, 0, 0, 110, 0, 0, 35, 35, 0, 0, 1, 50, 50, 7, '', 440, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, 0, 'This player has no comment at this moment.'), ('Knight Sample', 0, 1, 1, 8, 4, 185, 185, 4200, 0, 0, 0, 0, 110, 0, 0, 35, 35, 0, 0, 1, 50, 50, 7, '', 440, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, 0, 'This player has no comment at this moment.'); CREATE TABLE IF NOT EXISTS `bugtracker` ( `id` int(11) NOT NULL AUTO_INCREMENT, `category` int(3) NOT NULL, `time` int(11), `author` int(11) NOT NULL, `text` text, `title` varchar(120), `done` tinyint(3), `priority` tinyint(3), `closed` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`author`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `friends` ( `id` int(11) NOT NULL AUTO_INCREMENT, `with` int(11), `friend` int(11), `time` int(11), `active` tinyint(1), PRIMARY KEY (`id`), FOREIGN KEY (`with`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, FOREIGN KEY (`friend`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `from` int(11), `to` int(11), `title` varchar(120), `text` tinytext, `time` int(11), `delete_from` tinyint(1), `delete_to` tinyint(1), `unread` tinyint(1), PRIMARY KEY (`id`), FOREIGN KEY (`from`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, FOREIGN KEY (`to`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(150) DEFAULT '', `body` text, `time` int(11) DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `news_id` int(11), `body` text, `time` int(11) DEFAULT '0', `author` int(11) DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`news_id`) REFERENCES `news` (`id`) ON DELETE CASCADE, FOREIGN KEY (`author`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `forums` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(120), `description` tinytext, `access` smallint(5) DEFAULT '1' COMMENT 'Min. access to see the board', `closed` tinyint(1), `moderators` tinytext, `order` int(6), `requireLogin` tinyint(1), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `forums` ADD `guild` int(11); CREATE TABLE IF NOT EXISTS `threads` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(120), `sticked` tinyint(1), `closed` tinyint(1), `author` varchar(64), `time` int(11), `board_id` int(11), PRIMARY KEY (`id`), FOREIGN KEY (`board_id`) REFERENCES `forums` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `posts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(120) , `text` text, `time` int(11), `author` varchar(64), `board_id` int(11), `thread_id` int(11), PRIMARY KEY (`id`), FOREIGN KEY (`board_id`) REFERENCES `forums` (`id`) ON DELETE CASCADE, FOREIGN KEY (`thread_id`) REFERENCES `threads` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `videos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author` int(11) , `title` varchar(120), `description` tinytext, `youtube` varchar(45), `views` int(11), `time` int(11), PRIMARY KEY (`id`), FOREIGN KEY (`author`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `video_comments` ( `id` int(10) NOT NULL AUTO_INCREMENT, `author` int(11), `video` int(11), `time` int(11), `text` tinytext, PRIMARY KEY (`id`), FOREIGN KEY (`video`) REFERENCES `videos` (`id`) ON DELETE CASCADE, FOREIGN KEY (`author`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `poll` ( `id` int(11) NOT NULL AUTO_INCREMENT, `question` varchar(150) , `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_start` datetime , `date_end` datetime , `status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `question` (`question`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `poll_answer` ( `id` int(11) NOT NULL AUTO_INCREMENT, `poll_id` int(11) NOT NULL, `answer` varchar(150) , PRIMARY KEY (`id`), FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `poll_votes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `answer_id` int(11) , `poll_id` int(11) , `account_id` int(11) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`answer_id`) REFERENCES `poll_answer` (`id`) ON DELETE CASCADE, FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE, FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Novo Erros: Solução CREATE TABLE `z_ots_comunication` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `type` VARCHAR(255) NOT NULL, `action` VARCHAR(255) NOT NULL, `param1` VARCHAR(255) NOT NULL, `param2` VARCHAR(255) NOT NULL, `param3` VARCHAR(255) NOT NULL, `param4` VARCHAR(255) NOT NULL, `param5` VARCHAR(255) NOT NULL, `param6` VARCHAR(255) NOT NULL, `param7` VARCHAR(255) NOT NULL, `delete_it` INT(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Créditos: Amiroslo EddyHavoc Espero que tenho te ajudado.1 ponto
Líderes está configurado para São Paulo/GMT-03:00