Created
September 19, 2019 17:33
-
-
Save daddycocoaman/319e09d775bdd9044e5a1cbd02f42d96 to your computer and use it in GitHub Desktop.
Revisions
-
daddycocoaman created this gist
Sep 19, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ /* Pings all of your available networks and tells your net that you're snitching Author: Daddycocoaman */ import System import System.Net.NetworkInformation import System.Net import System.Net.Sockets import System.Text BUFFER = ASCIIEncoding().GetBytes("IMSNITCHINGONALLYALLCAUSEMALWARE") def getBroadcastAddress(address as IPAddress, subnetMask as IPAddress) as IPAddress: ipAddressBytes = address.GetAddressBytes() subnetMaskBytes = subnetMask.GetAddressBytes() broadcastAddress = array(byte, ipAddressBytes.Length) for i in range(broadcastAddress.Length): broadcastAddress[i] = (ipAddressBytes[i] | (subnetMaskBytes[i] ^ 255)) return IPAddress(broadcastAddress) def goSnitch(addr as IPAddress): ping = Ping() ping.Send(addr, 1, BUFFER) def main(): adapters = NetworkInterface.GetAllNetworkInterfaces() ips = [] for a in adapters: ips.Extend([[ma.Address, ma.IPv4Mask] for ma in a.GetIPProperties().UnicastAddresses if ma.Address.AddressFamily == AddressFamily.InterNetwork and not IPAddress.IsLoopback(ma.Address)]) broadAddrs = [] for ip in ips: combo = ip cast List goSnitch(getBroadcastAddress(combo[0], combo[1])) main()