Merge pull request #2 from PowerShellEmpire/path_fix
Path fix for network situational awareness modules1.6
commit
7f1cc242db
|
@ -61,7 +61,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-ARPScan.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-ARPScan.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -87,4 +87,4 @@ class Module:
|
|||
|
||||
script += " | Select-Object MAC, Address | ft -autosize | Out-String | %{$_ + \"`n\"}"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -82,7 +82,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-FindLocalAdminAccess.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-FindLocalAdminAccess.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -108,4 +108,4 @@ class Module:
|
|||
|
||||
script += ' | Out-String | %{$_ + \"`n\"};"`nInvoke-FindLocalAdminAccess completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -76,7 +76,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Get-NetComputer.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Get-NetComputer.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -100,4 +100,4 @@ class Module:
|
|||
else:
|
||||
script += " -" + str(option) + " " + str(values['Value'])
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -62,7 +62,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Get-ExploitableSystems.psm1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Get-ExploitableSystems.psm1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -88,4 +88,4 @@ class Module:
|
|||
|
||||
script += " | ft -autosize | Out-String | %{$_ + \"`n\"}"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -65,7 +65,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Get-NetLocalGroup.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Get-NetLocalGroup.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -91,4 +91,4 @@ class Module:
|
|||
|
||||
script += "| Out-String"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -63,7 +63,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Get-SPN.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Get-SPN.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -89,4 +89,4 @@ class Module:
|
|||
|
||||
script += " -List yes | Format-Table -Wrap | Out-String | %{$_ + \"`n\"}"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -71,7 +71,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Get-NetUser.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Get-NetUser.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -97,4 +97,4 @@ class Module:
|
|||
|
||||
script += " | Out-String"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -56,7 +56,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-MapDomainTrusts.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-MapDomainTrusts.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -76,4 +76,4 @@ class Module:
|
|||
script += "Invoke-MapDomainTrusts | ConvertTo-Csv -NoTypeInformation"
|
||||
script += '| Out-String | %{$_ + \"`n\"};"`nInvoke-MapDomainTrusts completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -88,7 +88,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-Netview.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-Netview.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -114,4 +114,4 @@ class Module:
|
|||
|
||||
script += '| Out-String | %{$_ + \"`n\"};"`nInvoke-Netview completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -112,7 +112,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-Portscan.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-Portscan.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -138,4 +138,4 @@ class Module:
|
|||
|
||||
script += " | ? {$_.alive}| Select-Object HostName,@{name='OpenPorts';expression={$_.openPorts -join ','}} | ft -wrap | Out-String | %{$_ + \"`n\"}"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -61,7 +61,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-ReverseDNSLookup.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-ReverseDNSLookup.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -88,4 +88,4 @@ class Module:
|
|||
# only return objects where HostName is not an IP (i.e. the address resolves)
|
||||
script += " | % {try{$entry=$_; $ipObj = [System.Net.IPAddress]::parse($entry.HostName); if(-not [System.Net.IPAddress]::tryparse([string]$_.HostName, [ref]$ipObj)) { $entry }} catch{$entry} } | Select-Object HostName, AddressList | ft -autosize | Out-String | %{$_ + \"`n\"}"
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -86,7 +86,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-ShareFinder.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-ShareFinder.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -112,4 +112,4 @@ class Module:
|
|||
|
||||
script += '| Out-String | %{$_ + \"`n\"};"`nInvoke-ShareFinder completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -108,7 +108,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-UserHunter.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-UserHunter.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -136,4 +136,4 @@ class Module:
|
|||
|
||||
script += ';"`nInvoke-StealthUserHunter completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
|
@ -112,7 +112,7 @@ class Module:
|
|||
def generate(self):
|
||||
|
||||
# read in the common module source code
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/Network/Invoke-UserHunter.ps1"
|
||||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-UserHunter.ps1"
|
||||
|
||||
try:
|
||||
f = open(moduleSource, 'r')
|
||||
|
@ -140,4 +140,4 @@ class Module:
|
|||
|
||||
script += ';"`nInvoke-UserHunter completed"'
|
||||
|
||||
return script
|
||||
return script
|
||||
|
|
Loading…
Reference in New Issue