Penetration Testing using Python Code

Nowadays, programming is considered as a very important element in the industry especially IT. In this post, I would like to share a brief about using Python code which can be useful for other people out there.

Below are the example from the server side program which you can modify based on your server environment:

socket.listen() is normally a method that will ensure that the server will listen mode to the port that been assigned on the code. The response from the Python code above will prompt to you showing whether the host can listen to the port itself.

Extending the above code to show the connection will be connected to the server. For the msg.encode section, I have use based64 as the connection.

The user can also inside the following code where we will ask the target’s machine so that we using the socket.listen to create socket.

Once we are completed with the code above, we can save it as anything for it to run. For my case, i save it as socket.py and be advise to be using Python3 version.

*Reminder: Python2.7 is not recommended

Read More: https://threatninja.net/penetration-testing-using-python-code/