Skip to content

Commit 509b67f

Browse files
authored
Update lfi.py
1 parent 455d9a2 commit 509b67f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

lfi.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,20 @@ def run(self):
7979
self.google_lfi(take_number)
8080
print(Fore.GREEN + Style.BRIGHT + "Search finished.")
8181
elif a == "2":
82-
url_list_path = input(Fore.CYAN + Style.BRIGHT + "Enter the URL list file path: ")
83-
with open(url_list_path, 'r') as f:
84-
urls = f.readlines()
85-
for url in urls:
86-
url = url.strip()
87-
if self.check_lfi(url):
88-
print(Fore.GREEN + Style.BRIGHT + "LFI vulnerability found at %s" % url)
89-
else:
90-
print(Fore.BLUE + Style.BRIGHT + "LFI is not found at %s" % url)
91-
print(Fore.GREEN + Style.BRIGHT + "Search finished.")
82+
try:
83+
url_list_path = input("<You can be add in url.txt>>\n" +Fore.CYAN + Style.BRIGHT + "Enter the URL list file path: ")
84+
with open(url_list_path, 'r') as f:
85+
urls = f.readlines()
86+
for url in urls:
87+
url = url.strip()
88+
if self.check_lfi(url):
89+
print(Fore.GREEN + Style.BRIGHT + "LFI vulnerability found at %s" % url)
90+
else:
91+
print(Fore.BLUE + Style.BRIGHT + "LFI is not found at %s" % url)
92+
print(Fore.GREEN + Style.BRIGHT + "Search finished.")
93+
except:
94+
print(Fore.RED + Style.BRIGHT + "You need to select url LIST file!?")
95+
continue
9296
elif a == "0":
9397
print(Fore.CYAN + Style.BRIGHT + "Quitting...")
9498
break

0 commit comments

Comments
 (0)