Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

分類: 未分類

隱藏 HTTP Server 資訊

Posted on 2013 年 6 月 15 日2022 年 7 月 16 日 By 日落 在〈隱藏 HTTP Server 資訊〉中尚無留言
隱藏 HTTP Server 資訊

Apache 和 Nginx 預設頁尾都會加上伺服器資訊,像是:

有些環境或許很忌諱出輸出這類的資料,可以修改設定將他隱藏起來。

Apache conf 中調整 ServerTokens 參數,將頁尾伺服器資訊作不同的調整。設定檔路徑可能會不一樣,可以 grep ServerTokens,以下是 Ubuntu 的路徑。

/etc/apache/conf.d/security:

#ServerTokens OS
ServerTokens Prod

Nginx conf 裡面則是用 server_tokens 參數,將其設定為 off 則不會輸出伺服器版本號。

server {
   server_tokens off;

   ...
}
Tags:Apache, Nginx, Web

lbzip2 – parallel bzip2

Posted on 2013 年 6 月 9 日2021 年 3 月 12 日 By 日落 在〈lbzip2 – parallel bzip2〉中有 3 則留言

平時 bzip2 只會用到 CPU 單核做壓縮或解壓縮,檔案大一點或是在備份資料,這樣實在很沒效率。lbzip2 改良這樣缺點,用 multi-thread 來增加效率。

安裝:

aptitude install lbzip2

lbzip2 操作方式和 bzip2 相同。壓縮檔案:

lbzip2 -z backup.sql

不同的是,壓縮時就可以從 top 看到 lbzip2 把運算資源用光。

lbzip2 不支援多個檔案或是目錄,但可以繞路,用 tar 接到 lbzip2:

tar -I lbzip2 -cvf backup.tbz backup/
Tags:Linux

Github 尋寶

Posted on 2013 年 6 月 3 日2021 年 3 月 12 日 By 日落 在〈Github 尋寶〉中尚無留言

在 gslin 那邊看到可以用 Github 找到有 SQL injection 的程式碼:
https://github.com/search?p=3&q=extension%3Aphp+mysql_query+%24_GET&ref=searchresults&type=Code

之前還有看過更開心的。

找到 RSA public key:
https://github.com/search?q=begin+rsa+public+key&type=Code&ref=searchresults

找 id_rsa:
https://github.com/search?q=%40user-name-here+path%3A.ssh%2Fid_rsa&type=Code&ref=searchresults

Tags:GihHub

蠢事一樁

Posted on 2013 年 5 月 26 日2021 年 3 月 12 日 By 日落 在〈蠢事一樁〉中尚無留言
蠢事一樁

前幾天買了 USB 3.0 的硬碟外接盒,想說來看看到底快了多少,開 HD Tune 一跑 ….

阿哩咧,7 GB/s 是 USB 6.0 的速度吧?

看了一下磁碟容量:1 GB,我選錯磁碟機了 XD

Tags:生活雜記

SVN Color Diff

Posted on 2013 年 5 月 23 日2021 年 3 月 12 日 By 日落 在〈SVN Color Diff〉中尚無留言

Use colordiff instead of diff:

$ echo "diff-cmd = colordiff" >> ~/.subversion/config

reference:
https://gist.github.com/westonruter/846524

Tags:分享, 資訊學習

文章分頁

上一頁 1 ... 119 120 121 ... 318 下一頁

其他

關於我  (About me)

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.