Update reverse_dns.py
parent
d8dbcc7eea
commit
c911a5c478
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue