Jump to content

Robert1995

Active Members
  • Posts

    927
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Robert1995

  1. Am scris la inceput despre asta In legatura cu comentariile, probabil revin pe diseara
  2. Te referi la website sau la client in sine ? Oricum ai nevoie de o gramada de lucruri, 500$ sigur nu o sa fie;poate 500$ pentru website sa ai register / login / manage account / basic forum, poate cu ceva platforma de forum gata facuta + design care trebuie sa fie frumos si flexibil + sa mearga in orice browser si cam la orice rezolutie + inca o tona de bani clientul in sine.
  3. Habar nu am ce e, l-am decryptat pentru cineva, ma frec in oameni care isi crypteaza jegul de cod. Poate il vrea cineva, daca nu am postat unde trebuie , mutati va rog <?php if ( read_module( 20 ) == 0 ) { echo locked( "For the moment this page is closed...Please try again latter.", "370" ); } else { $db_updates_times = file( "sys_/muweb_db/".statistics_updates_tDB."" ); $id = 1; foreach ( $db_updates_times as $r_c ) { $r_c = explode( "|", $r_c ); if ( $r_c[0] == $id ) { $time = time( ); $time_count = $r_c[1] - $time; $time_left = 0; if ( $time_left <= 0 ) { global $db_primary; global $muweb; $g_r = $db_primary->Execute( "Select top ".$muweb['top_rankings']." mu_id,name,class,clevel,resets,strength,dexterity,vitality,energy,ctlcode,leadership,GrandRes from character order by GrandRes desc, resets desc, clevel desc" ); $no_command = 0; if ( !$g_r ) { $g_r = $db_primary->Execute( "Select top ".$muweb['top_rankings']." mu_id,name,class,clevel,resets,strength,dexterity,vitality,energy,ctlcode,GrandRes from character order by GrandRes desc, resets desc, clevel desc" ); $no_command = 1; } $i = 0; for ( ; $i < $g_r->numrows( ); ++$i ) { $s_r = $g_r->fetchrow( ); if ( $no_command == 1 ) { $new_ranking .= "{$s_r['0']}|".md5_encrypt( $s_r[1] )."|{$s_r['2']}|{$s_r['3']}|{$s_r['4']}|{$s_r['5']}|{$s_r['6']}|{$s_r['7']}|{$s_r['8']}|{$s_r['9']}|0|{$s_r['10']}|\n"; } else { $new_ranking .= "{$s_r['0']}|".md5_encrypt( $s_r[1] )."|{$s_r['2']}|{$s_r['3']}|{$s_r['4']}|{$s_r['5']}|{$s_r['6']}|{$s_r['7']}|{$s_r['8']}|{$s_r['9']}|{$s_r['10']}|{$s_r['11']}|\n"; } } $new_top_ranking = "sys_/muweb_db/".top_characters_tDB.""; $open_file = fopen( $new_top_ranking, "w" ); fputs( $open_file, $new_ranking ); fclose( $open_file ); $g_r = $db_primary->Execute( "Select top ".$muweb['top_rankings']." G_name,G_Mark,G_Score,G_Master from Guild order by G_Score desc" ); $i = 0; for ( ; $i < $g_r->numrows( ); ++$i ) { $s_r = $g_r->fetchrow( ); $get_id = $db_primary->Execute( "Select mu_id from character where name=?", array( $s_r[3] ) ); $get_id = $get_id->fetchrow( ); $get_number = $db_primary->Execute( "Select name from GuildMember where G_name=?", array( $s_r[0] ) ); $get_number = $get_number->numrows( ); $new_guild_ranking .= "".md5_encrypt( $s_r[0] )."|".urlencode( bin2hex( $s_r[1] ) )."|{$s_r['2']}|".md5_encrypt( $s_r[3] )."|{$get_id['0']}|{$get_number}|\n"; } $new_top_ranking = "sys_/muweb_db/".top_guilds_tDB.""; $open_file = fopen( $new_top_ranking, "w" ); fputs( $open_file, $new_guild_ranking ); fclose( $open_file ); $time_ = time( ) + $r_c[2]; $old_db = file( "sys_/muweb_db/".statistics_updates_tDB."" ); $new_db = fopen( "sys_/muweb_db/".statistics_updates_tDB."", "w" ); foreach ( $old_db as $old_db_line ) { $old_db_arr = explode( "|", $old_db_line ); if ( $id != $old_db_arr[0] ) { fwrite( $new_db, "{$old_db_line}" ); } else { fwrite( $new_db, "{$id}|{$time_}|{$r_c['2']}|{$r_c['3']}|{$r_c['4']}|{$r_c['5']}|".time( )."|\n" ); } } fclose( $new_db ); } break; } } !$_GET['op2'] ? $_GET['op2'] = "Characters" : clean_variable( $_GET['op2'] ); $rankings_content = " <table width=\"530\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr><td width=\"140\"> <table width=\"540\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr><td align=\"left\" class=\"full_title\"><em>Sub Category :: ".ucfirst( $_GET['op2'] )."</em></td></tr> </table> <table width=\"540\" align=\"center\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\"><tr><td align=\"left\"> <ul> <li><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Rankings-Characters.html');\">Characters Rankings</a></li> <li><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Rankings-Guilds.html');\">Guild Rankings</a></li> </ul></td></tr></table></td> </table>"; echo html( $rankings_content ); $s_file = file( "sys_/muweb_db/".statistics_updates_tDB."" ); foreach ( $s_file as $t ) { $t = explode( "|", $t ); if ( $t[0] == 1 ) { $time_r = $t[6]; } } switch ( $_GET['op2'] ) { case "Characters" : if ( read_module( 201 ) == 0 ) { echo locked( "For the moment this page is closed...Please try again latter.", "370" ); } else { $r_file = file( "sys_/muweb_db/".top_characters_tDB."" ); $ch_content = "<br> <table width=\"530\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"rankings-table\"> <thead><tr><td>#</td><td>Name</td><td>Class</td><td>LEVEL</td><td>[R][GR]</td><td>STR</td><td>AGI</td><td>VIT</td><td>ENG</td><td>COM</td></tr></thead>"; $count = 0; $tr_color_2 = "even"; $tr_color_1 = ""; foreach ( $r_file as $show_ch ) { $show_ch = explode( "|", $show_ch ); if ( $muweb['rankings_gm'] == 1 ) { if ( !isset( $_GET['op3'] ) ) { if ( $show_ch[9] == 0 || $show_ch[9] == 32 || $show_ch[9] == 8 ) { ++$count; $tr_color = $count % 2 ? $tr_color_1 : $tr_color_2; switch ( $show_ch[10] ) { case 0 : $show_ch[10] = "--"; break; } $ch_content .= "<tr class=\"".$tr_color."\"> <td>".$count."</td> <td width=\"60\"><span class=\"r_link\"><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Character-".$show_ch[0].".html');\">".htmlentities( md5_decrypt( $show_ch[1] ) )."</a></span></td> <td>".class_list( $show_ch[2] )."</td> <td>".$show_ch[3]."</td><td>[<span class=\"rankings_text_reset\">".$show_ch[4]."</span>][<span class=\"rankings_text_reset\">".$show_ch[11]."</span>][]</td> <td>".$show_ch[5]."</td> <td>".$show_ch[6]."</td> <td>".$show_ch[7]."</td> <td>".$show_ch[8]."</td> <td>".$show_ch[10]."</td> </tr>"; } } else { $class = clean_variable( $_GET['op3'] ); if ( ( $show_ch[9] == 0 || $show_ch[9] == 32 || $show_ch[9] == 8 ) && $show_ch[2] == $class ) { ++$count; $tr_color = $count % 2 ? $tr_color_1 : $tr_color_2; switch ( $show_ch[10] ) { case 0 : $show_ch[10] = "--"; break; } $ch_content .= "<tr class=\"".$tr_color."\"> <td>".$count."</td> <td width=\"60\"><span class=\"r_link\"><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Character-".$show_ch[0].".html');\">".htmlentities( md5_decrypt( $show_ch[1] ) )."</a></span></td> <td>".class_list( $show_ch[2] )."</td> <td>".$show_ch[3]."</td><td>[<span class=\"rankings_text_reset\">".$show_ch[4]."</span>][<span class=\"rankings_text_reset\">".$show_ch[11]."</span>]</td> <td>".$show_ch[5]."</td> <td>".$show_ch[6]."</td> <td>".$show_ch[7]."</td> <td>".$show_ch[8]."</td> <td>".$show_ch[10]."</td> </tr>"; } } } else if ( !isset( $_GET['op3'] ) ) { if ( $show_ch[9] == 0 ) { ++$count; $tr_color = $count % 2 ? $tr_color_1 : $tr_color_2; switch ( $show_ch[10] ) { case 0 : $show_ch[10] = "--"; break; } $ch_content .= "<tr class=\"".$tr_color."\"> <td>".$count."</td> <td width=\"60\"><span class=\"r_link\"><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Character-".$show_ch[0].".html');\">".htmlentities( md5_decrypt( $show_ch[1] ) )."</a></span></td> <td>".class_list( $show_ch[2] )."</td> <td>".$show_ch[3]."</td><td>[<span class=\"rankings_text_reset\">".$show_ch[4]."</span>][<span class=\"rankings_text_reset\">".$show_ch[11]."</span>]</td> <td>".$show_ch[5]."</td> <td>".$show_ch[6]."</td> <td>".$show_ch[7]."</td> <td>".$show_ch[8]."</td> <td>".$show_ch[10]."</td> </tr>"; } } else { $class = clean_variable( $_GET['op3'] ); if ( $show_ch[9] == 0 && $show_ch[2] == $class ) { ++$count; $tr_color = $count % 2 ? $tr_color_1 : $tr_color_2; switch ( $show_ch[10] ) { case 0 : $show_ch[10] = "--"; break; } $ch_content .= "<tr class=\"".$tr_color."\"> <td>".$count."</td> <td width=\"60\"><span class=\"r_link\"><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Character-".$show_ch[0].".html');\">".htmlentities( md5_decrypt( $show_ch[1] ) )."</a></span></td> <td>".class_list( $show_ch[2] )."</td> <td>".$show_ch[3]."</td><td>[<span class=\"rankings_text_reset\">".$show_ch[4]."</span>][<span class=\"rankings_text_reset\">".$show_ch[11]."</span>]</td><td>".$show_ch[5]."</td> <td>".$show_ch[6]."</td> <td>".$show_ch[7]."</td> <td>".$show_ch[8]."</td> <td>".$show_ch[10]."</td> </tr>"; } } } $ch_content .= "<tr><td colspan=\"9\" align=\"right\"><span class=\"full_author\">Last Update ".decode_time( $time_r, time( ), "long", "1 sn" )." önce</span></td></tr></table> <table width=\"530\" align=\"center\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\"> <tr><td align=\"left\" width=\"20\">Sýnýf</td> <td align=\"left\"><form name=\"change_class\"> <select class=\"field\" onChange=\"MM_jumpMenu('parent',this,0)\"> <option value=\"".$muweb['servername']."-Rankings-Characters.html\">-Select One-</option>"; $c = class_list( "list", "long" ); foreach ( $c as $cc => $v ) { $ch_content .= "<option value=\"".$muweb['servername']."-Rankings-Characters-".$cc.".html\">".$v."</option>"; } $ch_content .= " </select> </form> </td></tr> </table>"; echo html( $ch_content ); } break; case "Guilds" : } if ( read_module( 202 ) == 0 ) { echo locked( "For the moment this page is closed...Please try again latter.", "370" ); } else { $r_file = file( "sys_/muweb_db/".top_guilds_tDB."" ); $guild_content = "<br> <table width=\"530\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"rankings-table\"> <thead><tr><td>#</td><td align=\"left\">Name</td><td align=\"left\">Owner</td><td align=\"center\">Score</td><td align=\"center\">Members</td><td align=\"center\">Logo</td></tr></thead>"; $count = 0; $tr_color_2 = "even"; $tr_color_1 = ""; foreach ( $r_file as $show_ch ) { ++$count; $tr_color = $count % 2 ? $tr_color_1 : $tr_color_2; $show_ch = explode( "|", $show_ch ); $guild_content .= "<tr class=\"".$tr_color."\"> <td>".$count."</td> <td align=\"left\">".md5_decrypt( $show_ch[0] )."</td> <td align=\"left\"><span class=\"r_link\"><a href=\"#\" onClick=\"sub_page('".$muweb['servername']."-Character-".$show_ch[4].".html');\">".htmlentities( md5_decrypt( $show_ch[3] ) )."</a></td> <td align=\"center\">".$show_ch[2]."</td> <td align=\"center\">".$show_ch[5]."</td> <td align=\"center\"><img src=\"GuildMark-".$show_ch[1].".png\" width=\"20\" height=\"20\"></td>"; } $guild_content .= "<tr><td colspan=\"9\" align=\"right\"><span class=\"full_author\">Last Update ".decode_time( $time_r, time( ), "long", "1 sn" )." önce</span></td></tr></table>"; echo html( $guild_content ); } } ?>
  4. O ai auzit si tu ca unele imagini captcha pot fi decodificate si tu crezi ca-ti faci o functie de cURL care se apuca sa-ti faca bani in timp ce fumezi o tigara..Daca ar fi atat de usor de ce crezi ca au nevoie de oameni sa o faca ?
  5. presupun ca ideea e sa te bazezi pe array si sa ai ceva de genul array[0] = 11001000 array[2] = 2000334 si faci cumva output sa iasa 110010002000334 + ca va fi greu la calculat
  6. int dec2bin(int num) { int bin = 0, k = 1; while (num) { bin += (num % 2) * k; k *= 10; num /= 2; } return bin; } Asta ar trebui sa fie baza 2, foarte basic implementarea. Pentru baza 7 pur si simplu pui inloc de 2, 7 . Cel putin asa cred
  7. Da parca Suedezi aveau o religie ce incuraja "download si altele", sau nu s-a mai aprobat ?
  8. Stiu ca poate e putin off-topic / troll, dar Lasa-ma sa ghicesc chiar daca e alt account ?
  9. MegaUpload Dangerous Secrets affect YOU, Mike Mozart JeepersMedia ACTA / PIPA / SOPA - YouTube
  10. Pastebin asta ar fi baza de date presupun
  11. Robert1995

    XSS in php

    baga asta prin include la toate paginile tale https://rstcenter.com/forum/46445-post-sanitize.rst#post309514 Edit : daca vrei si sqli baga si un mysql_real_escape_string , mai pune si un trim sa dispara taburile
  12. vrei sa dai "Publish to Web" la o baza de date MOffice-Access pe care vrei sa o cumperi? mai multe detalii ? Edit : Pentru aplicatii web deobicei se foloseste mysql
  13. Si apoi vezi filmulet pe youtube cum sa treci testul . Parca asa era la hackthissite.org , pentru toate "testele" exista rezolvari pe youtube facute de diversi
  14. Eu cand salvez in baza de date folosesc $this->_db->quoteInto , e o functie pentru Zend db . Oricum e foarte usoara extinderea scriptului acesta de sanitize presupun,fiecare poate sa il adapteze dupa cum doreste. Functia aceea $this->_db->quoteInto , se bazeaza pe : , aceasta apartine de zend /** * Quote a raw string. * * @param string $value Raw string * @return string Quoted string */ protected function _quote($value) { if (is_int($value)) { return $value; } elseif (is_float($value)) { return sprintf('%F', $value); } return "'" . addcslashes($value, "\000\n\r\\'\"\032") . "'"; } public function quote($value, $type = null) { $this->_connect(); if ($value instanceof Zend_Db_Select) { return '(' . $value->assemble() . ')'; } if ($value instanceof Zend_Db_Expr) { return $value->__toString(); } if (is_array($value)) { foreach ($value as &$val) { $val = $this->quote($val, $type); } return implode(', ', $value); } if ($type !== null && array_key_exists($type = strtoupper($type), $this->_numericDataTypes)) { $quotedValue = '0'; switch ($this->_numericDataTypes[$type]) { case Zend_Db::INT_TYPE: // 32-bit integer $quotedValue = (string) intval($value); break; case Zend_Db::BIGINT_TYPE: // 64-bit integer // ANSI SQL-style hex literals (e.g. x'[\dA-F]+') // are not supported here, because these are string // literals, not numeric literals. if (preg_match('/^( [+-]? # optional sign (?: 0[Xx][\da-fA-F]+ # ODBC-style hexadecimal |\d+ # decimal or octal, or MySQL ZEROFILL decimal (?:[eE][+-]?\d+)? # optional exponent on decimals or octals ) )/x', (string) $value, $matches)) { $quotedValue = $matches[1]; } break; case Zend_Db::FLOAT_TYPE: // float or decimal $quotedValue = sprintf('%F', $value); } return $quotedValue; } return $this->_quote($value); }
  15. <?php class Model_Sanitize{ /** * This is core functionality for Public Static SanitizeArray */ private static function cleanArray($to_clean , $ignore_params = array()){ if(!empty($to_clean)){ foreach($to_clean as $k=>$entry){ if(is_array($entry)){ $to_clean[$k] = self::cleanArray($entry , $ignore_params); } elseif(is_string($entry)) { if(in_array($k , $ignore_params)){ $to_clean[$k] = $entry; } else { $to_clean[$k] = htmlentities($entry); $to_clean[$k] = str_replace("'" , "'" , $to_clean[$k]); $to_clean[$k] = str_replace('"' , """ , $to_clean[$k]); } } } } return $to_clean; } /** * Does htmlentities for each array element . It's is Multidimensional array * It Still Works accept $ignore_params . use the key of the array to not sanitize that. * @param $to_clean - $type array * @param $ignore_params - $type array (OPTIONAL) * @return @array */ public static function sanitizeArray($to_clean , $ignore_params = array()){ return is_array($to_clean) ? self::cleanArray($to_clean , $ignore_params) : array(); } } if(isset($_POST) && !empty($_POST)){ $_POST = Model_Sanitize::sanitizeArray($_POST); } Automatic $_POST sanitize cu $ignore_params , poate aveti nevoie pentru un text-editor gen nicEdit sa ignorati un parametru
  16. Robert1995

    Cod php

    hai ca is mahmur dar o porcarie de asta pot face ai PM
  17. tu citesti tot directoriul mergi pe path absolut catre fisier e evidenta greseala care ai facut-o . ------ Edited
  18. Reinviu postul doar sa spun ceva important Mai tare e DoctrineORM
  19. Dai pe google zend certified engineer apoi apucate direct de zend
  20. Model_Constant <?php class Model_Constant extends CI_Model { function __construct() { parent::__construct(); } const LOGOUT_MESSAGE = 'Succesfully Logged Out'; const FLAG_TRUE = 1; const FLAG_FALSE = 0; } Model_User <?php class Model_User extends CI_Model { var $table = 'user'; function __construct() { // Call the Model constructor parent::__construct(); } function getAll($ids = array()) { $sql = 'SELECT * FROM '.$this->table.' '; $sql .= 'WHERE '; $sql .= 'is_deleted <> '.Model_Constant::FLAG_TRUE.' '; if(!empty($ids)){ $sql .= 'AND id IN ('.implode(',',$ids).') '; } $query = $this->db->query($sql); return $query->result(); } function getById($page_id){ $sql = 'SELECT * FROM '.$this->table." WHERE id = $page_id"; $query = $this->db->query($sql); $result = $query->result(); return isset($result[0]) ? $result[0] : array(); } function getByEmail($email_address){ $sql = 'SELECT * FROM '.$this->table." WHERE email_address = '$email_address'"; $query = $this->db->query($sql); $result = $query->result(); return isset($result[0]) ? $result[0] : array(); } function insertEntry($page) { return $this->db->insert($this->table, $page); } function updateEntry($page) { if(isset($page['id'])){ $this->db->update($this->table, $this, array('id' => $page['id'])); return $page['id']; }else{ return false; } } } Feel free sa adaugati ce doriti la post.
×
×
  • Create New...