-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSMTPHacker.cs
47 lines (37 loc) · 1.15 KB
/
SMTPHacker.cs
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
39
40
41
42
43
44
45
46
47
using System;
using System.IO;
namespace SMTPHacker
{
class Program
{
static void Main(string[] args)
{
SMTPSettings settings;
FileInfo defaultsettings = new FileInfo("settings.cfg");
if (defaultsettings.Exists)
{
settings = SMTPSettings.Load(defaultsettings.FullName);
var smtplistener = new SMTPListener(settings);
smtplistener.Start();
Console.WriteLine("Started...");
Console.ReadKey();
smtplistener.Dispose();
}
else
{
Console.WriteLine("Created settings.cfg.");
Console.WriteLine("Edit this file to customize.");
settings = new SMTPSettings()
{
LocalPort = 25,
Recipient ="[email protected]",
RemoteAddress = "smtp.com",
RemotePort = 25,
Sender = "[email protected]"
};
settings.Save(defaultsettings.FullName);
return;
}
}
}
}