Skip to content

Instantly share code, notes, and snippets.

@daddycocoaman
Created September 19, 2019 17:33
Show Gist options
  • Select an option

  • Save daddycocoaman/319e09d775bdd9044e5a1cbd02f42d96 to your computer and use it in GitHub Desktop.

Select an option

Save daddycocoaman/319e09d775bdd9044e5a1cbd02f42d96 to your computer and use it in GitHub Desktop.

Revisions

  1. daddycocoaman created this gist Sep 19, 2019.
    39 changes: 39 additions & 0 deletions TELLnet.boo
    Original 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()