From d482ed88724b9dc84ee5f2b70252d4aab6b837d9 Mon Sep 17 00:00:00 2001 From: Debulois Date: Wed, 19 Oct 2022 12:43:49 +0200 Subject: Initial commit --- WinKeyRecover/KeyChecker/GetString.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 WinKeyRecover/KeyChecker/GetString.cs (limited to 'WinKeyRecover/KeyChecker/GetString.cs') diff --git a/WinKeyRecover/KeyChecker/GetString.cs b/WinKeyRecover/KeyChecker/GetString.cs new file mode 100644 index 0000000..bad8722 --- /dev/null +++ b/WinKeyRecover/KeyChecker/GetString.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WinKeyRecover +{ + internal class GetString + { + public string Get(byte[] bytes, int index) + { + int num = index; + + while (bytes[num] != 0 || bytes[num + 1] != 0) + { + num++; + } + + return Encoding.ASCII.GetString(bytes, index, num - index).Replace("\0", ""); + } + } +} -- cgit v1.2.3