|
20 | 20 |
|
21 | 21 | import socket, httplib, threading, time, urllib2, os |
22 | 22 | from Queue import Queue |
| 23 | +try: from scapy.all import * |
| 24 | +except: raise MissingPackageException('Please install scapy to continue.') |
23 | 25 | import logging |
24 | 26 | logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Fixes scapy logging error |
25 | | -from scapy.all import * # Required for the Probe Request Class |
26 | 27 | from string import ascii_uppercase, ascii_lowercase, digits # Import for PatternCreate and PatternOffset |
27 | 28 |
|
28 | 29 | class Backdoor(object): |
@@ -563,15 +564,14 @@ def getProxies(country_filter = 'ALL', proxy_type = ('Socks4', 'Socks5')): |
563 | 564 |
|
564 | 565 | def installDependencies(): |
565 | 566 | import subprocess |
566 | | - try: |
567 | | - mech = subprocess.check_output(['/usr/local/bin/pip', 'install', 'mechanize']) |
568 | | - if 'successfully installed' in mech: print 'Installed mechanize' |
569 | | - beaut = subprocess.check_output(['/usr/local/bin/pip', 'install', 'bs4']) |
570 | | - if 'successfully installed' in beaut: print 'Installed beautifulsoup' |
571 | | - scapy = subprocess.check_output(['/usr/local/bin/pip', 'install', 'scapy']) |
572 | | - if 'successfully installed' in beaut: print 'Installed scapy' |
573 | | - except: |
574 | | - raise MissingPipException('Could not find pip.') |
| 567 | + mech = subprocess.check_output(['/usr/local/bin/pip', 'install', 'mechanize']) |
| 568 | + if 'successfully installed' in mech: print 'Installed mechanize' |
| 569 | + beaut = subprocess.check_output(['/usr/local/bin/pip', 'install', 'bs4']) |
| 570 | + if 'successfully installed' in beaut: print 'Installed beautifulsoup' |
| 571 | + scapy = subprocess.check_output(['/usr/local/bin/pip', 'install', 'scapy']) |
| 572 | + if 'successfully installed' in scapy: print 'Installed scapy' |
| 573 | + pcapy = subprocess.check_output(['/usr/local/bin/pip', 'install', 'pcapy']) |
| 574 | + if 'successfully installed' in pcapy: print 'Installed pcapy' |
575 | 575 |
|
576 | 576 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
577 | 577 | def send(IP, port, message, keepalive = False): |
@@ -1110,10 +1110,11 @@ def generate(self): |
1110 | 1110 |
|
1111 | 1111 | """ |
1112 | 1112 |
|
1113 | | - |
1114 | 1113 | class PatternOffset: |
1115 | 1114 |
|
1116 | 1115 | def __init__(self, search_pattern): |
| 1116 | + |
| 1117 | + |
1117 | 1118 |
|
1118 | 1119 | self.search_pattern = search_pattern |
1119 | 1120 |
|
|
0 commit comments