Skip to content

Instantly share code, notes, and snippets.

@Shivammalaviya
Created June 14, 2022 13:22
Show Gist options
  • Save Shivammalaviya/10b045778f0881f809bf04599aa6c421 to your computer and use it in GitHub Desktop.
Save Shivammalaviya/10b045778f0881f809bf04599aa6c421 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://torinfo.blob.core.windows.net/public/TorRelayIPs.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