Skip to content

Instantly share code, notes, and snippets.

@Shivammalaviya
Created June 22, 2022 15:41
Show Gist options
  • Save Shivammalaviya/65f216bd63143a6ba5f7dd2e476d9303 to your computer and use it in GitHub Desktop.
Save Shivammalaviya/65f216bd63143a6ba5f7dd2e476d9303 to your computer and use it in GitHub Desktop.
let TorRelayData = (
externaldata (Nickname:string,Fingerprint:string,EntryAddress:string,IPAddress:string,Port:string,AddressType:string,Hostname:string,CountryCode:string,IsRunning:bool,RelayPublishDate:string,LastChangedIPData:string)
[h@'https://raw.githubusercontent.com/Shivammalaviya/Tor/main/torexitnodes.csv'] with (ignoreFirstRecord=true,format="csv")
| where AddressType == "IPv4"
);
TorRelayData
| join kind=inner DeviceNetworkEvents on $left.IPAddress == $right.RemoteIP
| join kind=inner (DeviceInfo | distinct DeviceId, PublicIP) on DeviceId
| project Timestamp, DeviceId, LocalPublicIP = PublicIP, LocalIP, RemoteIP, TorIP = IPAddress, Hostname, CountryCode, ActionType, InitiatingProcessFileName, InitiatingProcessFolderPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment