Skip to content

Conversation

@BlueBeret
Copy link

@BlueBeret BlueBeret commented Jun 6, 2023

resolve #106

Add a callback feature

user can easily add python script as callback which will be executed. For example, I use this with discord webhook to get noification for every new backdoor connection.

usage: python3 Villain.py -cb "/tmp/cb.py"

cb.py

import requests
import os
import json
def callback(sess):
    # send discord message
    url = "#redacted"

    data = {
        "content": f"""```{sess}
        ```
        """
    }
    headers = {
        "Content-Type": "application/json"
    }
    response = requests.post(url, data=json.dumps(data), headers=headers)
    if response.status_code == 204:
        return 1
    else:
        return 0    

@BlueBeret BlueBeret changed the title feat: add custom callback for every new connection resolve #106 [t3l3machus/Villain#106] add custom callback for every new connection resolve Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] Add callback when new connection is established.

1 participant