Created
December 26, 2020 14:30
-
-
Save Stanley-GF/c2d06a3e9eb272eb91827557b6cee780 to your computer and use it in GitHub Desktop.
A simple C# method for create hastebin without using any librarys
This file contains hidden or 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
public class Hastebin | |
{ | |
public static string CreateHaste(string value) | |
{ | |
WebClient | |
client = new WebClient(); | |
string bruh = client.UploadString("http://hastebin.com/documents", value); | |
return "http://hastebin.com/" + bruh.Replace(@"\", "").Replace("/", "").Replace("key", "").Replace("{", "").Replace("}", "").Replace("\"", ""); | |
} | |
} | |
// So call the method | |
public class program | |
{ | |
static void Main(string[] args) | |
{ | |
string myfile = Hastebin.CreateHaste("text"); | |
Console.WriteLine(myfile); | |
Console.ReadKey(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment