Skip to content

Commit

Permalink
feat: add error msg for missing config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sundowndev committed Feb 13, 2020
1 parent 5d93077 commit 814a3c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion phoneinfoga.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
from scanners import ovh
from scanners.footprints import osintScan
from scanners import recon
from pathlib import Path

configFile = Path(sys.path[0] + "/config.py")

def scanNumber(InputNumber):
title("[!] ---- Fetching informations for {} ---- [!]".format(formatNumber(InputNumber)))
Expand Down Expand Up @@ -59,12 +61,16 @@ def main():
print("Version {}".format(__version__))
sys.exit()

if not configFile.is_file():
error("The config file does not exist. Please create it.")
sys.exit()

if args.output:
sys.stdout = Logger()

# Verify scanner option
if not args.scanner in scanners:
print(("Error: scanner doesn't exists."))
print(("Error: scanner doesn't exist."))
sys.exit()

if args.number:
Expand Down

0 comments on commit 814a3c9

Please sign in to comment.