# Discord Beacon Notifications

This post is a short easy guide to setting up discord notifications using a small github project I posted recently.

Clone my git repo: <https://github.com/CodeXTF2/beacon_notify_discordhook>

```
git clone https://github.com/CodeXTF2/beacon_notify_discordhook.git
```

Get a discord webhook in Server Settings -> Integrations -> Webhooks -> New webhook

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FmBadsPnbsiwa2IHnLwyl%2Fimage.png?alt=media\&token=9fe08cae-2c8c-459c-b197-47a590621c89)

Copy the webhook url and paste it in alert.py in the webhookurl variable

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FubUzRgLyhory4kPnr5vo%2Fimage.png?alt=media\&token=3599257a-bab0-4a5b-80a1-eb351c78ff86)

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FQRFygcrovQsCjVfkAPC4%2Fimage.png?alt=media\&token=e00f151e-3d2e-4d2c-8995-d146ade98a04)

Get your userid by right clicking your discord name and clicking "Copy id"

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FbUE6WsOlNFgQg2CN3sWn%2Fimage.png?alt=media\&token=9ed516ba-d2db-4be9-9ebb-bca22e26d0e1)

Paste the id in alert.py in the "ping\_id" variable (as a str)

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FU1w4t8upoUUZYGiQ7RwC%2Fimage.png?alt=media\&token=ccab5543-219a-41ce-b2c8-86f7770dd9c5)

Edit discord\_notify.cna and replace the "path\_to\_py" variable with the path to the alert.py file

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2F6Kz6rJkBSYtBlcnPgbEH%2Fimage.png?alt=media\&token=ace5cf70-caa0-43ca-94b2-290c43be15c4)

Load the .cna file in the teamserver via the headless AggressorScript console ./agscript

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FmzR3SsKSXYBGTXCTojHD%2Fimage.png?alt=media\&token=75990afa-bb6e-4003-89b5-7182ebf81dd2)

You can use linux utilities like "screen" to leave the agscript client running in the background after you terminate your shell session.

Now, spawn a beacon and you should get a ping in discord!

![](https://3005128937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fGnUKow1kUWdcf20IE0%2Fuploads%2FW412wiE2JxYsS1nJMeG7%2Fimage.png?alt=media\&token=7a8f37d6-0c85-434e-89d7-6c2a45adb742)
