


Error Code : ' + str(msg) + ' Message ' + msg S = socket.socket(socket.AF_INET, socket.SOCK_STREAM) PORT = 5500 # Arbitrary non-privileged port HOST = '' # Symbolic name, meaning all available interfaces Well, I found the below python code which works on Windows and Linux both. Create a file – let’s say portlistener.py with below code ''' Simple socket server using threads How about having a python script that can work on Windows or UNIX? The above two examples are limited to OS. Doing this in Linux is slightly more comfortable, isn’t it? To create a port listener using Python So here I have port 5500 listened successfully. To validate, let’s use netstat ~]# netstat -anlp |grep 5500.Once installed, use the following command to start the port listener as 5500 in the background.The procedure is slightly different in Linux here we will use netcat (nc) command to start the listener. So yes, now I have created a port listener successfully in Windows. Open a command prompt and run netstat to validate if port 5500 is listening In the above example, I have started listening port on 5500, and it’s time to validate if it’s running.Enter the port number which you want to test and click on start.Double click on listener to start the utility.Go to path where you have extracted the files, in this example I have at c:listener.It will prompt to select the location to extract the files, click on unzip.Double click on downloaded postlistener.exe file.In this guide, I will download the exe format.Download Post Listener as zip or exe format from here.This utility is available for free for Windows 95 to Windows 10. To have a port listener on a specific port in Windows, you can use the “Port Listener” utility. If you have a similar situation or feel this would be beneficial for you at work, then here are few ways to achieve this in Windows or UNIX platform. It’s straightforward you can perform telnet but how about when “B” doesn’t have any service running? That’s where you need the port listener to help in this situation.

Let’s take a real-time example – you are working on migration, and you have to ensure connectivity exists between application “A” to “B” on a particular port. This is often you have to do when you are working in a DMZ environment for migration or new projects. One of the challenging tasks while working in the project team is to perform the necessary connectivity test though services don’t exist.
