Skip to content

Commit

Permalink
Parameter Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cn33liz committed Oct 23, 2019
1 parent 746eff6 commit 9a4bca0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion SharpHide/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,16 @@ static void Main(string[] args)
}
}
else {
UNICODE_STRING ValueData = new UNICODE_STRING("\"" + arguments["keyvalue"] + "\" " + arguments["arguments"]);
UNICODE_STRING ValueData;
if (arguments.ContainsKey("arguments"))
{
ValueData = new UNICODE_STRING("\"" + arguments["keyvalue"] + "\" " + arguments["arguments"]);
}
else
{
ValueData = new UNICODE_STRING("\"" + arguments["keyvalue"] + "\"");
}

Status = NtSetValueKey(regKeyHandle, ValueNamePtr, 0, RegistryKeyType.REG_SZ, ValueData.buffer, ValueData.MaximumLength);
if (Status.Equals(STATUS_SUCCESS)) {
Console.WriteLine("[+] Key successfully created.");
Expand Down

0 comments on commit 9a4bca0

Please sign in to comment.