那个, 恩, 软件进入升级阶段了, 感觉就很牛批.
走过路过不要错过, 苹果电脑的就去下个村口, 我们说不定还会再见.
瞧一瞧, 试一试, 最新的 windows 自律监控程序腾空出世, 完全免费开源
俗话说的好, 不试不知道, 一试吓一跳, 赶紧来试试, 看看自己每天都在电脑上干了些什么, 我一天使用下来就发现自己每天 80% 的时间都在浏览器上
最新的安装包地址:
Watcher 守望者. exe http://api.bobdong.cn/public/static/Win/Watcher守望者.exe
然后欢迎 F 一下咯, 点赞的将来都是王多余!
- Github:
- https://github.com/d100000/Watcher
同时放些小辅助 Helper 的代码片段:
- C# 实现 SHA1 加密, 等同于 PHP 中的 (SHA1)
- /// <summary>
- /// SHA1 加密 ==PHP(SHA1)
- /// </summary>
- /// <param name="data"></param>
- /// <returns></returns>
- public static string Sha1Sign(string data)
- {
- byte[] temp1 = Encoding.UTF8.GetBytes(data);
- SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();
- byte[] temp2 = sha.ComputeHash(temp1);
- sha.Clear();
- // 注意, 不能用这个
- //string output = Convert.ToBase64String(temp2);
- var output = BitConverter.ToString(temp2);
- output = output.Replace("-", "");
- output = output.ToLower();
- return output;
- }
- c# 实现 CURL 操作
- public static string HttpCall(string url, string postData, HttpEnum method)
- {
- System.GC.Collect();
- HttpwebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
- myHttpWebRequest.Timeout = 10000;
- if (method == HttpEnum.Post)
- {
- myHttpWebRequest.Method = "POST";
- // 采用 UTF8 编码
- UTF8Encoding encoding = new UTF8Encoding();
- byte[] byte1 = encoding.GetBytes(postData);
- myHttpWebRequest.ContentType = "application/x-www-form-urlencoded";
- myHttpWebRequest.ContentLength = byte1.Length;
- /*
- * 写请求体数据
- */
- Stream newStream = myHttpWebRequest.GetRequestStream();
- newStream.Write(byte1, 0, byte1.Length);
- newStream.Close();
- }
- else// get
- myHttpWebRequest.Method = "GET";
- myHttpWebRequest.ProtocolVersion = new Version(1, 1); //Http/1.1 版本
- string lchtml = string.Empty;
- try
- {
- // 发送成功后接收返回的 JSON 信息
- HttpWebResponse response = (HttpWebResponse) myHttpWebRequest.GetResponse();
- Encoding enc = Encoding.GetEncoding("UTF-8");
- Stream stream = response.GetResponseStream();
- if (stream != null)
- {
- StreamReader streamReader = new StreamReader(stream, enc);
- lcHtml = streamReader.ReadToEnd();
- }
- response.Close();
- response = null;
- }
- catch (Exception Ext)
- {
- myHttpWebRequest = null;
- }
- finally
- {
- myHttpWebRequest = null;
- }
- return (lcHtml);
- }
- public enum HttpEnum
- {
- /// <summary>
- /// http post 方法
- /// </summary>
- Post=1,
- /// <summary>
- /// http get 方法
- /// </summary>
- Get=2,
- /// <summary>
- /// http put 方法
- /// </summary>
- Put=3,
- /// <summary>
- /// http delete 方法
- /// </summary>
- Delete=4
- }
- C# 实现字符串简单加解密功能
- /// <summary>
- /// 字符串加密
- /// </summary>
- /// <param name="passWord"></param>
- /// <param name="data"></param>
- /// <returns></returns>
- public static string EncryptEncode(string passWord, string data)
- {
- var pwKey = passWord.ToArray().Aggregate(0, (current, c) => current + c);
- var pdData = data.ToArray().Aggregate("", (current, c) => current + ((c + pwKey) +","));
- return Convert.ToBase64String(Encoding.Default.GetBytes(pdData)).Replace("O", ",").Replace("E", ".").Replace(",", "OE").Replace(".", "O");
- }
- /// <summary>
- /// 字符串解密
- /// </summary>
- /// <param name="passWord"></param>
- /// <param name="data"></param>
- /// <returns></returns>
- public static string EncryptDecode(string passWord, string data)
- {
- var pwKey = passWord.ToArray().Aggregate(0, (current, c) => current + c);
- var sArray = DecodeBase64(data.Replace("OE", ",").Replace("O", ".").Replace(".", "E").Replace(",", "O")).Split(',');
- return sArray.Where(stringData => stringData != "").Aggregate("", (current, stringData) => current + (char) (Convert.ToInt32(stringData) - pwKey));
- }
- /// <summary>
- /// Base64 decode
- /// </summary>
- /// <param name="result"></param>
- /// <returns></returns>
- public static string DecodeBase64(string result)
- {
- var encode = Encoding.UTF8;
- string decode;
- var bytes = Convert.FromBase64String(result);
- try
- {
- decode = encode.GetString(bytes);
- }
- catch
- {
- decode = result;
- }
- return decode;
- }
磕头跪谢
来源: https://www.cnblogs.com/Bobdong/p/9399070.html