Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ip ban prevention #13

Merged
merged 5 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 3 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# INSTA-GEN

### YOU ARE VIEWING A DEVELOPMENT BRANCH OR IN OTHER WORDS "NOT STABLE"

_**Developed By : ZDAY-X**_


Expand All @@ -16,52 +18,10 @@ ____________________________________________________________________________
TIP: Check out *GUI BRANCH* to see source code of the Gui Version of this software.
____________________________________________________________________________

This Branch purely dedicated to work on **ip-ban prevention** and work around if the **IP got banned**.



![image](https://user-images.githubusercontent.com/83881453/149974578-89254d68-8992-4f7b-8d48-17782fe224b7.png)

#### _**CREATE UNLIMITED ACCOUNTS**_

![image](https://user-images.githubusercontent.com/83881453/149974059-fdaf20b3-7f3b-4baa-9176-d2efce3ef44c.png)


#### _AUTOMATE EMAIL VERIFICATION_

![image](https://user-images.githubusercontent.com/83881453/149974406-774faad5-cf73-4ca1-bf78-b89aaeb9a64c.png)


**NOTE: CREDENTIALS Of The Generated Accounts Will Be Stored In a File Called "cred.txt"**


____________________________________________________________________________
# INSTALLATION INSTRUCTIONS [DEBIAN LINUX]
____________________________________________________________________________

Clone the Repository
```bash
git clone https://github.com/Zday-X/INSTA-GEN.git
```
Change Directory
```bash
cd INSTA-GEN
```
Install The Dependencies
```bash
pip3 install -r requirements.txt
```
Make It Executable
```bash
chmod +x inst-gen.py
```
Run The File
```bash
./inst-gen.py
```
____________________________________________________________________________
____________________________________________________________________________



## [![Repography logo](https://images.repography.com/logo.svg)](https://repography.com) / Recent activity [![Time period](https://images.repography.com/25069934/Zday-X/INSTA-GEN/recent-activity/218948358d811497243ff45ac44fba8d_badge.svg)](https://repography.com)
[![Timeline graph](https://images.repography.com/25069934/Zday-X/INSTA-GEN/recent-activity/218948358d811497243ff45ac44fba8d_timeline.svg)](https://github.com/Zday-X/INSTA-GEN/commits)
Expand Down
203 changes: 107 additions & 96 deletions inst-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,106 +28,116 @@ def _insta_gen(
password=str(pwo.generate()) + str(random.randint(1, 999999999999)),
):
time = int(datetime.now().timestamp())
with requests.Session() as s:
s.get(link)
csrf = s.cookies["csrftoken"]
mid = s.cookies["mid"]

payload_creation = {
"enc_password": f"#PWD_INSTAGRAM_BROWSER:0:{time}:{password}",
"email": email,
"username": user_name,
"first_name": first_name,
"opt_into_one_tap": "false",
"client_id": mid,
"seamless_login_enabled": "1",
}

s.post(
create_url,
data=payload_creation,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/accounts/emailsignup/",
"x-csrftoken": csrf,
},
)

payload_verify_mail = {"device_id": mid, "email": email}

s.post(
verify_mail,
data=payload_verify_mail,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/",
"x-csrftoken": csrf,
},
)
import time
try:
with requests.Session() as s:
s.get(link)
csrf = s.cookies["csrftoken"]
mid = s.cookies["mid"]

# Payload to initialize the account.
payload_creation = {
"enc_password": f"#PWD_INSTAGRAM_BROWSER:0:{time}:{password}",
"email": email,
"username": user_name,
"first_name": first_name,
"opt_into_one_tap": "false",
"client_id": mid,
"seamless_login_enabled": "1",
}

s.post(
create_url,
data=payload_creation,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/accounts/emailsignup/",
"x-csrftoken": csrf,
},
)

while 1:
time.sleep(1.5)
messages = acc_inst.get_messages()
try:
inst_mail = messages[0]
verification_code = inst_mail.subject[:6]
break
except:
pass
payload_check_code = {
"code": verification_code,
"device_id": mid,
"email": email,
}

resp_code = s.post(
check_confo,
data=payload_check_code,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/",
"x-csrftoken": csrf,
},
)
payload_verify_mail = {"device_id": mid, "email": email}

# Payload to request OTP to the temporary mail.
s.post(
verify_mail,
data=payload_verify_mail,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/",
"x-csrftoken": csrf,
},
)
import time

resp_json = resp_code.json()
signup_code = resp_json["signup_code"]

create_final_payload = {
"enc_password": f"#PWD_INSTAGRAM_BROWSER:0:{time}:{password}",
"email": email,
"username": user_name,
"first_name": first_name,
"month": "1",
"day": "18",
"year": "1972",
"opt_into_one_tap": "false",
"client_id": mid,
"seamless_login_enabled": "1",
"tos_version": "row",
"force_sign_up_code": signup_code,
}

s.post(
final_create_url,
data=create_final_payload,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/accounts/emailsignup/",
"x-csrftoken": csrf,
},
)
# Constantly Check for incomming email from instgram server in our mail inbox and get otp.
while 1:
time.sleep(1.5)
messages = acc_inst.get_messages()
try:
inst_mail = messages[0]
verification_code = inst_mail.subject[:6]
break
except:
pass
# Payload to verify OTP with instagram servers.
payload_check_code = {
"code": verification_code,
"device_id": mid,
"email": email,
}

resp_code = s.post(
check_confo,
data=payload_check_code,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/",
"x-csrftoken": csrf,
},
)

resp_json = resp_code.json()
signup_code = resp_json["signup_code"]

# Final payload to finalize creating the account.
create_final_payload = {
"enc_password": f"#PWD_INSTAGRAM_BROWSER:0:{time}:{password}",
"email": email,
"username": user_name,
"first_name": first_name,
"month": "1",
"day": "18",
"year": "1972",
"opt_into_one_tap": "false",
"client_id": mid,
"seamless_login_enabled": "1",
"tos_version": "row",
"force_sign_up_code": signup_code,
}

s.post(
final_create_url,
data=create_final_payload,
headers={
"user-agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"x-requested-with": "XMLHttpRequest",
"referer": "https://www.instagram.com/accounts/emailsignup/",
"x-csrftoken": csrf,
},
)

with open("cred.txt", "a") as f:
f.write("\n\n")
f.write(f"EMAIL: {email}\n")
f.write(f"USERNAME: {user_name}\n")
f.write(f"PASSWORD: {password}\n")
with open("cred.txt", "a") as f:
f.write("\n\n")
f.write(f"EMAIL: {email}\n")
f.write(f"USERNAME: {user_name}\n")
f.write(f"PASSWORD: {password}\n")
except KeyError:
print("ERROR: UNABLE TO FETCH CSRF_TOKEN")
print("PROBABLE CAUSE: IP BANNING")


class bcolors:
Expand Down Expand Up @@ -203,6 +213,7 @@ def _create_acc():
sys.stdout.write(instagen)

# Make this one as not equals too in future
# Change this one to != to run in linux :)
if platform.system().lower() == "windows":
print(f"\t\t\t\t\t\t\t\t\t{bcolors.HEADER} DEV :-", end="")
sys.stdout.write(f"{bcolors.FAIL }{author}")
Expand Down