-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrecon.py
More file actions
55 lines (53 loc) · 2.25 KB
/
Copy pathrecon.py
File metadata and controls
55 lines (53 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from module import Module
class Recon(Module):
def __init__(self, api):
super(Recon, self).__init__(api, 'Recon')
def getScanStatus(self, scanId, scanType):
""" This method is deprecated but left in for compatibility with older firmware """
return self.request('getScanStatus', {'scan': {'scanID': scanId, 'scanType': scanType}})
def startScan(self, scanType, scanDuration):
""" This method is deprecated but left in for compatibility with older firmware """
return self.request('startScan', {'scanType': scanType, 'scanDuration': scanDuration})
def startNormalScan(self, scanType, scanDuration):
""" Start a Normal Scan
Scan Type:
0 - 2.4 Ghz
1 - 5 Ghz
2 - Both
"""
def startLiveScan(self, scanType, scanDuration):
""" Start a Live Scan
Scan Type:
0 - 2.4 Ghz
1 - 5 Ghz
2 - Both
"""
return self.request('startNormalScan', { 'scanType': scanType, 'scanDuration': scanDuration})
def checkPineAPDaemon(self):
""" Errors on return but added to mirror recon api """
return self.request('checkPineAPDaemon')
def startPineAPDaemon(self):
""" Start Pine AP Daemon """
return self.request('startPineAPDaemon')
def getScans(self):
""" Return a list of Scans """
return self.request('getScans')
def downloadResults(self, scanId):
""" Download Scan Results by ID
Basically a limited stub right now,
Pending rewrite of Pineapple module to download data
"""
return self.request('downloadResults', { 'scanId': scanId })
def removeScan(self, scanId):
""" Delete a scan by ID """
return self.request('removeScan', { 'scanId': scanId})
def getCurrentScanID(self):
""" Return ID of Current Scan """
return self.request('getCurrentScanID')
def stopScan(self):
""" Stop currently running scan
Note: This is not by scan ID but rather just currently running scan
"""
return self.request('stopScan')
def loadResults(self, scanId):
return self.request('loadResults', { 'scanId': scanId })