forked from NewEraCracker/LOIC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
56 lines (55 loc) · 1.41 KB
/
Program.cs
File metadata and controls
56 lines (55 loc) · 1.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Windows.Forms;
using System.Text;
namespace LOIC
{
static class Program
{
[STAThread]
static void Main(string[] cmdLine)
{
bool hive = false;
bool hide = false;
/* IRC */
string ircserver = "";
string ircport = "";
string ircchannel = "";
/* Lets try this! */
int count = 0;
foreach (string s in cmdLine)
{
/* IRC */
if (s.ToLower() == "/hivemind")
{
hive = true;
ircserver = cmdLine[count + 1]; //if no server entered let it crash
try {ircport = cmdLine[count + 2];}
catch (Exception) {ircport = "6667";} //default
try {ircchannel = cmdLine[count + 3];}
catch (Exception) {ircchannel = "#loic";} //default
}
/* Lets try this! */
if (s.ToLower() == "/hidden") {hide = true;}
count++;
}
//Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain(hive, hide, ircserver, ircport, ircchannel));
}
}
public partial class Functions
{
public string RandomString()
{
StringBuilder builder = new StringBuilder();
Random random = new Random();
char ch;
for (int i = 0; i < 6; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
}
}