forked from thinkst/canarytokens
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Brings support for the WireGuard Canarytoken to the open sourced canarytokens.org. With this change, deployments will need to add a private key seed and public IP to the the config files documented in the Canarytokens Docker repository.
- Loading branch information
Showing
17 changed files
with
379 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from twisted.application import internet | ||
from constants import INPUT_CHANNEL_WIREGUARD | ||
from channel import InputChannel | ||
import wireguard as wg | ||
from canarydrop import Canarydrop | ||
import queries | ||
class ChannelWireGuard(InputChannel): | ||
CHANNEL = INPUT_CHANNEL_WIREGUARD | ||
|
||
def __init__(self, switchboard, port=wg.DEFAULT_PORT): | ||
InputChannel.__init__(self, switchboard, name=self.CHANNEL, unique_channel=True) | ||
self.service = internet.UDPServer(port, wg.WireGuardProtocol(channel=self)) | ||
|
||
def dispatch(self, **kwargs): | ||
canarytoken = kwargs.pop('canarytoken') | ||
# TODO: If canarydrop no longer exists, delete key -> canarytoken mapping in WireGuard keymap | ||
kwargs['canarydrop'] = Canarydrop(**queries.get_canarydrop(canarytoken)) | ||
InputChannel.dispatch(self, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ pypng==0.0.18 | |
htmlmin==0.1.10 | ||
sendgrid==3.6.5 | ||
service_identity | ||
pyblake2==1.1.2 | ||
PyNaCl==1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.