Hi Friends,
I want to create a script and nc (netcat) will be my tool for this test. Before telling that let me tell you the scenario that I am conducting the test. I have one client and Server. I have added exploit signatures in the server and client vice versa. Suppose in the Snort rule i have create a rule that if any request comes to the server and in that request part abc pattern is found then drop that request.

So what I want to do is, I want to write a py script and it will ask me for the following inputs:
Enter Port number : 1234
Enter IP Address : xx.xx.xx.xx
I will give the port number in the client side that in which port the transport should be running through. and then it will run the netcat and the command will be like this nc <ip> <port> <Attack Data Patterns>
And if the connection drops in the server side(if server denies the connection) then in the python script it should show that Rule worked!!!

I hope my question is quite explanatory. Please let me know if still anyone of you need any more clarifications.


I understand what you're trying to do but where is your question? Do you need to know what modules can be used for this or do you need help implementing a certain portion of this idea? etc...