Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]PHP captcha breaker
Forum PHP.pl > Forum > Przedszkole
ox1de
Witam mam pytanie odnoscie jak powinien wygladac kod w php curl ktory po otworzeniu bedzie przechodzil na daną stronę i łamał obrazek captcha w tym przypadku jest on na stalym linku http://timetoexcite.pl/crypt/cryptographp.php?cfg=0&
mam przykladowy kod captcha breakera
  1. <?php
  2. //Set the header to say what sort of information we are giving the browser
  3. Header ("(anti-spam-content-type:) image/png");
  4.  
  5. //Generate 2 random numbers for use in our encryption
  6. $enc_num = rand(0, 9999); //This number will be encrypted
  7. $key_num = rand(0, 24); //This is used to choose which bit of our string to use in the image
  8.  
  9. //Use these to get a random string of numbers and letters using MD5
  10. //We then cut the 32 char MD5 down to an 8 char string, starting from a random point
  11. $hash_string = substr(md5($enc_num), $key_num, 8);
  12.  
  13. //MD5 the $hash_string variable again
  14. $hash_md5 = md5($hash_string);
  15.  
  16. //Asign it to a session
  17. $_SESSION['captcha'] = $hash_md5;
  18.  
  19. //Create an array of the images available to us as backgrounds
  20. $bgs = array("lipsum.png", "fibres.png", "rainbow.png");
  21.  
  22. //Choose the background image using the handy array_rand function
  23. $background = array_rand($bgs, 1);
  24.  
  25. //Now to start creating the all important image!
  26. //Set the background as our randomly selected image
  27. $img_handle = imagecreatefrompng($bgs[$background]);
  28.  
  29. //Set our text colour to white
  30. $text_colour = imagecolorallocate($img_handle, 255, 255, 255);
  31.  
  32. //Set the font size
  33. $font_size = 5;
  34.  
  35. //Get the horizontal and vertical dimensions of the background image
  36. $size_array = getimagesize($bgs[$background]);
  37. $img_w = $size_array[0];
  38. $img_h = $size_array[1];
  39.  
  40. //Work out the horizontal position
  41. $horiz = round(($img_w/2)-((strlen($hash_string)*imagefontwidth(5))/2), 1);
  42.  
  43. //Work out the vertical position
  44. $vert = round(($img_h/2)-(imagefontheight($font_size)/2));
  45.  
  46. //Put our text onto our image
  47. imagestring($img_handle, $font_size, $horiz, $vert, $hash_string, $text_colour);
  48.  
  49. //Output the image
  50. imagepng($img_handle);
  51.  
  52. //Destroy the image to free up resources
  53. imagedestroy($img_handle);
  54.  
  55. ?>

ale nie wiem jak powinien on wygladac w calosci
pozdrawiam
osl
sorry, ale to co podałeś to raczej nie ma wiele wspólnego z łamaniem Captcha - to generuje właśnie coś w rodzaju captcha...
i mam wątpliwości, czy ktoś będzie chciał Ci pomóc w łamaniu tego typu zabezpieczeń... chyba że masz naprawde jakiś wyższy cel winksmiley.jpg
Spawnm
Zamykam.
Nie pomagamy w nielegalnych praktykach .
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.