Маршрутизатор модема LAN WLAN GPON SC UPC GPON ONU ONT PON ЛОС FTTH
Пожалуйста, проверьте свою электронную почту!
def _extract_description(self, soup): desc = soup.find('meta', 'name': 'description') return desc.get('content', 'N/A') if desc else "N/A"
def test_sql_injection(self, url, param='id'): """Test for basic SQL injection vulnerabilities""" payloads = [ ("'", "SQL syntax|mysql|ORA|PostgreSQL|SQLite"), ("' OR '1'='1", "You have an error|Warning: mysql"), ("' UNION SELECT NULL--", "union|SELECT"), ("1 AND SLEEP(5)", "response time > 3 seconds") ] print(f"[*] Testing SQLi on url") for payload, signature in payloads: test_url = url.replace(f"param=self._get_param_value(url, param)", f"param=payload") try: start = time.time() response = self.session.get(test_url, timeout=10) elapsed = time.time() - start # Check for time-based injection if "SLEEP" in payload and elapsed > 3: self._report_vulnerability('SQL Injection (Time-based)', test_url) # Check for error-based injection if any(keyword.lower() in response.text.lower() for keyword in signature.split('|')): self._report_vulnerability('SQL Injection (Error-based)', test_url) except Exception as e: print(f" [!] Error testing payload payload: e")
def _extract_price(self, soup): price_patterns = ['price', 'product-price', 'sale-price', 'amount'] for pattern in price_patterns: elem = soup.find(class_=pattern) or soup.find(id=pattern) if elem: return elem.get_text(strip=True) return "N/A"
# Generate final report print(auditor.generate_report())
This transforms a simple search pattern into a powerful, actionable security and data extraction tool.
def _extract_images(self, soup, base_url): images = [] for img in soup.find_all('img', src=True): img_url = urljoin(base_url, img['src']) if 'product' in img_url.lower() or 'item' in img_url.lower(): images.append(img_url) return images[:5]
auditor = SmartShopAuditor(target_url, delay=0.5)
# Crawl IDs from 1 to 50 valid_pages = auditor.crawl_ids(target_url, start=1, end=50)
def _extract_description(self, soup): desc = soup.find('meta', 'name': 'description') return desc.get('content', 'N/A') if desc else "N/A"
def test_sql_injection(self, url, param='id'): """Test for basic SQL injection vulnerabilities""" payloads = [ ("'", "SQL syntax|mysql|ORA|PostgreSQL|SQLite"), ("' OR '1'='1", "You have an error|Warning: mysql"), ("' UNION SELECT NULL--", "union|SELECT"), ("1 AND SLEEP(5)", "response time > 3 seconds") ] print(f"[*] Testing SQLi on url") for payload, signature in payloads: test_url = url.replace(f"param=self._get_param_value(url, param)", f"param=payload") try: start = time.time() response = self.session.get(test_url, timeout=10) elapsed = time.time() - start # Check for time-based injection if "SLEEP" in payload and elapsed > 3: self._report_vulnerability('SQL Injection (Time-based)', test_url) # Check for error-based injection if any(keyword.lower() in response.text.lower() for keyword in signature.split('|')): self._report_vulnerability('SQL Injection (Error-based)', test_url) except Exception as e: print(f" [!] Error testing payload payload: e")
def _extract_price(self, soup): price_patterns = ['price', 'product-price', 'sale-price', 'amount'] for pattern in price_patterns: elem = soup.find(class_=pattern) or soup.find(id=pattern) if elem: return elem.get_text(strip=True) return "N/A"
# Generate final report print(auditor.generate_report())
This transforms a simple search pattern into a powerful, actionable security and data extraction tool.
def _extract_images(self, soup, base_url): images = [] for img in soup.find_all('img', src=True): img_url = urljoin(base_url, img['src']) if 'product' in img_url.lower() or 'item' in img_url.lower(): images.append(img_url) return images[:5]
auditor = SmartShopAuditor(target_url, delay=0.5)
# Crawl IDs from 1 to 50 valid_pages = auditor.crawl_ids(target_url, start=1, end=50)
Впишите ваше сообщение