コード例 #1
0
ファイル: test.py プロジェクト: 0x0d/lorcon
 def testAutoDriver(self):
     # Is it wise to test this? May fail depending on where it is tested
     # without a bug/error in Lorcon2 itself...
     driver, description = PyLorcon2.auto_driver(self.iface)
     self.assertEqual(self.driver, driver)
     self.assertEqual(type(description), str)
コード例 #2
0
    if o == "-h":
        usage()

if ((interface is None) or (channel is None)):
    print "ERROR: Interface or channel not set (see -h for more info)"
    sys.exit(-1)

print "[+] Using interface", interface
'''
	The following is all of the standard interface, driver, and context setup
'''

# Automatically determine the driver of the interface

try:
    driver, description = PyLorcon2.auto_driver(interface)
    if driver is not None:
        print "[+]\t Driver:", driver
except:
    print "[!] Could not determine the driver for", interface
    sys.exit(-1)

# Create LORCON context
try:
    ctx = PyLorcon2.Context(interface)
except:
    print "[!]\t Failed to create context"
    sys.exit(-1)

# Create Monitor Mode Interface
コード例 #3
0
ファイル: 4whsg.py プロジェクト: MAVProxyUser/3DRSoloHacks
channel = 11
#interface = sys.argv[1]    
eapol_packets = []
handshake_found = 0
WPA_key = [] # This is wrong... possible change from Lorcon1 to Lorcon2

#injector = pylorcon.Lorcon("ath0", "madwifing")
#injector.setfunctionalmode("INJECT")
#injector.setmode("MONITOR")
#injector.setchannel(11)

# Borrowed Lorcon2 Code from - https://github.com/OpenSecurityResearch/lorcon_examples/blob/master/beacon_flood_raw.py
# Automatically determine the driver of the interface

try:
	driver, description = PyLorcon2.auto_driver(interface)
	if driver is not None:
		print "[+]\t Driver:",driver
except:
	print "[!] Could not determine the driver for",interface
	sys.exit(-1)

# Create LORCON context
try:
	ctx = PyLorcon2.Context(interface)
except:
	print "[!]\t Failed to create context"
	sys.exit(-1)

# Create Monitor Mode Interface
コード例 #4
0
ファイル: test.py プロジェクト: PNPtutorials/lorcon-1
 def testAutoDriver(self):
     # Is it wise to test this? May fail depending on where it is tested
     # without a bug/error in Lorcon2 itself...
     driver, description = PyLorcon2.auto_driver(self.iface)
     self.assertEqual(self.driver, driver)
     self.assertEqual(type(description), str)