diff --git a/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md b/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md index 0b1a504..d6bd4d2 100644 --- a/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md +++ b/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md @@ -1,5 +1,8 @@ # Example of Creating a C2 Using Python -Let's create a Python script that sets up a listener to communicate with a remote device. The listener waits for a connection, then allows the user to send commands to the remote device. Here's a breakdown of the code: +Let's create a Python script that sets up a listener to communicate with a remote device. The listener waits for a connection, then allows the user to send commands to the remote device. +🤖 Checkout [this prompt in ChatGPT](https://chat.openai.com/share/a8399b03-9d33-444a-bce3-e7995d351316) + +Here's a breakdown of the code: 1. **Importing Required Module**: ```python @@ -24,8 +27,8 @@ Let's create a Python script that sets up a listener to communicate with a remot 5. **Socket Address Configuration**: ```python - IP = "192.168.74.128" - Port = 8008 + IP = "10.6.6.88" + Port = 1337 socket_address = (IP, Port) ``` The IP address and port for the listener are defined. @@ -54,3 +57,5 @@ Let's create a Python script that sets up a listener to communicate with a remot 9. **Exception Handling**: If any exception occurs during command execution or communication, the script prints "Exception occurred" and closes the socket. + +