elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


  Mostrar Mensajes
Páginas: 1 ... 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 [104] 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 ... 135
1031  Programación / Desarrollo Web / Re: captchas en: 3 Febrero 2012, 12:07 pm
Version de GIFEncoder que utilizé PHPclasses / Pastie Bin.
Código
  1. <?php
  2. /*
  3. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. ::
  5. :: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu
  6. ::
  7. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8. */
  9. include "GIFEncoder.class.php";
  10.  
  11. class Captcha
  12. {
  13. protected $captcha;
  14. protected $clave;
  15.  
  16. function __construct()
  17. {
  18. $rnd = rand(0, 1000000);
  19. $key = strtoupper(substr(md5( microtime() * $rnd),1,5));
  20. $this->clave = $key;
  21. $this->captcha = imagecreatefromgif('bg.gif');
  22. $posicion_x=15;
  23. for($i = 0;$i<strlen($key);$i++){
  24. $r=rand(0,255);
  25. $g=rand(0,255);
  26. $b=rand(0,255);
  27. $posicion_y=rand(20,40);
  28. $colorText = imagecolorallocate($this->captcha, $r, $g, $b);
  29. imagestring($this->captcha, 30, $posicion_x, $posicion_y, $key[$i], $colorText);
  30. $posicion_x+=25;
  31. }
  32. //Fix con el color de la segunda letra
  33. $white = ImageColorAllocate($this->captcha,0,0,0);
  34. ImageColorTransparent($this->captcha,$white);
  35. }
  36.  
  37. public function imprimir()
  38. {
  39. if (!empty($this->frames) AND !empty($this->framed))
  40. {
  41. $gif = new GIFEncoder($this->frames, $this->framed, 0, 2, 0, 0, 0, 'url');
  42. Header ('Content-type:image/gif');
  43. echo $gif->GetAnimation();
  44. imagedestroy($this->captcha);
  45. }else{
  46. Header('Content-type:image/gif');
  47. imagegif($this->captcha);
  48. }
  49.  
  50. }
  51.  
  52. public function guardar()
  53. {
  54. $_SESSION['CAPTCHA_TEXT'] = $this->clave;
  55. return $this->clave;
  56. }
  57. }
  58.  
  59. class Animacion extends Captcha
  60. {
  61. public $frames;
  62. public $framed;
  63.  
  64. function __construct($aleatorio = 1)
  65. {
  66. parent::__construct();
  67. if ($aleatorio == 1) {
  68. $n = rand(1,3);
  69. $n == 1 ? $this->circulo() : 'no' ;
  70. $n == 2 ? $this->bum() : 'no' ;
  71. $n == 3 ? $this->desliz() : 'no' ;
  72. }
  73. }
  74.  
  75. public function circulo()
  76. {
  77. $circulo_x = 40;
  78. $circulo_y = 0;
  79. $frames_x = 20;
  80. for($b=0;$b<$frames_x;$b++){
  81. $im = imagecreatetruecolor(150, 80);
  82. imagecopy($im, $this->captcha, 0, 0, 0, 0, imagesx($this->captcha), imagesy($this->captcha));
  83. //fix
  84. $white = ImageColorAllocate($im,255,255,255);
  85. ImageFill($im,0,0,$white);
  86. $circulo = imagecolorallocate($im, 0, 0, 0);
  87. imagefilledellipse( $im, $circulo_y, $circulo_x, 30, 30, $circulo );
  88. $fname = 'tmp/'.$b.'.gif';
  89. imagegif($im, $fname);
  90. $this->frames[] = $fname;
  91. $this->framed[] = 1;
  92. $circulo_y+=10;
  93. }
  94. $this->imprimir();
  95. }
  96.  
  97. public function bum()
  98. {
  99. $frames_x = 30;
  100. for($b=0;$b<$frames_x;$b++){
  101. $im = imagecreatetruecolor(150, 80);
  102. imagecopy($im, $this->captcha, 0, 0, 0, 0, imagesx($this->captcha), imagesy($this->captcha));
  103. //fix
  104. $white = ImageColorAllocate($im,255,255,255);
  105. ImageFill($im,0,0,$white);
  106. imagefilledrectangle($im,($b*5),($b*5),10+($b*5),10+($b*5),0);
  107. imagefilledrectangle($im,($b*1),($b*5),10+($b*1),10+($b*5),0);
  108. imagefilledrectangle($im,($b*3)*2,($b*1)+$b,10+($b*3)*2,10+($b*1)+$b,0);
  109. imagefilledrectangle($im,($b*4)*2,($b*2)+$b,10+($b*4)*2,10+($b*2)+$b,0);
  110. $fname = 'tmp/'.$b.'.gif';
  111. imagegif($im, $fname);
  112. $this->frames[] = $fname;
  113. $this->framed[] = 1;
  114. }
  115. $this->imprimir();
  116. }
  117.  
  118. public function desliz()
  119. {
  120. $imgwidth = imagesx($this->captcha);
  121. $imgheight = imagesy($this->captcha);
  122. $frames_x = 30;
  123. for($b=0;$b<$frames_x;$b++){
  124. $im = imagecreatetruecolor(150, 80);
  125. imagecopy($im, $this->captcha, 0, 0, 0, 0, imagesx($this->captcha), imagesy($this->captcha));
  126. //fix
  127. $white = ImageColorAllocate($im,255,255,255);
  128. ImageFill($im,0,0,$white);
  129. imagefilledrectangle($im,($b - 1) * 8 + 8,1,$imgwidth,$imgheight, 0);
  130. $fname = 'tmp/'.$b.'.gif';
  131. imagegif($im, $fname);
  132. $this->frames[] = $fname;
  133. $this->framed[] = 1;
  134. }
  135. $this->imprimir();
  136. }
  137. }
  138.  
  139. // Animacion aleatoria
  140. $showtime = new Animacion();
  141. //$showtime->guardar();
  142.  
  143. // Seleccionar animacion
  144. //$showtime = new Animacion(0);
  145. //$showtime->bum();
  146.  
  147. // Sin animacion
  148. //$showtime = new Captcha();
  149. //$showtime->imprimir();
  150.  
  151. ?>
  152.  
1032  Foros Generales / Dudas Generales / Re: żLas artes marciales encajan con la vida informatica? en: 24 Enero 2012, 21:23 pm


Johnny Long(DefCon 15)  ;)
1033  Foros Generales / Noticias / Re: Ley SOPA: Poringa, Taringa y Facebook en la mira del FBI en: 22 Enero 2012, 23:31 pm
Tienes razon, pero que casualidad que todo paso en mera "revolucion" contra la ley SOPA, mera casualidad que se le hayan sacado miles de pretextos para encerrarlos. Como si miles de paginas mas no hicieran lo mismo.

Megaupload solo fue un aviso, muchos sitios empezaron su limpieza de contenidos y enlaces.
1034  Foros Generales / Noticias / Re: Cierre de MU en: 20 Enero 2012, 01:22 am


En pastebin se adelantaron un poco, hayer expusieron los datos de este hombre, su esposa, hijo, hermana, etc.
1035  Foros Generales / Noticias / Re: Cierre de MU en: 19 Enero 2012, 22:47 pm
http://pastebin.com/1egqgUiS

http://www.justice.gov/dag/iptaskforce/
1036  Foros Generales / Noticias / Re: Cierre de MU en: 19 Enero 2012, 22:31 pm
No se puede entar ni por ip 174.140.154.20, żpero es solo a MU o empezó una redada en otro sitios?
1037  Media / Juegos y Consolas / Re: Problema en Star Wars El Poder de la Fuerza PC en: 18 Enero 2012, 15:00 pm
el doble salto es saltar dos veces continuas el problema es que en la segunda vez no lo hace, por ello odio los juegos de plata forma por que tengo que hacerlo mas de 1000 veces para poder llegar a la otra plataforma.

Ó podrias comprarte un joystick, no estan tan caros y ademas este juego reconoce enseguida al joystick, vale la pena.
1038  Media / Juegos y Consolas / Re: Problema en Star Wars El Poder de la Fuerza PC en: 18 Enero 2012, 13:52 pm
Fijate en la configuracion de los controles para saber cual es el doble salto.
1039  Media / Juegos y Consolas / Re: Problema en Star Wars El Poder de la Fuerza PC en: 18 Enero 2012, 01:07 am
'Usa la fuerza'
1040  Media / Multimedia / Re: harto DE LA m. de Youtube en: 12 Enero 2012, 17:30 pm
Agarrá una bateria, una guitarra electrica, un bajo y usá tu voz para crear un tema musical para tus videos... ahora enserio drvy | BSM, ya lo dijo, no podes usar temas musicales de bandas que son tan comerciales como Evanescence, la musica hasta la misma letra le pertenece a la disquera, youtube tiene ese filtro para que el sitio pueda seguir existiendo y funcionando de lo contrario abririan muchos juicios encontra de youtube.

PD: Es increible la cantidad de videos armados con temas de Evanescence, Metallica, System of a Down entre otros que ya apenas suena el tema, le saco el audio.
Páginas: 1 ... 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 [104] 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 ... 135
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines