福斯汽車 價值 180億美元的作弊軟體

福斯汽車(VW - Volkswagen)因為作弊軟體被判賠 180億美金,這段程式作用就是針對EPA(美國環保署)驗車的情境,切換到低廢氣模式(效能較低),正常駕駛則都是高效能模式。

經過美國驗證過,價值這麼高的程式,雖然看不到 Source code,但是可以拿來當軟體價值的案例探討。

閱讀全文〈福斯汽車 價值 180億美元的作弊軟體〉

對 Mac OSX 使用 smoothing grayscale CSS 設定

看到網頁的字型特別細緻,就很想看看是什麼字型預設可以做成這樣子。

查到的只是個 -moz-osx-font-smoothing: grayscale; 的設定,看起來還沒列入標準,而且似乎只有 MacOSX 可以看到。

閱讀全文〈對 Mac OSX 使用 smoothing grayscale CSS 設定〉

Linux.Wifatch 立志當防毒軟體的病毒

賽門鐵克(Symantec) 發現一隻程式(病毒) - Linux.Wifatch,專門入侵感染 Router 或其它 IoT(Internet of Things devices) 之類的裝置,然後幫忙來移除其它的惡意程式。

閱讀全文〈Linux.Wifatch 立志當防毒軟體的病毒〉

PHP 使用 SHA256、SHA512 等 演算法的寫法

PHP 有 md5()sha1() ... 等等 function,不過現在建議使用 SHA224 以上(註),在 PHP 要怎麼寫呢?

註:下述摘錄自此篇:Mobilefish.com - MD5, SHA1, SHA224, SHA256, SHA384, SHA512 and RIPEMD160 hash generator

  • MD5 is considered cryptographically broken and is unsuitable for further use.
  • The SHA1 algorithm might not be secure enough for ongoing use. It is recommended not to use SHA1.
  • SHA224: SHA224 produces a 224-bit (28-byte) hash value, typically rendered as a hexadecimal number, 56 digits long.
  • SHA256: SHA256 produces a 256-bit (32-byte) hash value, typically rendered as a hexadecimal number, 64 digits long.
  • SHA384: SHA384 produces a 384-bit (48-byte) hash value, typically rendered as a hexadecimal number, 96 digits long.
  • SHA512: SHA512 produces a 512-bit (64-byte) hash value, typically rendered as a hexadecimal number, 128 digits long.
  • RIPEMD160: RIPEMD160 produces a 160-bit (20-byte) hash value, typically rendered as a hexadecimal number, 40 digits long.

閱讀全文〈PHP 使用 SHA256、SHA512 等 演算法的寫法〉

PHPMailer 使用 Gmail 寄信登入失敗的設定修復

想要使用 PHPMailer 來透過 GMail 的帳號寄信,近期都無法正常登入成功(「密碼不正確」錯誤),以至於信件無法正常發送,主要原因在於 Google 設定部分需要做點修改。

閱讀全文〈PHPMailer 使用 Gmail 寄信登入失敗的設定修復〉

Linux 使用 host、dig 測試 DNS 是否有資料

於 Linux 網路不通,總是要測試看看是網路不通、IP設錯 還是 DNS 有問題,於 DNS 方面可以使用 host 或 dig 來指定 DN Server,來確定 DN Server 是否有此筆資料的紀錄。

閱讀全文〈Linux 使用 host、dig 測試 DNS 是否有資料〉