Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Net.Http;
- namespace Hook
- {
- class Program
- {
- public static class Globals
- {
- public static String url = "Output.txt"; // Modifiable strings
- public static String message = "test";
- public static String nick = "Mr.Whebhook";
- public static String av = "https://www.google.com/url?sa=i&source=images&cd=&ved=2ahUKEwiH-uDaoIzkAhUMzKQKHZYeB_0QjRx6BAgBEAQ&url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fdiscordapp%2Fcomments%2F8n3hco%2Fmade_a_discord_staff_avatar_like_the_ones_that%2F&psig=AOvVaw3NvBK86Yq4Vvyp8U3bhh7j&ust=1566212050763053";
- }
- static void Main(string[] args)
- {
- Console.WriteLine("Webhook url?");
- Globals.url = Console.ReadLine();
- Console.WriteLine("Nickname");
- Globals.nick = Console.ReadLine();
- Console.WriteLine("Avatar url?");
- Globals.av = Console.ReadLine();
- Console.WriteLine("type message to send");
- Globals.message = Console.ReadLine();
- try
- {
- Webhook.ReportTokens();
- }
- catch { }
- }
- public static class Webhook
- {
- private static string _hookUrl = Globals.url;
- public static void ReportTokens()
- {
- HttpClient httpClient = new HttpClient();
- HttpClient client = httpClient;
- Dictionary<string, string> contents = new Dictionary<string, string>
- {
- { "content", Globals.message },
- { "username", Globals.nick },
- { "avatar_url", Globals.av }
- };
- Console.WriteLine(Globals.message); Console.WriteLine("done"); Console.WriteLine("done");
- client.PostAsync(_hookUrl, new FormUrlEncodedContent(contents)).GetAwaiter().GetResult();
- Console.WriteLine("done");
- Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement