VanGans

Http header tools

Feb 10th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php
  2. // HTTP Header Tool - HeadByte Version 1.0 ( Beta )
  3. // Coded By VanGans - AnarchoXploit
  4. // PHP Code - USE PHP CURL
  5. error_reporting(0);
  6. while(true) {
  7. echo "\nOption : ";
  8. $op = trim(fgets(STDIN));
  9. if($op == "set cookie") {
  10. echo "\nSet Cookie File : ";
  11. $cookie = trim(fgets(STDIN));
  12. }
  13. if($op == "post") {
  14. echo "\nSelect Type Post Header : ";
  15. $tpost = trim(fgets(STDIN));
  16. if($tpost == "fields") {
  17. echo "\nURL : ";
  18. $urlf = trim(fgets(STDIN));
  19. echo "\nPOST FIELDS : ";
  20. $postf = trim(fgets(STDIN));
  21. echo "\n";
  22. $c = curl_init();
  23. curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  24. curl_setopt($c, CURLOPT_URL, $urlf);
  25. curl_setopt($c, CURLOPT_POSTFIELDS, $postf);
  26. curl_setopt($c, CURLOPT_COOKIEFILE, $cookie);
  27. curl_setopt($c, CURLOPT_COOKIEJAR, $cookie);
  28. curl_setopt($c, CURLOPT_VERBOSE, 10);
  29. $postf = curl_exec($c);
  30. if($postf) {
  31. } else {
  32. echo "\nCheck Network Or Target";
  33. }
  34. echo "\n";
  35. }
  36. if($tpost == "bruteforce") {
  37. echo "\nURL : ";
  38. $urlb = trim(fgets(STDIN));
  39. $c = curl_init();
  40. }
  41. }
  42. if($op == "get") {
  43. echo "\nSelect Type Get Header : ";
  44. $tget = trim(fgets(STDIN));
  45. if($tget == "direct") {
  46. echo "\nURL : ";
  47. $urld = trim(fgets(STDIN));
  48. $gdirect = curl_init();
  49. curl_setopt($gdirect, CURLOPT_RETURNTRANSFER, 1);
  50. curl_setopt($gdirect, CURLOPT_URL, $urld);
  51. curl_setopt($gdirect, CURLOPT_VERBOSE, true);
  52. $direct_res = curl_exec($gdirect);
  53. if($direct_res) {
  54. echo "\n$direct_res\n";
  55. } else {
  56. echo "\nCheck Network Or Target";
  57. }
  58. }
  59. if($tget == "cookie") {
  60. echo "\nURL : ";
  61. $urld = trim(fgets(STDIN));
  62. $gcookie = curl_init();
  63. curl_setopt($gcookie, CURLOPT_RETURNTRANSFER, 1);
  64. curl_setopt($gcookie, CURLOPT_URL, $urld);
  65. curl_setopt($gcookie, CURLOPT_COOKIEFILE, $cookie);
  66. curl_setopt($gcookie, CURLOPT_COOKIEJAR, $cookie);
  67. curl_setopt($gcookie, CURLOPT_VERBOSE, true);
  68. $direct_res = curl_exec($gdirect);
  69. if($direct_res) {
  70. echo "\n$direct_res\n";
  71. } else {
  72. echo "\nCheck Network Or Target";
  73. }
  74. }
  75. }
  76. }
  77. ?>
Advertisement
Add Comment
Please, Sign In to add comment