aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-03-11 09:22:10 -0700
committerAShifter <[email protected]>2017-03-11 09:22:10 -0700
commitd15965e442a1d29424f2e6f315dae3281154f944 (patch)
tree26002bfe906c3ba2f881e365ca94c712950f395d
parentbb768396787bd0ea5e608f007d881edec693f2ed (diff)
parent2ff261328740cbb628678605b09800f22c9b67a9 (diff)
downloadshiftos_thereturn-d15965e442a1d29424f2e6f315dae3281154f944.tar.gz
shiftos_thereturn-d15965e442a1d29424f2e6f315dae3281154f944.tar.bz2
shiftos_thereturn-d15965e442a1d29424f2e6f315dae3281154f944.zip
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLetters.cs2
-rw-r--r--ShiftOS.WinForms/Controls/TerminalBox.cs24
-rw-r--r--ShiftOS.WinForms/HackerCommands.cs32
-rw-r--r--ShiftOS.WinForms/WinformsDesktop.cs6
4 files changed, 47 insertions, 17 deletions
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs
index d11f6f6..700df7e 100644
--- a/ShiftOS.WinForms/Applications/ShiftLetters.cs
+++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs
@@ -50,7 +50,7 @@ namespace ShiftOS.WinForms.Applications
"shiftorium", "codepoints", "shiftletters", "shops", "mud", "notification", "namechanger",
"skinning", "skinloader", "calculator", "fileskimmer", "lua", "shiftnet", "terminal", "textpad"};
List<String> contributorsWordlist = new List<string> { "philipadams", "carverh", "computelinux", "lempamo",
- "wowmom", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox", "ashifter"};
+ "wowmom", "michaeltheshifter", "arencllc", "therandommelon", "pfg", "craftxbox", "ashifter"};
List<string> osWordlist = new List<string>
{
diff --git a/ShiftOS.WinForms/Controls/TerminalBox.cs b/ShiftOS.WinForms/Controls/TerminalBox.cs
index 4fcb429..b75d077 100644
--- a/ShiftOS.WinForms/Controls/TerminalBox.cs
+++ b/ShiftOS.WinForms/Controls/TerminalBox.cs
@@ -61,5 +61,29 @@ namespace ShiftOS.WinForms.Controls
{
this.AppendText(Localization.Parse(text) + Environment.NewLine);
}
+
+ bool quickCopying = false;
+
+ protected override void OnMouseDown(MouseEventArgs e)
+ {
+ //if right-clicking, then we initiate a quick-copy.
+ if (e.Button == MouseButtons.Right)
+ quickCopying = true;
+
+ //Override the mouse event so that it's a left-click at all times.
+ base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, e.Clicks, e.X, e.Y, e.Delta));
+ }
+
+ protected override void OnMouseUp(MouseEventArgs mevent)
+ {
+ if(quickCopying == true)
+ {
+ if (!string.IsNullOrWhiteSpace(this.SelectedText))
+ {
+ this.Copy();
+ }
+ }
+ base.OnMouseUp(mevent);
+ }
}
}
diff --git a/ShiftOS.WinForms/HackerCommands.cs b/ShiftOS.WinForms/HackerCommands.cs
index 7861981..f3f132e 100644
--- a/ShiftOS.WinForms/HackerCommands.cs
+++ b/ShiftOS.WinForms/HackerCommands.cs
@@ -360,7 +360,7 @@ namespace ShiftOS.WinForms
{
string usr = args["user"].ToString();
string sys = args["sys"].ToString();
-
+ bool received = false;
ServerMessageReceived msgReceived = null;
Console.WriteLine("--hooking system thread...");
@@ -373,30 +373,28 @@ namespace ShiftOS.WinForms
var rnd = new Random();
var sw = new Stopwatch();
sw.Start();
- string pass = "";
- for(int i = 0; i < sve.Password.Length; i++)
+ Thread.Sleep(2000);
+ if(rnd.Next(0, 100) >= 75)
{
- char c = '\0';
- while (c != sve.Password[i])
- c = chars[rnd.Next(0, chars.Length)];
- pass += c;
- Thread.Sleep(rnd.Next(25,75));
+ Console.WriteLine("--operation took too long - failed.");
+ return;
}
sw.Stop();
- Console.WriteLine(pass);
+ Console.WriteLine(sve.Password);
Console.WriteLine();
Console.WriteLine("--password breached. Operation took " + sw.ElapsedMilliseconds + " milliseconds.");
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
else if(msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
};
Console.WriteLine("--beginning brute-force attack on " + usr + "@" + sys + "...");
- Thread.Sleep(500);
ServerManager.MessageReceived += msgReceived;
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
@@ -404,6 +402,7 @@ namespace ShiftOS.WinForms
user = usr,
sysname = sys
}));
+ Thread.Sleep(500);
return true;
}
@@ -418,7 +417,7 @@ namespace ShiftOS.WinForms
string usr = args["user"].ToString();
string sys = args["sys"].ToString();
string pass = args["pass"].ToString();
-
+ bool received = false;
ServerMessageReceived msgReceived = null;
Console.WriteLine("--hooking multi-user domain response call...");
@@ -441,18 +440,19 @@ namespace ShiftOS.WinForms
{
Console.WriteLine("--access denied.");
}
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
else if (msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
};
Console.WriteLine("--contacting multi-user domain...");
- Thread.Sleep(500);
ServerManager.MessageReceived += msgReceived;
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
@@ -460,6 +460,7 @@ namespace ShiftOS.WinForms
user = usr,
sysname = sys
}));
+ Thread.Sleep(500);
return true;
}
@@ -476,7 +477,7 @@ namespace ShiftOS.WinForms
string sys = args["sys"].ToString();
string pass = args["pass"].ToString();
long amount = (long)args["amount"];
-
+ bool received = false;
if(amount < 0)
{
Console.WriteLine("--invalid codepoint amount - halting...");
@@ -509,12 +510,13 @@ namespace ShiftOS.WinForms
{
Console.WriteLine("--access denied.");
}
-
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
else if (msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
+ received = true;
ServerManager.MessageReceived -= msgReceived;
}
};
@@ -528,6 +530,8 @@ namespace ShiftOS.WinForms
user = usr,
sysname = sys
}));
+ Thread.Sleep(500);
+
return true;
}
diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs
index 8900a69..d30adb4 100644
--- a/ShiftOS.WinForms/WinformsDesktop.cs
+++ b/ShiftOS.WinForms/WinformsDesktop.cs
@@ -63,8 +63,10 @@ namespace ShiftOS.WinForms
NotificationDaemon.NotificationMade += (note) =>
{
//Soon this will pop a balloon note.
- btnnotifications.Text = "Notifications (" + NotificationDaemon.GetUnreadCount().ToString() + ")";
-
+ this.Invoke(new Action(() =>
+ {
+ btnnotifications.Text = "Notifications (" + NotificationDaemon.GetUnreadCount().ToString() + ")";
+ }));
};
NotificationDaemon.NotificationRead += () =>