Skip to content

Instantly share code, notes, and snippets.

@andsel
Created October 5, 2020 14:44
Show Gist options
  • Save andsel/209739ed3146d7995d4dba1eace9900c to your computer and use it in GitHub Desktop.
Save andsel/209739ed3146d7995d4dba1eace9900c to your computer and use it in GitHub Desktop.
client flood TCP request
#!/usr/bin/env ruby
require 'socket'
host = "localhost"
port = 5043
PAYLOAD = "System.Runtime.InteropServices.COMException (0x80004005): Error recived. at UiPath.UiNodeClass.Get(String bstrAttr) at UiPath.Core.UiElement.IsElementReady()\r"
def request_close(host, port)
client = TCPSocket.open(host, port)
client.print PAYLOAD
client.close
end
executor = java.util.concurrent.Executors.newFixedThreadPool(32)
(1..(1024 + 1)).each do |i|
puts "Creating task #{i}"
executor.submit do
request_close(host, port)
end
end
executor.shutdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment