Home
»
Discussion Forums
»
z Old Forum - Archive
»
Scan for open port on the agent machine
Subscribe via RSS
Share this
Similar Posts
Scanning open ports
by
LegacyPoster
on
Jun 22, 2008
Is there a way in discovery to see open ports on machines with agents
by
iSpire
on
Jul 5, 2017
Easiest way to check open ports on agents
by
mark
on
Sep 17, 2013
Script to list current open ports
by
LegacyPoster
on
Aug 16, 2009
Which ports to open on closed firewall
by
LegacyPoster
on
May 18, 2010
View More
Details
4
Replies
0
Subscribers
Posted
over 14 years ago
z Old Forum - Archive
Scan for open port on the agent machine
Posted by
LegacyPoster
on
Jul 27, 2006 3:06 AM
I want to request a script that can scan for open port on the agent machine,and send me a list of open port on the agent machine via email.Thanks in advance.
Legacy Forum Name: Scan for open port on the agent machine,
Legacy Posted By Username: amir
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Jul 21, 2006 2:46 AM
Here is something fast & dirty using the NETSTAT command:
(NOTE: replace the "" placeholder with your email address)
Script Name: NETSTAT Report
Script Description: This script remotelly executes the NETSTAT -a command and emails the output to the email address(es) configured.
IF True
THEN
Get Variable
Parameter 1 : 4
Parameter 2 :
Parameter 3 : agentDrv
OS Type : 1
Get Variable
Parameter 1 : 6
Parameter 2 :
Parameter 3 : machineName
OS Type : 1
Execute Shell Command
Parameter 1 : %windir%\system32\netstat.exe -a > #agentDrv#temp\ports.txt
Parameter 2 : 1
OS Type : 1
Get Variable
Parameter 1 : 1
Parameter 2 : #agentDrv#temp\ports.txt
Parameter 3 : ports
OS Type : 1
Send Email
Parameter 1 :
Parameter 2 : Port status on #machineName#
Parameter 3 : #ports#
OS Type : 1
Delete File
Parameter 1 : #agentDrv#temp\ports.txt
OS Type : 1
ELSE
Legacy Forum Name: Script Requests,
Legacy Posted By Username: bellcpa
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Jul 21, 2006 12:08 PM
Thanks , i will try it out.
Legacy Forum Name: Script Requests,
Legacy Posted By Username: amir
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Jul 22, 2006 2:59 AM
Looks like path slashes were removed for some reason when I initially posted the script, I just fixed it. Thanks
Legacy Forum Name: Script Requests,
Legacy Posted By Username: bellcpa
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Jul 27, 2006 3:06 AM
Does this script work as expected?
Legacy Forum Name: Script Requests,
Legacy Posted By Username: sourceminer
You have posted to a forum that requires a moderator to approve posts before they are publicly available.