Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[t3l3machus/Villain#106] add custom callback for every new connection resolve #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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