Skip to content

Commit

Permalink
Update igbf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
s41r4j authored May 15, 2023
1 parent bdee32a commit 5bbcd48
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions igbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def check_connection():
return True
else:
return False
except requests.exceptions.ConnectionError:
raise requests.exceptions.ConnectionError
except:
return False

Expand All @@ -174,7 +176,9 @@ def get_proxies(verbose, proxy_limit):
try:
import bs4
except:
printit("[!] Installing required modules for proxy\n", coledt=[1, 49, 92], line_up=True, space_down=True)
install('beautifulsoup4')
printit("[+] Modules installed successfully\n", coledt=[1, 49, 92], space_up=True, line_down=True)
import bs4

# Fetching proxy list
Expand All @@ -194,11 +198,11 @@ def fetch(session, url):
except:
printit('[!] Failed to fetch proxy list', coledt=[1, 49, 91])
while True:
print("\n[?] Continue without proxy? (y/n): ", end='')
print("[?] Continue without proxy? (y/n): ", end='')
choice = input().lower()
if choice == 'y':
proxy = False
return
print()
return False
elif choice == 'n':
raise KeyboardInterrupt()
else:
Expand Down Expand Up @@ -245,13 +249,14 @@ def print_login_failed(password, verbose, proxy, proxies, login_response_status_

def main():
# Taking command line arguments using argparse
parser = argparse.ArgumentParser(description='(s41r4j:igbf)> Instagram Brute Force')
parser = argparse.ArgumentParser(description='(s41r4j:igbf)> Instagram Brute Forcer')
parser.add_argument('-u', '--username', help='instagram username (*required)', metavar='USERNAME')
parser.add_argument('-w', '--wordlist', help='password wordlist (*required)', metavar='WORDLIST PATH')
parser.add_argument('-t', '--timeout', help='timeout between each request in secs (default: 2)', default=2, type=int)
parser.add_argument('-v', '--verbose', help='verbose mode (displays failed logins and more)', action='store_true', default=False)
parser.add_argument('-p', '--proxy', help='use ip rotating proxy (additinal library required)', action='store_true', default=False)
parser.add_argument('-l', '--proxy-limit', help='limit the number of proxies to use (default: 300; max: 300; min: 1)', default=300, type=int)
# parser.add_argument('-g', '--get', help='update the program to the latest version', action='store_true', default=False)
args = parser.parse_args()

# Assigning the arguments to variables
Expand Down Expand Up @@ -316,6 +321,7 @@ def main():

# Generating proxy list
if proxy: proxies = get_proxies(verbose, proxy_limit)
if not proxies: proxy = False

# Starting the brute force
printit('[#] Starting the brute force...\n', coledt=[1, 49, 91])
Expand Down Expand Up @@ -449,8 +455,8 @@ def main():
try:
main()
except KeyboardInterrupt:
print('\n[!] Exiting...')
printit('\n\n[:)] Exiting the program...', coledt=[1, 49, 92], line_down=True)
sys.exit()
except requests.exceptions.ConnectionError:
print("\n[!] Internet connection is required!\n[!] Exiting...")
printit("\n[!] Internet connection is required!\n[;)] Exiting the program...", coledt=[1, 49, 91], line_down=True)
sys.exit()

0 comments on commit 5bbcd48

Please sign in to comment.