├── InstaReport-Logo.png
├── requirements.txt
├── acc.txt
├── README.md
└── InstaReport.py
/InstaReport-Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deadprogramers/InstaReport/HEAD/InstaReport-Logo.png
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | selenium>=4.0.0
2 | psutil>=5.8.0
3 | cryptography>=3.4.0
4 |
5 |
6 | webdriver-manager>=3.8.0
7 |
8 |
--------------------------------------------------------------------------------
/acc.txt:
--------------------------------------------------------------------------------
1 | api_key: paste your key here
2 | api_sescret: paste you api secret here
3 |
4 |
5 |
6 | you can get your api key here
7 | telegram: @aslVpsBot
8 |
9 | click /start and proceed
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # 🚫 InstaReport — Social media Auto Report Unban & Ban Tool (v4.3.1)
6 |
7 | > **InstaReport** is a premium social media reporting and banning script that allows single-click automation to ban accounts or content.
8 | ...
9 |
10 | [](https://www.python.org/)
11 | [](http://instagramban.unaux.com/)
12 | [](https://t.me/iEscly)
13 |
14 | ---
15 |
16 | ## ⚙️ Features
17 |
18 | - 🔥 Next-gen auto-ban engine for Instagram accounts and content
19 | - 🛡️ Social unbanning support (Instagram, Snapchat, Twitter, TikTok)
20 | - 🕵️ Built-in social info scraper
21 | - 💣 Cross-platform targetting (Instagram, Twitter, Threads, Snapchat)
22 | - 🎯 License price: run main file to know
23 | - 🤝 Purchase: [@iEscly](https://t.me/iEscly)
24 |
25 | ---
26 |
27 | ## 💻 Compatibility
28 |
29 | Supported on:
30 |
31 | [](https://t.me/iEscly)
32 | [](https://t.me/iEscly)
33 | 
34 |
35 | ## 📦 Installation
36 |
37 | **Termux / Android** :
38 | ```bash
39 | apt update && apt upgrade
40 | pkg install python git
41 | git clone https://github.com/iescly/InstaReport
42 | cd InstaReport
43 | pip install -r requirements.txt
44 | chmod +x InstaReport.py
45 | python InstaReport.py
46 | ```
47 |
48 | **Windows:**
49 | ```bash
50 | git clone https://github.com/iescly/InstaReport
51 | cd InstaReport
52 | pip install -r requirements.txt
53 | python InstaReport.py
54 | ```
55 |
56 | **Kali Linux:**
57 | ```bash
58 | sudo apt update
59 | sudo apt install python3 python3-pip git
60 | git clone https://github.com/iescly/InstaReport
61 | cd InstaReport
62 | pip3 install -r requirements.txt
63 | chmod +x InstaReport.py
64 | python3 InstaReport.py
65 | ```
66 |
67 | ---
68 |
69 | ## 🌐 Live Website Stats
70 |
71 | 
72 | [](https://stats.uptimerobot.com/GNoXKUztm1)
73 |
74 | > ✅ Real-time visitor tracking & uptime status for [instagramban.unaux.com](http://instagramban.unaux.com)
75 |
76 | ---
77 |
78 | ## 📊 GitHub Repository Stats
79 |
80 | [](https://github.com/iescly)
81 |
82 |
83 |
84 |
85 | ---
86 | ## 🎯 📩 Contact & Purchase
87 |
88 | - 💬 Telegram: [@iEscly](https://t.me/iEscly)
89 | - 📷 Instagram: [@i3scly](https://www.instagram.com/i3scly?utm_source=ig_web_button_share_sheet&igsh=ZDNlZDc0MzIxNw==)
90 | - 📦 Buy License: [Click Here](https://t.me/iEscly)
91 | - 🌐 Official Website: [instagramban.unaux.com](http://instagramban.unaux.com)
92 |
93 | ---
94 |
95 | ## ⚠️ Disclaimer
96 | This tool is for **educational and research** purposes only. Misuse may violate Instagram's Terms of Service. Use responsibly.
97 |
98 | ---
99 |
100 | *Dual-powered by an AI and his human BF—this README is hotter than 🔥.*
101 |
--------------------------------------------------------------------------------
/InstaReport.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 | import json
4 | import base64
5 | import hashlib
6 | import platform
7 | import subprocess
8 | import argparse
9 | import time
10 | from datetime import datetime, timedelta
11 | import uuid
12 |
13 | # Check for required modules
14 | try:
15 | from cryptography.fernet import Fernet
16 | from cryptography.hazmat.primitives import hashes
17 | from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
18 | import psutil
19 | except ImportError as e:
20 | print(f"Missing required module: {e}")
21 | print("Please install required packages:")
22 | print("pip install -r requirements.txt")
23 | print("or")
24 | print("pip install selenium psutil cryptography")
25 | input("Press Enter to exit...")
26 | sys.exit(1)
27 |
28 | # ==================== BASIC PROTECTION ====================
29 |
30 | def _check_debug():
31 | """Basic anti-debugging check"""
32 | try:
33 | debugger_processes = ['gdb', 'strace', 'ltrace', 'ida', 'ollydbg', 'x64dbg']
34 | for proc in psutil.process_iter(['name']):
35 | if proc.info['name'] and proc.info['name'].lower() in debugger_processes:
36 | print("Debugging detected. Exiting...")
37 | sys.exit(1)
38 | except:
39 | pass
40 |
41 | def _integrity_check():
42 | """Basic integrity check"""
43 | try:
44 | current_dir = os.path.dirname(os.path.abspath(__file__))
45 | expected_files = ['owner.key', 'acc.txt']
46 | for file in expected_files:
47 | if not os.path.exists(os.path.join(current_dir, file)):
48 | pass # Continue anyway
49 | except:
50 | pass
51 |
52 | # Initialize basic protection
53 | # _check_debug()
54 | # _integrity_check()
55 |
56 | # ==================== LICENSE VALIDATION SYSTEM ====================
57 |
58 | class LicenseSystem:
59 | def __init__(self):
60 | # Encoded keys for basic protection
61 | self.owner_bypass_key = base64.b64decode(b'T1dORVJfTUFTVEVSXzIwMjRfSU5TVEFSRVBPUlQ=').decode()
62 | self.license_codes_file = "valid_codes.dat"
63 | self.key_salt = b'instareport_salt_2024_v2'
64 |
65 | def check_owner_bypass(self):
66 | """Check if owner bypass is activated"""
67 | try:
68 | if os.path.exists("owner.key"):
69 | with open("owner.key", "r") as f:
70 | key = f.read().strip()
71 | if key == self.owner_bypass_key:
72 | return True
73 | if os.environ.get("INSTAREPORT_OWNER") == self.owner_bypass_key:
74 | return True
75 | return False
76 | except:
77 | return False
78 |
79 | def show_owner_login(self):
80 | """Show owner login interface"""
81 | print("\n" + "="*60)
82 | print(" INSTAREPORT - OWNER ACCESS")
83 | print("="*60)
84 | print("Enter owner master key to bypass license validation")
85 | print("(Leave empty to continue with public license validation)")
86 | print("-"*60)
87 |
88 | owner_key = input("Owner Master Key: ").strip()
89 |
90 | if owner_key == self.owner_bypass_key:
91 | with open("owner.key", "w") as f:
92 | f.write(self.owner_bypass_key)
93 | print("✅ Owner access granted! Bypass activated.")
94 | return True
95 | elif owner_key == "":
96 | return False
97 | else:
98 | print("❌ Invalid owner key!")
99 | return False
100 |
101 | def generate_key(self, password):
102 | """Generate encryption key from password"""
103 | kdf = PBKDF2HMAC(
104 | algorithm=hashes.SHA256(),
105 | length=32,
106 | salt=self.key_salt,
107 | iterations=100000,
108 | )
109 | key = base64.urlsafe_b64encode(kdf.derive(password.encode()))
110 | return key
111 |
112 | def load_valid_codes(self):
113 | """Load valid license codes from encrypted file"""
114 | try:
115 | if not os.path.exists(self.license_codes_file):
116 | return []
117 |
118 | with open(self.license_codes_file, 'rb') as f:
119 | encrypted_data = f.read()
120 |
121 | key = self.generate_key(self.owner_bypass_key)
122 | f = Fernet(key)
123 | decrypted_data = f.decrypt(encrypted_data).decode()
124 |
125 | codes_data = json.loads(decrypted_data)
126 | return codes_data.get('codes', [])
127 | except:
128 | return []
129 |
130 | def validate_license_code(self, code):
131 | """Validate entered license code"""
132 | valid_codes = self.load_valid_codes()
133 |
134 | for code_entry in valid_codes:
135 | if code_entry['code'] == code:
136 | if 'expiry' in code_entry:
137 | expiry_date = datetime.fromisoformat(code_entry['expiry'])
138 | if datetime.now() > expiry_date:
139 | return False, "License code expired"
140 |
141 | if 'uses_left' in code_entry and code_entry['uses_left'] <= 0:
142 | return False, "License code usage limit reached"
143 |
144 | return True, "Valid license code"
145 |
146 | return False, "Invalid license code"
147 |
148 | def show_payment_interface(self):
149 | """Show payment interface for users without license"""
150 | print("\n" + "="*70)
151 | print(" 🔒 INSTAREPORT - LICENSE REQUIRED 🔒")
152 | print("="*70)
153 | print("This software requires a valid license to run.")
154 | print("You can purchase a license or enter an existing license code.")
155 | print()
156 | print("💰 PRICING:")
157 | print(" • 30 Days License: $29.99")
158 | print(" • 90 Days License: $79.99")
159 | print(" • 1 Year License: $199.99")
160 | print(" • Lifetime License: $499.99")
161 | print()
162 | print("💳 PAYMENT METHODS:")
163 | print(" • upi: 9707905478")
164 | print(" • Crypto (USDT BSC bep20): 0xd1e005178b87cee6a815cf595ac98c1e9b93402e")
165 | print(" • Bank Transfer: Contact for details")
166 | print()
167 | print("📧 CONTACT FOR PURCHASE:")
168 | print(" • Email: nhackerraj@gmail.com")
169 | print(" • Telegram: @iEscly")
170 | print(" • instagram: @i3scly")
171 | print()
172 | print("🎫 ALREADY HAVE A LICENSE CODE?")
173 | print(" Enter it below to activate your license.")
174 | print("="*70)
175 |
176 | while True:
177 | print("\nOptions:")
178 | print("1. Enter license code")
179 | print("2. Purchase license (opens payment info)")
180 | print("3. Exit")
181 |
182 | choice = input("\nSelect option (1-3): ").strip()
183 |
184 | if choice == "1":
185 | code = input("Enter your license code: ").strip().upper()
186 | if code:
187 | valid, message = self.validate_license_code(code)
188 | if valid:
189 | print(f"✅ {message}")
190 | with open("user_license.txt", "w") as f:
191 | f.write(code)
192 | return True
193 | else:
194 | print(f"❌ {message}")
195 | print("Please check your code or contact support.")
196 | else:
197 | print("Please enter a valid code.")
198 |
199 | elif choice == "2":
200 | self.show_purchase_details()
201 |
202 | elif choice == "3":
203 | return False
204 |
205 | else:
206 | print("Invalid choice. Please select 1-3.")
207 |
208 | def show_purchase_details(self):
209 | """Show detailed purchase information"""
210 | print("\n" + "="*70)
211 | print(" 💳 PURCHASE INSTAREPORT LICENSE")
212 | print("="*70)
213 | print("STEP 1: Choose your license duration")
214 | print("STEP 2: Make payment using one of the methods below")
215 | print("STEP 3: Send payment proof")
216 | print("STEP 4: Receive your license code within 24 hours")
217 | print()
218 | print("💰 PAYMENT DETAILS:")
219 | print("-"*40)
220 | print("UPI: 9365593766@omni")
221 | print("USDT (BEP20): 0xb14efbbb184efd0b971f0ff2672d452d9f9fa3aa")
222 | print("Bitcoin: 3BbHenasptSireuNMbxQ7nofchPFFXhWtr")
223 | print("Ethereum: 0xb14efbbb184efd0b971f0ff2672d452d9f9fa3aa")
224 | print()
225 | print("📧 SEND PAYMENT PROOF TO:")
226 | print("-"*40)
227 | print("TeleGram: @iEscly")
228 | print("instaGram: @i3scly")
229 | print("Subject: License Purchase - [Your Name]")
230 | print("Include:")
231 | print(" • Payment screenshot/transaction ID")
232 | print(" • License duration purchased")
233 | print()
234 | print("⚡ FAST TRACK (Additional $5):")
235 | print("Get your license within 2 hours instead of 24 hours")
236 | print()
237 | print("🔄 REFUND POLICY:")
238 | print("30-day money back guarantee if not satisfied")
239 | print("="*70)
240 |
241 | input("\nPress Enter to return to main menu...")
242 |
243 | def check_saved_license(self):
244 | """Check if user has a saved license code"""
245 | try:
246 | if os.path.exists("user_license.txt"):
247 | with open("user_license.txt", "r") as f:
248 | code = f.read().strip()
249 | if code:
250 | valid, message = self.validate_license_code(code)
251 | if valid:
252 | return True
253 | else:
254 | os.remove("user_license.txt")
255 | return False
256 | except:
257 | return False
258 |
259 | def check_license(self):
260 | """Main license check function"""
261 | if self.check_owner_bypass():
262 | print("🔓 Owner access detected - bypassing license validation")
263 | return True
264 |
265 | if self.show_owner_login():
266 | return True
267 |
268 | if self.check_saved_license():
269 | print("✅ Valid license found")
270 | return True
271 |
272 | if self.show_payment_interface():
273 | return True
274 |
275 | print("\n❌ No valid license found. Exiting...")
276 | sys.exit(1)
277 |
278 | # ==================== APPLICATION COMPONENTS ====================
279 |
280 | def show_banner():
281 | """Display application banner"""
282 | banner = """
283 | ╔══════════════════════════════════════════════════════════════╗
284 | ║ INSTAREPORT - LICENSED ║
285 | ║ Mass Instagram Reporter ║
286 | ║ ║
287 | ║ 🔒 PROTECTED VERSION 🔒 ║
288 | ║ ║
289 | ║ This software is license protected ║
290 | ║ Unauthorized use prohibited ║
291 | ╚══════════════════════════════════════════════════════════════╝
292 | """
293 | print(banner)
294 | print("License Status: ✅ VALID")
295 | print("-" * 66)
296 |
297 | def show_loading_screen(duration):
298 | """Display loading animation"""
299 | chars = "|/-\\"
300 | for i in range(duration * 4):
301 | sys.stdout.write(f'\rLoading {chars[i % len(chars)]} ')
302 | sys.stdout.flush()
303 | time.sleep(0.25)
304 |
305 | sys.stdout.write('\rLoading complete! \n')
306 | sys.stdout.flush()
307 |
308 | def check_dependencies():
309 | """Check if required dependencies are installed"""
310 | required_packages = ["selenium", "psutil", "cryptography"]
311 | missing_packages = []
312 |
313 | for package in required_packages:
314 | try:
315 | __import__(package)
316 | except ImportError:
317 | missing_packages.append(package)
318 |
319 | if missing_packages:
320 | print("Missing required packages:")
321 | for package in missing_packages:
322 | print(f" - {package}")
323 | print("\nPlease install missing packages using:")
324 | print(f"pip install {' '.join(missing_packages)}")
325 | return False
326 |
327 | return True
328 |
329 | def debug_page_structure(driver):
330 | """Debug function to see what's on the page"""
331 | try:
332 | from selenium.webdriver.common.by import By
333 |
334 | # Get all input fields
335 | inputs = driver.find_elements(By.TAG_NAME, "input")
336 | print(f"🔍 Found {len(inputs)} input fields on page:")
337 | for i, input_field in enumerate(inputs):
338 | input_type = input_field.get_attribute("type")
339 | input_name = input_field.get_attribute("name")
340 | input_placeholder = input_field.get_attribute("placeholder")
341 | input_aria_label = input_field.get_attribute("aria-label")
342 | print(f" {i+1}. Type: {input_type}, Name: {input_name}, Placeholder: {input_placeholder}, Aria-label: {input_aria_label}")
343 |
344 | # Get all buttons
345 | buttons = driver.find_elements(By.TAG_NAME, "button")
346 | print(f"🔍 Found {len(buttons)} buttons on page:")
347 | for i, button in enumerate(buttons):
348 | text = button.text.strip()
349 | button_type = button.get_attribute("type")
350 | if text or button_type:
351 | print(f" {i+1}. Button: '{text}', Type: {button_type}")
352 |
353 | # Get page title and URL
354 | print(f"🌐 Current URL: {driver.current_url}")
355 | print(f"📄 Page title: {driver.title}")
356 |
357 | except Exception as e:
358 | print(f"❌ Debug error: {e}")
359 |
360 | def find_and_click_element(driver, selectors, timeout=10, element_name="element"):
361 | """Try multiple selectors to find and click an element"""
362 | from selenium.webdriver.common.by import By
363 | from selenium.webdriver.support.ui import WebDriverWait
364 | from selenium.webdriver.support import expected_conditions as EC
365 |
366 | for selector in selectors:
367 | try:
368 | element = WebDriverWait(driver, timeout).until(
369 | EC.element_to_be_clickable((By.XPATH, selector))
370 | )
371 | element.click()
372 | print(f"✅ Found {element_name} with selector: {selector}")
373 | return True
374 | except Exception as e:
375 | continue
376 | print(f"❌ Could not find {element_name} with any selector")
377 | return False
378 |
379 | def find_and_send_keys(driver, selectors, keys, timeout=10, element_name="element"):
380 | """Try multiple selectors to find and send keys to an element"""
381 | from selenium.webdriver.common.by import By
382 | from selenium.webdriver.support.ui import WebDriverWait
383 | from selenium.webdriver.support import expected_conditions as EC
384 |
385 | for selector in selectors:
386 | try:
387 | element = WebDriverWait(driver, timeout).until(
388 | EC.presence_of_element_located((By.XPATH, selector))
389 | )
390 | element.clear()
391 | element.send_keys(keys)
392 | print(f"✅ Found {element_name} with selector: {selector}")
393 | return True
394 | except Exception as e:
395 | continue
396 | print(f"❌ Could not find {element_name} with any selector")
397 | return False
398 |
399 | def wait_for_login_completion(driver, account_username, timeout=60):
400 | """Wait for login to complete, handling OTP and 2FA"""
401 | from selenium.webdriver.common.by import By
402 | from selenium.webdriver.support.ui import WebDriverWait
403 | from selenium.webdriver.support import expected_conditions as EC
404 | from selenium.common.exceptions import TimeoutException
405 |
406 | print("⏳ Waiting for login to complete...")
407 |
408 | start_time = time.time()
409 | while time.time() - start_time < timeout:
410 | current_url = driver.current_url
411 |
412 | # Check if we're on the home page (login successful)
413 | if "instagram.com" in current_url and ("/accounts/login" not in current_url and "login" not in current_url):
414 | try:
415 | # Look for home page elements to confirm login
416 | home_indicators = [
417 | "//a[contains(@href, '/direct/inbox/')]",
418 | "//a[contains(@href, '/explore/')]",
419 | "//a[contains(@href, '/reels/')]",
420 | "//span[contains(text(), 'Home')]",
421 | "//div[contains(@class, 'home')]"
422 | ]
423 |
424 | for indicator in home_indicators:
425 | try:
426 | element = driver.find_element(By.XPATH, indicator)
427 | if element.is_displayed():
428 | print("✅ Login successful - reached home page")
429 | return True
430 | except:
431 | continue
432 |
433 | # If we're not on login page and no errors, assume success
434 | print("✅ Login likely successful")
435 | return True
436 |
437 | except Exception as e:
438 | print(f"⚠️ Checking login status: {e}")
439 | continue
440 |
441 | # Check for OTP/2FA requirement
442 | try:
443 | otp_elements = driver.find_elements(By.XPATH, "//input[@placeholder='Security code'] | //input[contains(@aria-label, 'code')] | //input[contains(@name, 'code')] | //h2[contains(text(), 'Code')]")
444 | if otp_elements:
445 | print("🔐 OTP/2FA detected - manual intervention required")
446 | print("💡 Please complete the security verification manually")
447 | input("Press Enter after completing OTP/2FA verification...")
448 | # Wait a bit after manual intervention
449 | time.sleep(5)
450 | continue
451 | except:
452 | pass
453 |
454 | # Check for "Suspicious Login Attempt" or other security challenges
455 | try:
456 | security_challenge = driver.find_elements(By.XPATH, "//h2[contains(text(), 'Suspicious')] | //h2[contains(text(), 'Challenge')] | //button[contains(text(), 'This Was Me')]")
457 | if security_challenge:
458 | print("⚠️ Security challenge detected - manual intervention required")
459 | print("💡 Please complete the security challenge manually")
460 | input("Press Enter after completing security challenge...")
461 | time.sleep(5)
462 | continue
463 | except:
464 | pass
465 |
466 | # Check for login errors
467 | try:
468 | error_messages = driver.find_elements(By.XPATH, "//*[contains(text(), 'incorrect')] | //*[contains(text(), 'error')] | //*[contains(text(), 'problem')] | //*[contains(text(), 'invalid')]")
469 | if error_messages:
470 | for error in error_messages:
471 | if error.is_displayed():
472 | print(f"❌ Login error: {error.text}")
473 | return False
474 | except:
475 | pass
476 |
477 | # Check if we're still on login page after a while
478 | if "accounts/login" in current_url and time.time() - start_time > 15:
479 | print("❌ Still on login page after 15 seconds - login likely failed")
480 | return False
481 |
482 | time.sleep(2)
483 |
484 | print("❌ Login timeout reached")
485 | return False
486 |
487 | def report_accounts(username, accounts_file):
488 | """Main reporting function - WITH PROPER LOGIN HANDLING"""
489 | try:
490 | from selenium import webdriver
491 | from selenium.webdriver.chrome.options import Options
492 | from selenium.webdriver.chrome.service import Service
493 | from webdriver_manager.chrome import ChromeDriverManager
494 | from selenium.common.exceptions import WebDriverException, TimeoutException, NoSuchElementException
495 | from selenium.webdriver.common.by import By
496 | from selenium.webdriver.support.ui import WebDriverWait
497 | from selenium.webdriver.support import expected_conditions as EC
498 | from selenium.webdriver.common.keys import Keys
499 | except ImportError:
500 | print("❌ Selenium not installed. Please run: pip install selenium")
501 | return
502 |
503 | options = Options()
504 | options.add_argument("--disable-notifications")
505 | options.add_argument("--disable-dev-shm-usage")
506 | options.add_argument("--no-sandbox")
507 | options.add_argument("--disable-gpu")
508 | options.add_argument("--disable-blink-features=AutomationControlled")
509 | options.add_experimental_option("excludeSwitches", ["enable-automation"])
510 | options.add_experimental_option('useAutomationExtension', False)
511 | options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36")
512 | options.add_argument("--window-size=1920,1080")
513 |
514 | # Read account credentials from file
515 | try:
516 | with open(accounts_file, "r") as file:
517 | accounts = [line.strip().split(":") for line in file if line.strip() and not line.strip().startswith('#')]
518 | except FileNotFoundError:
519 | print(f"Error: Account file '{accounts_file}' not found.")
520 | return
521 | except Exception as e:
522 | print(f"Error reading account file: {str(e)}")
523 | return
524 |
525 | if not accounts:
526 | print("No accounts found in the file.")
527 | return
528 |
529 | # Initialize WebDriver
530 | try:
531 | driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
532 | driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
533 | print(f"Initialized WebDriver successfully. Processing {len(accounts)} accounts...")
534 | except WebDriverException as e:
535 | print("Error: WebDriver initialization failed.")
536 | print("Make sure ChromeDriver is installed and in PATH.")
537 | print(f"Details: {e}")
538 | return
539 |
540 | successful_reports = 0
541 | failed_reports = 0
542 |
543 | # Iterate through accounts
544 | for i, account in enumerate(accounts, 1):
545 | if len(account) < 2:
546 | print(f"Skipping invalid account format: {account}")
547 | failed_reports += 1
548 | continue
549 |
550 | print(f"\nProcessing account {i}/{len(accounts)}: {account[0]}")
551 |
552 | try:
553 | # Periodic security check
554 | if i % 3 == 0:
555 | _check_debug()
556 |
557 | # Log in - COMPLETELY UPDATED LOGIN PROCESS
558 | print("🌐 Navigating to Instagram login...")
559 | driver.get("https://www.instagram.com/accounts/login/")
560 | time.sleep(3)
561 |
562 | # Wait for page to load completely
563 | WebDriverWait(driver, 10).until(
564 | EC.presence_of_element_located((By.TAG_NAME, "body"))
565 | )
566 |
567 | # DEBUG: Show page structure
568 | print("🔍 Debugging page structure...")
569 | debug_page_structure(driver)
570 |
571 | # UPDATED: Try to find username/email field with CURRENT selectors
572 | username_selectors = [
573 | "//input[@name='username']",
574 | "//input[@aria-label='Phone number, username, or email']",
575 | "//input[@aria-label='Username']",
576 | "//input[@placeholder='Phone number, username, or email']",
577 | "//input[@placeholder='Username']",
578 | "//input[@type='text']",
579 | "//input[contains(@class, 'input')]",
580 | "//input[@id='loginForm']//input[@type='text']",
581 | "//form//input[@type='text']",
582 | "//input[@name='email']",
583 | "//input[@aria-label='Email']",
584 | "//input[@placeholder='Email']",
585 | "//input[1]", # First input on page
586 | "//input", # Any input field
587 | ]
588 |
589 | # Try each selector with longer timeout
590 | username_found = False
591 | username_field = None
592 | for selector in username_selectors:
593 | try:
594 | print(f"🔍 Trying username selector: {selector}")
595 | username_field = WebDriverWait(driver, 5).until(
596 | EC.presence_of_element_located((By.XPATH, selector))
597 | )
598 | if username_field.is_displayed() and username_field.is_enabled():
599 | username_field.clear()
600 | username_field.send_keys(account[0])
601 | print(f"✅ Username field found with: {selector}")
602 | username_found = True
603 | break
604 | except:
605 | continue
606 |
607 | if not username_found:
608 | print("❌ Could not find username field")
609 | # Try to find any visible input and click it
610 | try:
611 | inputs = driver.find_elements(By.TAG_NAME, "input")
612 | for input_field in inputs:
613 | if input_field.is_displayed():
614 | input_field.click()
615 | input_field.clear()
616 | input_field.send_keys(account[0])
617 | print("✅ Used fallback input field method")
618 | username_found = True
619 | username_field = input_field
620 | break
621 | except:
622 | pass
623 |
624 | if not username_found:
625 | print(f"❌ Username field not found for {account[0]}")
626 | failed_reports += 1
627 | continue
628 |
629 | # UPDATED: Try to find password field with CURRENT selectors
630 | password_selectors = [
631 | "//input[@name='password']",
632 | "//input[@aria-label='Password']",
633 | "//input[@type='password']",
634 | "//input[@placeholder='Password']",
635 | "//input[contains(@class, 'password')]",
636 | "//input[@id='loginForm']//input[@type='password']",
637 | "//form//input[@type='password']",
638 | "//input[2]", # Second input on page
639 | "//input[@type='password']", # Any password field
640 | ]
641 |
642 | password_found = False
643 | password_field = None
644 | for selector in password_selectors:
645 | try:
646 | print(f"🔍 Trying password selector: {selector}")
647 | password_field = WebDriverWait(driver, 5).until(
648 | EC.presence_of_element_located((By.XPATH, selector))
649 | )
650 | if password_field.is_displayed() and password_field.is_enabled():
651 | password_field.clear()
652 | password_field.send_keys(account[1])
653 | print(f"✅ Password field found with: {selector}")
654 | password_found = True
655 | break
656 | except:
657 | continue
658 |
659 | if not password_found:
660 | # Try tab navigation as fallback
661 | try:
662 | username_field.send_keys(Keys.TAB)
663 | password_field = driver.switch_to.active_element
664 | if password_field.get_attribute("type") == "password":
665 | password_field.send_keys(account[1])
666 | print("✅ Used TAB navigation for password field")
667 | password_found = True
668 | except:
669 | pass
670 |
671 | if not password_found:
672 | print(f"❌ Password field not found for {account[0]}")
673 | failed_reports += 1
674 | continue
675 |
676 | # UPDATED LOGIN BUTTON SELECTORS
677 | login_button_selectors = [
678 | "//button[@type='submit']",
679 | "//button[contains(., 'Log in')]",
680 | "//button[contains(., 'Log In')]",
681 | "//button[contains(., 'Sign in')]",
682 | "//button[contains(., 'Login')]",
683 | "//div[contains(text(), 'Log in')]",
684 | "//span[contains(text(), 'Log in')]",
685 | "//button[contains(@class, 'login')]",
686 | "//button[contains(@class, 'submit')]",
687 | "//form//button",
688 | "//button[.//div[contains(text(), 'Log in')]]",
689 | "//div[@role='button'][contains(., 'Log in')]",
690 | "//button", # Any button
691 | ]
692 |
693 | login_clicked = False
694 | for selector in login_button_selectors:
695 | try:
696 | login_button = WebDriverWait(driver, 5).until(
697 | EC.element_to_be_clickable((By.XPATH, selector))
698 | )
699 | if "log" in login_button.text.lower() or "sign" in login_button.text.lower() or selector == "//button[@type='submit']":
700 | login_button.click()
701 | print(f"✅ Login button clicked with: {selector}")
702 | login_clicked = True
703 | break
704 | except:
705 | continue
706 |
707 | if not login_clicked:
708 | # Try pressing Enter as final fallback
709 | try:
710 | password_field.send_keys(Keys.ENTER)
711 | print("✅ Used Enter key as fallback for login")
712 | login_clicked = True
713 | except:
714 | print(f"❌ Login button not found for {account[0]}")
715 | failed_reports += 1
716 | continue
717 |
718 | # WAIT FOR LOGIN COMPLETION WITH OTP/2FA HANDLING
719 | login_success = wait_for_login_completion(driver, account[0])
720 |
721 | if not login_success:
722 | print(f"❌ Login failed for {account[0]}")
723 | failed_reports += 1
724 | continue
725 |
726 | print("✅ Login successful, proceeding to reporting...")
727 |
728 | # Visit target user's page
729 | target_url = f"https://www.instagram.com/{username}/"
730 | print(f"🌐 Navigating to target profile: {username}")
731 | driver.get(target_url)
732 | time.sleep(5)
733 |
734 | # Check if profile exists
735 | try:
736 | driver.find_element(By.XPATH, "//h2[contains(text(), 'Sorry') or contains(text(), 'Not Found') or contains(text(), 'This page')]")
737 | print(f"❌ Target profile '{username}' not found")
738 | failed_reports += 1
739 | continue
740 | except NoSuchElementException:
741 | pass # Profile exists
742 |
743 | # Report user
744 | try:
745 | print("🔍 Looking for options button...")
746 | option_button_selectors = [
747 | "//div[@role='button']//*[local-name()='svg' and (@aria-label='Options' or @aria-label='More options')]",
748 | "//button[contains(@aria-label, 'Options') or contains(@aria-label, 'More')]",
749 | "//span[contains(text(), 'Options') or contains(text(), 'More')]",
750 | "//div[contains(@class, 'more')]//button",
751 | "//button[contains(@class, 'more')]",
752 | "//svg[@aria-label='More options']",
753 | "//div[@role='button'][contains(., '···') or contains(., '...')]",
754 | ]
755 |
756 | if not find_and_click_element(driver, option_button_selectors, 10, "options button"):
757 | print(f"❌ Options button not found for {account[0]}")
758 | failed_reports += 1
759 | continue
760 |
761 | time.sleep(2)
762 |
763 | print("🔍 Looking for report button...")
764 | report_button_selectors = [
765 | "//button[contains(text(), 'Report')]",
766 | "//div[contains(text(), 'Report')]",
767 | "//span[contains(text(), 'Report')]",
768 | "//button[contains(., 'Report')]",
769 | ]
770 |
771 | if not find_and_click_element(driver, report_button_selectors, 10, "report button"):
772 | print(f"❌ Report button not found for {account[0]}")
773 | failed_reports += 1
774 | continue
775 |
776 | time.sleep(2)
777 |
778 | print("🔍 Looking for spam reason...")
779 | spam_button_selectors = [
780 | "//button[contains(text(), 'spam') or contains(text(), 'Spam')]",
781 | "//div[contains(text(), 'spam') or contains(text(), 'Spam')]",
782 | "//span[contains(text(), 'spam') or contains(text(), 'Spam')]",
783 | ]
784 |
785 | if not find_and_click_element(driver, spam_button_selectors, 10, "spam reason"):
786 | print(f"❌ Spam reason button not found for {account[0]}")
787 | failed_reports += 1
788 | continue
789 |
790 | time.sleep(2)
791 |
792 | print("🔍 Looking for submit button...")
793 | submit_button_selectors = [
794 | "//button[contains(text(), 'Submit') or contains(text(), 'Report')]",
795 | "//div[contains(text(), 'Submit') or contains(text(), 'Report')]",
796 | "//span[contains(text(), 'Submit') or contains(text(), 'Report')]",
797 | ]
798 |
799 | if not find_and_click_element(driver, submit_button_selectors, 10, "submit button"):
800 | print(f"❌ Submit button not found for {account[0]}")
801 | failed_reports += 1
802 | continue
803 |
804 | time.sleep(2)
805 |
806 | print(f"✅ Successfully reported {username} using account {account[0]}")
807 | successful_reports += 1
808 |
809 | except Exception as e:
810 | print(f"❌ Failed to report using account {account[0]}: {str(e)}")
811 | failed_reports += 1
812 |
813 | except Exception as e:
814 | print(f"❌ Error occurred while processing account {account[0]}: {str(e)}")
815 | failed_reports += 1
816 | continue
817 |
818 | # Cleanup
819 | driver.quit()
820 |
821 | # Summary
822 | print("\n" + "="*50)
823 | print("REPORTING SUMMARY")
824 | print("="*50)
825 | print(f"Total accounts processed: {len(accounts)}")
826 | print(f"Successful reports: {successful_reports}")
827 | print(f"Failed reports: {failed_reports}")
828 | success_rate = (successful_reports/len(accounts)*100) if accounts else 0
829 | print(f"Success rate: {success_rate:.1f}%")
830 | print("="*50)
831 |
832 | # ==================== MAIN APPLICATION ====================
833 |
834 | def get_options():
835 | """Parse command line arguments"""
836 | parser = argparse.ArgumentParser(description="InstaReport - Licensed Version")
837 | parser.add_argument("-u", "--username", type=str, default="", help="Username to report.")
838 | parser.add_argument("-f", "--file", type=str, default="acc.txt", help="Accounts list (Defaults to acc.txt in program directory).")
839 | return parser.parse_args()
840 |
841 | def main():
842 | """Main application entry point"""
843 | print("\n" + "="*70)
844 | print(" INSTAREPORT - PROTECTED VERSION")
845 | print(" Mass Instagram Reporter")
846 | print("="*70)
847 | print("🔒 This software is protected by license validation")
848 | print("📧 Contact developer for licensing information")
849 | print("="*70)
850 |
851 | # Check dependencies
852 | if not check_dependencies():
853 | input("\nPress Enter to exit...")
854 | return
855 |
856 | try:
857 | # Initialize license system and validate
858 | license_system = LicenseSystem()
859 | license_system.check_license()
860 |
861 | # License check passed, proceed with application
862 | args = get_options()
863 | username = args.username
864 | accounts_file = args.file
865 |
866 | show_banner()
867 | show_loading_screen(3)
868 |
869 | if username == "":
870 | username = input("Username: ")
871 |
872 | show_loading_screen(3)
873 | report_accounts(username, accounts_file)
874 |
875 | except KeyboardInterrupt:
876 | print("\nOperation cancelled by user.")
877 | sys.exit(0)
878 | except Exception as e:
879 | print(f"An error occurred: {str(e)}")
880 | sys.exit(1)
881 |
882 | if __name__ == "__main__":
883 | main()
884 |
--------------------------------------------------------------------------------