Created
October 5, 2020 14:44
-
-
Save andsel/209739ed3146d7995d4dba1eace9900c to your computer and use it in GitHub Desktop.
client flood TCP request
This file contains 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 characters
#!/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