Skip to content

Commit 5c02fb6

Browse files
authored
v1.0
only works on c# stealers
1 parent 51748db commit 5c02fb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1035
-0
lines changed

WebhookLookup.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35527.113 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebhookLookup", "WebhookLookup\WebhookLookup.csproj", "{417F7BB9-CCD2-40F0-972A-AF73F4AC16D3}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{417F7BB9-CCD2-40F0-972A-AF73F4AC16D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{417F7BB9-CCD2-40F0-972A-AF73F4AC16D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{417F7BB9-CCD2-40F0-972A-AF73F4AC16D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{417F7BB9-CCD2-40F0-972A-AF73F4AC16D3}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

WebhookLookup/Form1.Designer.cs

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WebhookLookup/Form1.cs

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
using System.Diagnostics;
2+
using System.Text.RegularExpressions;
3+
using Mono.Cecil;
4+
5+
namespace WebhookLookup
6+
{
7+
public partial class Form1 : Form
8+
{
9+
public Form1()
10+
{
11+
InitializeComponent();
12+
this.AllowDrop = true;
13+
this.DragEnter += new DragEventHandler(Form1_DragEnter);
14+
this.DragDrop += new DragEventHandler(Form1_DragDrop);
15+
textBox1.ReadOnly = true;
16+
}
17+
18+
private void Form1_DragEnter(object sender, DragEventArgs e)
19+
{
20+
if (e.Data.GetDataPresent(DataFormats.FileDrop))
21+
{
22+
e.Effect = DragDropEffects.Copy;
23+
}
24+
else
25+
{
26+
e.Effect = DragDropEffects.None;
27+
}
28+
}
29+
30+
private void Form1_DragDrop(object sender, DragEventArgs e)
31+
{
32+
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
33+
foreach (string file in files)
34+
{
35+
AnalyzeFile(file);
36+
}
37+
}
38+
39+
private void AnalyzeFile(string filePath)
40+
{
41+
if (filePath.EndsWith(".exe"))
42+
{
43+
ExtractWebhookFromExe(filePath);
44+
}
45+
46+
else
47+
{
48+
MessageBox.Show("u can only use .exe files!", "if you have any problems contact my discord: tuccarironnn");
49+
}
50+
}
51+
52+
private void ExtractWebhookFromExe(string filePath)
53+
{
54+
try
55+
{
56+
var assembly = Mono.Cecil.AssemblyDefinition.ReadAssembly(filePath);
57+
58+
string pattern = @"https://discord\.com/api/webhooks/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+";
59+
60+
List<string> webhooks = new List<string>();
61+
62+
foreach (var module in assembly.Modules)
63+
{
64+
foreach (var type in module.Types)
65+
{
66+
foreach (var method in type.Methods)
67+
{
68+
foreach (var body in method.Body.Instructions)
69+
{
70+
if (body.OpCode.Name == "ldstr")
71+
{
72+
string str = body.Operand as string;
73+
if (str != null && Regex.IsMatch(str, pattern))
74+
{
75+
webhooks.Add(str);
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
83+
ShowResults(webhooks);
84+
}
85+
catch (Exception ex)
86+
{
87+
MessageBox.Show($"Error: {ex.Message}", "an error has occurred.");
88+
}
89+
}
90+
91+
private void ExtractWebhookFromPy(string filePath)
92+
{
93+
string fileContent = File.ReadAllText(filePath);
94+
95+
string pattern = @"https://discord\.com/api/webhooks/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+";
96+
97+
List<string> webhooks = new List<string>();
98+
99+
foreach (Match match in Regex.Matches(fileContent, pattern))
100+
{
101+
webhooks.Add(match.Value);
102+
}
103+
104+
ShowResults(webhooks);
105+
}
106+
107+
private void ShowResults(List<string> webhooks)
108+
{
109+
if (webhooks.Count > 0)
110+
{
111+
foreach (string webhook in webhooks)
112+
{
113+
textBox1.AppendText(webhook + Environment.NewLine);
114+
}
115+
}
116+
else
117+
{
118+
MessageBox.Show("no webhook found in the file.", "if you have any problems contact my discord: tuccarironnn");
119+
}
120+
}
121+
122+
private void Form1_Load(object sender, EventArgs e)
123+
{
124+
}
125+
126+
private void button1_Click(object sender, EventArgs e)
127+
{
128+
if (!string.IsNullOrEmpty(textBox1.Text))
129+
{
130+
Clipboard.SetText(textBox1.Text);
131+
textBox1.Clear();
132+
MessageBox.Show("Copied");
133+
}
134+
else
135+
{
136+
}
137+
}
138+
139+
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
140+
{
141+
Process.Start(new ProcessStartInfo
142+
{
143+
FileName = "https://demirr2.github.io/webhookfucker/",
144+
UseShellExecute = true
145+
});
146+
}
147+
}
148+
}

0 commit comments

Comments
 (0)