How to use VMProtect.SDK.DecryptString

Issues related to VMProtect
Post Reply
khangminh
Posts: 4
Joined: Fri Jan 03, 2020 4:51 pm

How to use VMProtect.SDK.DecryptString

Post by khangminh »

Hello sir,
I'm new to vmprotect. I'm using .net to develope a console program. I just don't now is "VMProtect.SDK.DecryptString" to use is required to use for visible text only (Console.WriteLine or Console.Write) or for all methods will use the text content passed from the varibles? Is it require to use for File.WriteAllText, too?
Admin
Site Admin
Posts: 2585
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: How to use VMProtect.SDK.DecryptString

Post by Admin »

You have to use VMProtect.SDK.DecryptString for all const strings that you want to hide from your assembly. Something like this:

Code: Select all

		private void btnCheckPassword_Click(object sender, EventArgs e)
		{
			if (CheckPassword(txtPassword.Text))
			{
				MessageBox.Show(VMProtect.SDK.DecryptString("Correct password"), VMProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Information);
			} else
			{
				MessageBox.Show(VMProtect.SDK.DecryptString("Incorrect password"), VMProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Error);
				txtPassword.Focus();
			}
		}
khangminh
Posts: 4
Joined: Fri Jan 03, 2020 4:51 pm

Re: How to use VMProtect.SDK.DecryptString

Post by khangminh »

Is that require to put all varibles contain some strings (they're not visible to user) inside DecryptString method when put them into the constructor of another method or an method sir?

Regards,
Last edited by khangminh on Wed Jan 15, 2020 5:13 pm, edited 1 time in total.
khangminh
Posts: 4
Joined: Fri Jan 03, 2020 4:51 pm

Re: How to use VMProtect.SDK.DecryptString

Post by khangminh »

Admin wrote:You have to use VMProtect.SDK.DecryptString for all const strings that you want to hide from your assembly. Something like this:

Code: Select all

		private void btnCheckPassword_Click(object sender, EventArgs e)
		{
			if (CheckPassword(txtPassword.Text))
			{
				MessageBox.Show(VMProtect.SDK.DecryptString("Correct password"), VMProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Information);
			} else
			{
				MessageBox.Show(VMProtect.SDK.DecryptString("Incorrect password"), VMProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Error);
				txtPassword.Focus();
			}
		}
thank you Sir!
now i got a new problem. Seem all details about the Exception error are disappeared after using VMProtect. all errors are now very generally like this: "Exception has been throw by the target of an invocation." Was this really related to VMProtect? How could I handle these sir?

Regards,
Admin
Site Admin
Posts: 2585
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: How to use VMProtect.SDK.DecryptString

Post by Admin »

Please send us a test example (original EXE+VMP files) that shows your problem.
Post Reply