- Jan 03 Mon 2022 23:36
-
【資安】SQL Injection
- Dec 15 Wed 2021 05:01
-
【C#】RabbitMQ
using Newtonsoft.Json.Linq;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Configuration;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
using Newtonsoft.Json;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Collections.Specialized;
using System.Threading;
using static System.String;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Configuration;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
using Newtonsoft.Json;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Collections.Specialized;
using System.Threading;
using static System.String;
- Dec 14 Tue 2021 01:01
-
【Python】RabbitMQ
- Aug 11 Wed 2021 07:58
-
【.NET Core】二次驗證
using OtpNet;
using Microsoft.AspNetCore.WebUtilities;
Tokn.secretKey = KeyGeneration.GenerateRandomKey();
String secretKey = Base32Encoding.ToString(Tokn.secretKey);
UriBuilder uriBuilder = new UriBuilder();
uriBuilder.Scheme = "otpauth";
uriBuilder.Host = "totp";
uriBuilder.Path = appname;
var query = new Dictionary<string, string>();
query.Add("issuer", issuer);
query.Add("secret", secretKey);
//寫入DB
string strsql = $@"update table set KEY = '{secretKey}' WHERE user_id = '{issuer}'";
_oracleService.ExecuteCommitSQL(strsql);
var uri = uriBuilder.ToString();
uri = QueryHelpers.AddQueryString(uri, query);
using Microsoft.AspNetCore.WebUtilities;
Tokn.secretKey = KeyGeneration.GenerateRandomKey();
String secretKey = Base32Encoding.ToString(Tokn.secretKey);
UriBuilder uriBuilder = new UriBuilder();
uriBuilder.Scheme = "otpauth";
uriBuilder.Host = "totp";
uriBuilder.Path = appname;
var query = new Dictionary<string, string>();
query.Add("issuer", issuer);
query.Add("secret", secretKey);
//寫入DB
string strsql = $@"update table set KEY = '{secretKey}' WHERE user_id = '{issuer}'";
_oracleService.ExecuteCommitSQL(strsql);
var uri = uriBuilder.ToString();
uri = QueryHelpers.AddQueryString(uri, query);
- Aug 03 Tue 2021 01:45
-
【Nginx】鏡像打包與Https導入
- Feb 25 Mon 2019 00:16
-
【UI/UX】收集筆記
- Jul 12 Thu 2018 13:52
-
【ASP.NET MVC】MVC4 API
- Jul 11 Wed 2018 21:12
-
【Android】Volley 取代HttpURLConnection及HttpClient
- Jun 04 Mon 2018 16:15
-
【Python】最好的JSON解析器
- May 27 Sun 2018 05:40
-
【Python】連線遠端MySQL
- May 21 Mon 2018 14:25
-
【MySQL】Table 'XXX' is full
- May 18 Fri 2018 02:41
-
【Python】陣列元素計算最佳套件
from collections import Counter



