Skip to content

Commit e05f7ca

Browse files
committed
minor changes
1 parent 7cceb92 commit e05f7ca

File tree

2 files changed

+54
-40
lines changed

2 files changed

+54
-40
lines changed

IMPORTANT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ⚠️IMPORTANT⚠️
22

3-
**Although there is the option to use IGFI without the session file, please avoid using it because the manual login it's unstable.**
3+
**Although it's not bounding, it's recommended to include the session file in the arguments passing, in order to avoid program interruptions**
44

5-
**It's suggested to use IGFI with root privileges in order to avoid possible errors**
5+
**It's suggested to use IGFI with root privileges in order to avoid possible program interruptions.**
66

77
**Use IGFI every 2-3 days in order for your account not to get suspended or eved blocked !**

igfi.py

+52-38
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
sleep(1.2)
3131
print("[+] Exiting...")
3232
sleep(0.8)
33-
quit()
33+
quit(0)
3434
import platform
3535
from os import system
3636
from rich.align import Align
@@ -93,34 +93,42 @@
9393
sleep(1.1)
9494
console.clear()
9595

96+
headers = {
97+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'
98+
}
99+
js = ''
100+
resp = requests.get('https://api.github.com/repos/new92/IGFI', headers=headers)
101+
if resp.status_code == 200:
102+
js = resp.json()
103+
96104
def ScriptInfo():
97-
with open('./files/config.json') as config:
98-
conf = json.load(config)
105+
rest = requests.get('https://api.github.com/repos/new92/IGFI/contributors', headers=headers)
106+
contribs = []
107+
if rest.status_code == 200:
108+
jsn = rest.json()
109+
contribs = [jsn[i]['login'] for i in range(len(jsn))]
110+
lang = requests.get('https://api.github.com/repos/new92/IGFI/languages', headers=headers)
111+
languages = list(lang.json().keys()) if lang.status_code == 200 else []
99112
fsize = os.stat(__file__).st_size
100-
print(f"{YELLOW}[+] Author >>> {conf['author']}")
101-
print(f"{YELLOW}[+] Github >>> @{conf['author']}")
102-
print(f"{YELLOW}[+] Leetcode >>> @{conf['author']}")
103-
print(f"{YELLOW}[+] PyPI >>> @{conf['author']}")
104-
print(f"{YELLOW}[+] Contributors >>> {conf['contributors']}")
105-
print(f"{YELLOW}[+] License >>> {conf['lice']}")
106-
print(f"{YELLOW}[+] Natural language >>> {conf['lang']}")
107-
print(f"{YELLOW}[+] Programming language(s) used >>> {conf['language']}")
108-
print(f"{YELLOW}[+] Number of lines >>> {conf['lines']}")
109-
print(f"{YELLOW}[+] Script's name >>> 'igfi'")
110-
print(f"{YELLOW}[+] API(s) used >>> {conf['api']}")
111-
print(f"{YELLOW}[+] Latest update >>> {conf['update']}")
112-
print(f"{YELLOW}[+] File size >>> {fsize} bytes")
113-
print(f"{YELLOW}[+] File path >>> {fpath(conf['name'])}")
113+
print(f"{YELLOW}[+] Author | {js['owner']['login']}")
114+
print(f"{YELLOW}[+] Github | @{js['owner']['login']}")
115+
print(f"{YELLOW}[+] Leetcode | @{js['owner']['login']}")
116+
print(f"{YELLOW}[+] PyPI | @{js['owner']['login']}")
117+
print(f"{YELLOW}[+] Contributors | {contribs}")
118+
print(f"{YELLOW}[+] License | {js['license']['spdx_id']}")
119+
print(f"{YELLOW}[+] Programming language(s) used | {languages}")
120+
print(f"{YELLOW}[+] Script's name | {js['name']}")
121+
print(f"{YELLOW}[+] Latest update | {js['updated_at']}")
122+
print(f"{YELLOW}[+] File size | {fsize} bytes")
123+
print(f"{YELLOW}[+] File path | {os.path.abspath(__file__)}")
114124
print(f"{YELLOW}|======|GITHUB REPO INFO|======|")
115-
print(f"{YELLOW}[+] Repo name >>> {conf['name']}")
116-
print(f"{YELLOW}[+] Repo URL >>> {conf['url']}")
117-
print(f"{YELLOW}[+] Stars >>> {conf['stars']}")
118-
print(f"{YELLOW}[+] Forks >>> {conf['forks']}")
119-
print(f"{YELLOW}[+] Open issues >>> {conf['issues']}")
120-
print(f"{YELLOW}[+] Closed issues >>> {conf['clissues']}")
121-
print(f"{YELLOW}[+] Open pull requests >>> {conf['prs']}")
122-
print(f"{YELLOW}[+] Closed pull requests >>> {conf['clprs']}")
123-
print(f"{YELLOW}[+] Discussions >>> {conf['discs']}")
125+
print(f"{YELLOW}[+] Repo name | {js['name']}")
126+
print(f"{YELLOW}[+] Description | {js['description']}")
127+
print(f"{YELLOW}[+] Repo URL | {js['html_url']}")
128+
print(f"{YELLOW}[+] Stars | {js['stargazers_count']}")
129+
print(f"{YELLOW}[+] Forks | {js['forks']}")
130+
print(f"{YELLOW}[+] Watchers | {js['subscribers_count']}")
131+
print(f"{YELLOW}[+] Open issues | {js['open_issues_count']}")
124132

125133
def fpath(fname: str):
126134
for root, dirs, files in os.walk('/'):
@@ -166,13 +174,13 @@ def rmdir(dire):
166174

167175
def banner() -> str:
168176
console.print("""[bold yellow]
169-
██╗░██████╗░███████╗██╗
170-
██║██╔════╝░██╔════╝██║
171-
██║██║░░██╗░█████╗░░██║
172-
██║██║░░╚██╗██╔══╝░░██║
173-
██║╚██████╔╝██║░░░░░██║
174-
╚═╝░╚═════╝░╚═╝░░░░░╚═╝
175-
[/]""")
177+
██╗░██████╗░███████╗██╗
178+
██║██╔════╝░██╔════╝██║
179+
██║██║░░██╗░█████╗░░██║
180+
██║██║░░╚██╗██╔══╝░░██║
181+
██║╚██████╔╝██║░░░░░██║
182+
╚═╝░╚═════╝░╚═╝░░░░░╚═╝
183+
[/]""", justify='center')
176184

177185
def nums():
178186
console.print("[bold yellow][1] Increase followers[/]")
@@ -196,7 +204,7 @@ def main(username: str, password: str, session: str):
196204
for row in TABLE:
197205
table.add_row(*row)
198206
print("\n")
199-
console.print("[bold yellow][+] IGFI is a python script for increasing the number of followers of an Instagram account.")
207+
console.print(f"[bold yellow][+] {js['description']}" if js else 'IGFI is a python script for increasing the number of followers of an Instagram account.')
200208
print("\n")
201209
nums()
202210
print("\n")
@@ -614,12 +622,18 @@ def main(username: str, password: str, session: str):
614622
if __name__ == '__main__':
615623
sleep(2)
616624
clear()
617-
if len(sys.argv) == 1:
618-
print(f"{GREEN}[+] Usage >>> python3 igfi.py -u <username> -p <password>")
619-
quit(0)
620625
parser = argparse.ArgumentParser(description='IGFI is the best tool for increasing followers on Instagram.')
621626
parser.add_argument('-u', '--username', help='The username to increase their followers.')
622627
parser.add_argument('-p', '--password', help='The password of your instagram account.')
623628
parser.add_argument('--session', help='The session file to use. To generate it: python3 cookies.py')
624629
args = parser.parse_args()
625-
main(username=str(args.username).strip().lower(), password=str(args.password).strip(), session=str(args.session).replace('\\', '/'))
630+
if len(sys.argv) < 3:
631+
print(f"{RED}[x] Error: Missing arguments.")
632+
sleep(0.7)
633+
print(f"{GREEN}[+] Usage >>> python3 igfi.py -u <username> -p <password> --session <session_file>")
634+
sleep(1.5)
635+
username=input(f"{YELLOW}[::] Please enter your username >>> ")
636+
password=input(f"{YELLOW}[::] Please enter your password >>> ")
637+
session=input(f"{YELLOW}[::] Please enter the session file (if created else hit <Enter>) >>> ")
638+
args.username, args.password, args.session = username, password, session
639+
main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.replace('\\', '/'))

0 commit comments

Comments
 (0)