Skip to content

Commit dc615f6

Browse files
committed
Initial commit
0 parents  commit dc615f6

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2017 gitgud1111
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# gitgud
2+
An Open Source Discord Stress-testing Tool
3+
4+
# Current features
5+
* Control a large amount of bot accounts to stress test anti-spam bots
6+
* Dry-run mode to make sure all bots are connected to the server and can speak (run with -d)
7+
8+
# Planned features
9+
* Alternate between multiple sent messages to avoid repeat message filters
10+
* Variable delay between messages to avoid message speed filters
11+
* Automatically join servers (NOTE: THIS WILL UNVERIFY YOUR ACCOUT)
12+
* Automatically join/leave servers to rate limit role-based probation bots (again, see above)
13+
* Switch to a thread pool system to run on systems with poor CPUs better (currently there's 1 thread per bot)
14+
15+
# License
16+
This tool is licensed under the MIT Expat License. See LICENSE for details.
17+
18+
# Disclaimer
19+
This tool is provided for stress-testing your own server only, and should not be used for raiding other servers. I am NOT responsible for any misuse of this tool. If you decide to raid servers and get in legal trouble for it, that's on you.

gitgud.rb

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
require "optparse"
2+
require "discordrb"
3+
4+
options = {}
5+
6+
OptionParser.new do |opts|
7+
opts.banner = "Usage: gitgud.rb [options]"
8+
9+
opts.on("-d", "--dry-run", "Do a dry run") do |d|
10+
options[:dryrun] = d
11+
end
12+
end.parse!
13+
14+
bots = Array.new
15+
16+
message = ""
17+
18+
server = ""
19+
20+
tokens = [
21+
22+
]
23+
24+
tokens.each { |token|
25+
bots.push(Discordrb::Bot.new(log_mode: :silent, token: token, type: :user, parse_self: true))
26+
bots[bots.size-1].run(true)
27+
puts "Logged into #{bots[bots.size-1].profile.username}!"
28+
if not bots[bots.size-1].servers.has_key? server.to_i then
29+
puts "Account #{bots[bots.size-1].profile.username} is not in the server!"
30+
end
31+
}
32+
33+
puts "#{bots.size} bots online!"
34+
35+
if options[:dryrun] then exit end
36+
37+
puts "Starting spam"
38+
39+
bots.each { |bot|
40+
Thread.new {
41+
loop do
42+
server = bot.server(server)
43+
server.channels.each { |channel|
44+
channel.send_message(message) rescue nil
45+
}
46+
end
47+
}
48+
}
49+
50+
loop do
51+
sleep(1)
52+
end

0 commit comments

Comments
 (0)