Esempio n. 1
0
        public static string tfacode(string code)
        {
            string result = "";

            xNet.HttpRequest http = new xNet.HttpRequest();
            try
            {
                code = code.Replace("\r", "").Replace("\n", "").Replace(" ", "").ToString();
                string response = http.Get("http://2fa.live/tok/" + code).ToString();
                result = Regex.Match(response, "token.*?(\\d+)").Groups[1].Value;
            }
            catch
            {
                result = "";
            }
            finally
            {
                http.Dispose();
                http.Close();
            }
            return(result);
        }