Changeset 5867
- Timestamp:
- 08/31/10 13:45:47 (3 years ago)
- Location:
- packet-manipulator/branches/BTSniffer_ganja
- Files:
-
- 1 removed
- 2 modified
-
BTSniffer/btcompile.py (modified) (3 diffs)
-
BTSniffer/dep_check/python-dev.c (deleted)
-
setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
packet-manipulator/branches/BTSniffer_ganja/BTSniffer/btcompile.py
r5866 r5867 40 40 41 41 def gcc(self):#check if gcc is present 42 proc = subprocess.Popen('which gcc', 43 shell=True, 44 stdout=subprocess.PIPE 45 ) 46 if len(proc.communicate()[0])==0: 47 print "gcc" 48 return False 42 49 return True 43 44 def python_dev(self):45 proc = subprocess.Popen('gcc ' + self.python_dev_file,46 shell=True,47 stderr=subprocess.PIPE48 )49 # Need to pass -I/usr/include/python2.6 as compile time argument, find better way50 for dep in self.python_deps:51 print dep52 return False53 50 54 51 def blue_dev(self): … … 67 64 def make(self): 68 65 if self.gcc(): 69 blue_check=self.blue_dev() 70 python_check=self.python_dev() 71 72 if blue_check or python_check: 66 if not self.blue_dev(): 73 67 return False 74 68 75 69 #Compile and copy the C files for BTSniffer to PATH_BT_BACKEND 76 os.system(self.CMD_BUILD) 70 proc = subprocess.Popen(self.CMD_BUILD, 71 shell=True, 72 stderr=subprocess.PIPE 73 ) 74 check=proc.communicate()[1] 75 76 if re.search('[eE][rR][rR][oO][rR]',check) is not None : 77 for dep in self.python_deps: 78 print dep 79 return False 80 77 81 if os.path.exists(self.PATH_BT_BACKEND): 78 82 shutil.rmtree(self.PATH_BT_BACKEND) … … 85 89 shutil.copytree('btpincrack-v0.3',self.PATH_BT_PINCRACK) 86 90 91 return True 92 87 93 else: 88 94 return False 89 95 90 #btcompile().make() -
packet-manipulator/branches/BTSniffer_ganja/setup.py
r5866 r5867 211 211 PACKAGE_DATA['umit.pm.backend.bt_sniffer'] = ['*.so'] 212 212 213 o f.chdir('../')213 os.chdir('../') 214 214 215 215 else:
