public static bool Prefix(NewHash hash) { if (!Settings.keyboardShortcut.Value.IsPressed()) { return(true); } var type = hash.GetFromKey("WindowType") as string; if (type == "SellPerCondition") { return(true); } GameManager.Get().ButtonAccept(hash); return(false); }
public Boolean Verify(String _StringToVerify, String _Md5String) { Double SaltAddress; String SaltID; String NewHash; try{ //Finds the Salt Address and Removes the Salt Address from the string SaltAddress = System.Convert.ToDouble(_Md5String.Substring(3, 2)); _Md5String = _Md5String.Remove(3, 2); //Finds the SaltID and removes it from the string: SaltID = _Md5String.Substring(System.Convert.ToInt32(SaltAddress), 4); _Md5String = _Md5String.Remove(System.Convert.ToInt32(SaltAddress), 4); //Converts the string p;sed to us to Bytes EncStringBytes = Encoder.GetBytes(_StringToVerify + SaltID); //Encryptes the string p;sed to us with the salt EncStringBytes = MD5Hasher.ComputeHash(EncStringBytes); //Converts the Hash to a string NewHash = BitConverter.ToString(EncStringBytes); NewHash = NewHash.Replace("-", null); //Tests the NewHash against the one passed to us if (NewHash == _Md5String) { return(true); } else { return(false); } } catch { return(false); } }