月份:2017年5月

Something that happened recently

Something that happened recently

The University believes that to be an informed global citizen it is critical to hear different viewpoints, to embrace diversity, and demonstrate tolerance when faced with views with which we may disagree.
Listening to and respectfully engaging with those whom we disagree are essential skills, both within university walls and beyond.

The University proudly supports Shuping’s right to share her views and her unique perspectives and we commend her on lending her voice on this joyous occasion.

这是马里兰大学对杨舒平演讲所引发争议的回复。
再看看国内一片沸腾的征讨之声,我才猛然发觉,在国内,这种不经过大脑,人云亦云的人居然这么多。哪怕只是有最基础最基础的英语阅读能力,都能看得出社交媒体上疯传的解读是对她本人所说的话多么巨大的曲解。的确,她在演讲中的确用了一些夸张的方式来描写中国,然而就这样一些词语,甚至可以说是正确的批评,却让无数国人愤懑不已。为什么不能理性地去思考一下她说的到底是不是对的?甚至就因为批评了中国客观存在的现象就对她口诛笔伐,甚至扣上”汉奸“、”走狗“的帽子,这真的是一个大国人民的包容心吗?
恐怕很大一部分中国人民,并没有让自己的思维能力,跟上经济发展的速度。
套用知乎上的一句话“人民强,则国强,但是这个强并不是口头上占了便宜就行了。”
“与君共勉”

SYSTEM CLEANNER

SYSTEM CLEANNER

        private void initScanFolder()
        {
            //SYSTEM
            //PREFETCH
            scanFolder.Add("Prefetch Files", Env.GetFolderPath(Spi.Windows) + @"\Prefetch");
            //ICON CACHE
            scanFolder.Add("Icon caches", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\IconCache.db");
            //SYSTEM AUTOUPDATE
            scanFolder.Add("System autoupdate files", Env.GetFolderPath(Spi.Windows) + @"\SoftwareDistribution\Download");
            //SYSTEM LOG FILES
            //AUTOUPDATE HOTFIX LOG
            scanFolder.Add("Autoupdate hotfix log", Env.GetFolderPath(Spi.Windows) + @"\SoftwareDistribution\DataStore\Logs");
            //ERROR REPORT
            scanFolder.Add("Error report", @"C:\ProgramData\Microsoft\Windows\WER\ReportArchive");
            //LOGS
            scanFolder.Add("Windows LOG", Env.GetFolderPath(Spi.Windows) + @"\Logs");

            //GOOGLE CHROME
            //BROSWE HISTORY
            scanFolder.Add("Chrome history", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Google\Chrome\User Data\Default\JumpListIconsOld");
            //CACHE
            scanFolder.Add("Chrome cache", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Google\Chrome\User Data\Default\Cache");
            //COOKIES
            scanFolder.Add("Chrome cookies", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Google\Chrome\User Data\Default\Local Storage");

            //INTERNET EXPLORER
            //CACHE
            scanFolder.Add("IE cache", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Microsoft\Windows\INetCache\IE");
            scanFolder.Add("IE_low cache ", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Microsoft\Windows\INetCache\Low\IE");
            //COOKIES
            scanFolder.Add("IE cookies", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Microsoft\Windows\INetCookies");
            scanFolder.Add("IE DOM files", Env.GetFolderPath(Spi.UserProfile) + @"\AppData\Local\Microsoft\Internet Explorer\DOMStore");
        }
[IS]OTP

[IS]OTP

One Time Password
基于AES+TIMESTAMP

using System;
using System.Security.Cryptography;
using System.Text;
using System.IO;

public class Test
{
    public static void Main()
    {
        const string SharedKey = "12341234123412341234123412341234";
        byte[] PrevInput = Encoding.UTF8.GetBytes(SharedKey);
        while (true)
        {
            var TimeStamp = GetTimeStamp();
            PrevInput = GetNewInput(PrevInput, Encoding.UTF8.GetBytes(TimeStamp + TimeStamp + TimeStamp + TimeStamp.Substring(8, 2)));
            PrevInput = AESEncrypt(PrevInput, SharedKey);
            Console.WriteLine("Pass: " + Convert.ToBase64String(PrevInput, 0, 32));
            Console.WriteLine("Time: " + TimeStamp);
            Console.ReadKey();
        }
    }

    public static byte[] AESEncrypt(byte[] Data, String Key)
    {
        MemoryStream mStream = new MemoryStream();
        RijndaelManaged aes = new RijndaelManaged();
        byte[] plainBytes = Data;
        Byte[] bKey = new Byte[32];
        Array.Copy(Encoding.UTF8.GetBytes(Key.PadRight(bKey.Length)), bKey, bKey.Length);
        aes.Mode = CipherMode.ECB;
        aes.Padding = PaddingMode.PKCS7;
        aes.KeySize = 128;
        aes.Key = bKey;
        CryptoStream cryptoStream = new CryptoStream(mStream, aes.CreateEncryptor(), CryptoStreamMode.Write);
        try
        {
            cryptoStream.Write(plainBytes, 0, plainBytes.Length);
            cryptoStream.FlushFinalBlock();
            return mStream.ToArray();
        }
        finally
        {
            cryptoStream.Close();
            mStream.Close();
            aes.Clear();
        }
    }

    public static byte[] GetNewInput(byte[] PrevInput,byte[] TimeStamp)
    {
        byte[] NewInput = new byte[32];
        for (int i = 0; i < 32; i++)
        {
            NewInput[i] = (byte)(PrevInput[i] | TimeStamp[i]);
        }
        return NewInput;
    }

    public static string GetTimeStamp()
    {
        TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
        return Convert.ToInt64(ts.TotalSeconds).ToString();
    }
}