0

I'm on a blackbox penetration training, last time i asked a question about sql injection which so far im making a progress on it i was able to retrieve the database and the column.

This time i need to find the admin login, so i used dirsearch for that, i checked each webdirectories from dirsearch and sometimes it would show the same page as index.html.

So i'm trying to fix this by automating the process with a script:

import requests

url = "http://depedqc.ph";
webdirectory_path = "C:/PentestingLabs/Dirsearch/reports/depedqc.ph/scanned_webdirectory9-3-2022.txt";

index = requests.get(url);
same = index.content

for webdirectory in open(webdirectory_path, "r").readlines():
    webdirectory_split = webdirectory.split();
    result = result = [i for i in webdirectory_split if i.startswith(url)];
    result = ''.join(result);
    print(result);
    response = requests.get(result);
    if response.content == same:
        print("same content");

Only problem is, i get this error: Invalid URL '': No scheme supplied. Perhaps you meant http://?

Even though the printed result is: http://depedqc.ph/html What am i doing wrong here? i appreciate a feedback

i39
  • 11
  • 2

0 Answers0