Port 443 Help

Forum dedicated to computer hardware and software, mobile phones and electronic gadgets.
User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

Does anyone have a good method of checking if port 443 is open or listening and if it is listening to open it? Port 443 is for TLS/SSL connections between computers. A lot of stock monitoring programs use it. I have a customer whose port 443 is open on an ethernet connection but I don't know how to verify if it is open on the connection card. Should be the same but apparently not. All firewalls are disabled.


User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

On Error Resume Next

Wscript.StdOut.Write "Enter the IP address to be scanned: "strIP = Wscript.StdIn.ReadLine

Set objNetwork = CreateObject("Wscript.Network")strComputer = objNetwork.ComputerName

Set asObj = CreateObject("ActivXperts.Socket")

For A = 1 To 1024 Step +1

asObj.Connect strIP, A

If asObj.LastError = 0 And asObj.ConnectionState = 3 Then Wscript.Echo strComputer & " has port # " & A & " open." asObj.DisconnectEnd If

Next

Wscript.Echo "Port Scanning has completed !!"

if the machine your testing is windows based. copy and paste this in notepad then save as a .vbs just double-click running this defaults to the local machine. if you open it in a command prompt, it asks for an IP so you can check other machines.

i can't find it now, but i also have a Perl port scanner if your not on windows.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

krazydriver wrote:On Error Resume Next

Wscript.StdOut.Write "Enter the IP address to be scanned: "strIP = Wscript.StdIn.ReadLine

Set objNetwork = CreateObject("Wscript.Network")strComputer = objNetwork.ComputerName

Set asObj = CreateObject("ActivXperts.Socket")

For A = 1 To 1024 Step +1

asObj.Connect strIP, A

If asObj.LastError = 0 And asObj.ConnectionState = 3 Then Wscript.Echo strComputer & " has port # " & A & " open." asObj.DisconnectEnd If

Next

Wscript.Echo "Port Scanning has completed !!"
Copy and paste this part?

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

yup, sorry shoulda made it bold or something so you knew.

but yeah that will list which ports are open locally if you just run it on the machine. Targeting it with another computer from the network will show which ports are open to the network.

as a side note it's really kinda gay because it displays the open ports with a message box. So you gotta keep clicking okay. i know i have my Perl scanner on my work machine, so i'll post that one up tomorrow. MUCH easier, and better.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

You FTMF Win/President. You saved my as$cheeks.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

Script: C:\Documents and Settings\sprint01\Desktop\port.vbsLine: 1Char: 1Error: Invalid characterCode: 800A0408Source: Microsoft VBScript compilation error

Is the error I received. I'm assuming I can just save this VBS file to my client's desktop and double click on it...

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

me wrote:as a side note it's really kinda gay because it displays the open ports with a message box. So you gotta keep clicking okay. i know i have my Perl scanner on my work machine, so i'll post that one up tomorrow. MUCH easier, and better.
the perl one is far better. But in a quick fix the VBS one will work.

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

FINALLY i found it

#!C:\Perl\bin\perl

use IO::Socket;$start=0;$end=1024;

$target = $ARGV[0];$target = "127.0.0.1" unless (defined($target));$heartbeat = 5;

print "Scanning : [ $target ] ports $start to $end (heartbeat every $heartbeat ports)\n";foreach ($start; $start<=$end; $start++) {print "Trying port -> $start\n" unless ($start % $heartbeat);print "\nPort $start is open\n" if ( IO::Socket::INET->new(PeerAddr=>"$target:$start",Proto=>'tcp',Timeout=>1));}print "\nFinished\n";

just install a perl distribution on the machine and this will work like a charm. It heartbeats every 5 ports to display the data. It will take a while to run but he it's got alot to scan.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

Ok. I'll install that on the machine right now. One sec.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

OK Perl found port 443 listening. How to open?

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

forgot to mention. Gotta run the perl in a command prompt. To define a target(if your not checking the local machine) just type the name followed with the target IP.

this script was also written real nice, so you can just change the start and end values if you only want to check port 443.

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

Yeah I usually run everything in command prompt (gets snobby businessmen who think they know everything to shut the hell up LOL) and now I need to open port 443.

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

if you want to fully open it this command should work

Netsh firewall set portopening TCP 443 ENABLE

in the future if you have a specific program looking for a port you can also just use netstat this will just list any programs currently running through a port on the machine.

+1 for using the command prompt

User avatar
redtop91
Posts: 16326
Joined: Thu Sep 07, 2006 9:05 am
Car: ↑ ↑ ↓ ↓ ← → ← → B A Start

Post

BLAM! Problem fixed. Most help I've had in a thread on NICO. I thank you for being a gentleman and a scholar!

User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

glad i could help.


Return to “Computers / Electronics”