<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    搬磚頭

    Knocking on Heaven's Door
    posts - 34, comments - 6, trackbacks - 0, articles - 0

    2009年2月17日

    RedHat Linux操作系統修改時區的方法
    Most modern Linux distributions have user-friendly programs to set the timezone, often accesible through the program menus or right-clicking the clock in a desktop environment such as KDE or GNOME. Failing that it’s possible to manually change the system timezone in Linux in a few short steps.
    It’s possible to change the system timezone in Linux in a few short steps.
    Steps
    1. Logged in as root, check which timezone your machine is currently using by executing `date`. You’ll see something like “Mon 17 Jan 2005 12:15:08 PM PST -0.461203 seconds”, PST in this case is the current timezone.
    2. Change to the directory to /usr/share/zoneinfo, here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the “Americas” directory.
    3. If you wish, backup the previous timezone configuration by copying it to a different location. Such as `mv /etc/localtime /etc/localtime-old`.
    4. Create a symbolic link from the appropiate timezone to /etc/localtime. Example: `ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime`.
    5. If you have the utility rdate, update the current system time by executing `/usr/bin/rdate -s time.nist.gov`. (This step can be skip!)
    6. Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. “America/Los_Angeles”)
    7. Set the hardware clock by executing: ` /sbin/hwclock –systohc`
    Tips
    · On some versions of RedHat Linux, Slackware, Gentoo, SuSE, Debian, Ubuntu, and anything else that is “normal”, the command to display and change the time is ‘date’, not ‘clock’
    · On RedHat Linux there is a utility called “Setup” that allows one to select the timezone from a list, but you must have installed the ‘redhat-config-date’ package.
    Warnings
    · Some applications (such as PHP) have separate timezone settings from the system timezone.
    · On some systems, /etc/localtime is actually a symlink to the appropriate file under the /usr/share/zoneinfo directory (rather than a copy of that file).
    · On some systems, there is a system utility provided that will prompt for the correct timezone and make the proper changes to the system configuration. For example,Debianprovides the “tzsetup” utility.
    Here is an example of changing the timezone: (Logged in as root)
    In order to manually change the timezone, you can edit the /etc/sysconfig/clockfile and then make a new soft link to /etc/localtime. Here is an example of changing the timezone manually to “America/Denver”:
    1. Select the appropriate time zone from the /usr/share/zoneinfo directory. Time zone names are relative to that directory. In this case, we will select “America/Denver”
    2. Edit the /etc/sysconfig/clocktext file so that it looks like this:
    ZONE=”America/Denver”
    UTC=true
    ARC=false
    Of course, this assumes that your hardware clock is running UTC time…
    3. Delete the following file: /etc/localtime (backup it when you need it !)
    4. Create a new soft link for /etc/localtime. Here is an example of step 3 and step 4:
    # cd /etc
    # ls -al localtime
    lrwxrwxrwx 1 root root 39 Mar 28 07:00 localtime -> /usr/share/zoneinfo/America/Los_Angeles
    # rm /etc/localtime
    # ln -s /usr/share/zoneinfo/America/Denver /etc/localtime
    # ls -al localtime
    lrwxrwxrwx 1 root root 34 Mar 28 08:59 localtime -> /usr/share/zoneinfo/America/Denver
    # date
    Fri Mar 28 09:00:04 MST 2003


    針對中國時區,修改操作如下
    1.   修改文件 /etc/sysconfig/clock內容:
    ZONE=Asia/Shanghai
    UTC=false
    ARC=false
    2.     rm /etc/localtime
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    還有其他方法修改時區,不過是基于圖形化界面的命令: tzselect 、 timeconfig
    本文為鏡像,原貼在此:http://www.btk4ever.com/?p=10443

    posted @ 2009-04-28 09:35 生活在別處 閱讀(2162) | 評論 (0)編輯 收藏

    朋友搬到個新地方,沒有寬帶了,但是能收到些加密的無線網絡,挺想蹭網的,本人由于是所謂“挨踢”人士,自當義不容辭出手相助。

    我也只是想了解下WEP破解這事,目的也只是提醒大家一下要加強無線網絡安全,千萬不要干啥非法的事情,當然有本事的話,就把屁股擦干凈。

    其實前兩年我就知道WEP加密是極不安全的,而且也出于好奇做過密鑰破解的嘗試,但是由于破解軟件特別挑網卡,結果自然就是半途而廢了。這次到網上 再度查了點相關資料,發現這事情已然變得相當的簡單了,基本上只需要 BackTrack3 就可以搞定了。Backtrack 是一個黑客操作系統,其實也算是一個linux的黑客版,主要是安裝了很多實用的軟件和黑客工具,偏向于安全侵入方面的。

    我是下載了一個BackTrack3 的usb版本,并且下了最新的掃描工具spoonwep2,系統自帶的是spoonwep也能用,但是據說新版更好使,更方面。整個過程挺簡單的,機器設 置成usb可引導啟動,然后啟動進入usb上的BackTrack系統,都是圖形界面的,打開spoonwep2工具,掃描周圍的無線信號,選擇信號強 的,有客戶端連接,并且DATA包比較多的信號來破解吧,這樣應該可以快點,據說XX分鐘就能破解了。沒有客戶端連接的無線信號,據說有些AP也是同樣可 以破解的,無非是攻擊方式的變化以及花費的時間更長而已。

    我的經歷是,晚上10點多開始破一個無線信號,等了一個多小時,進度開始變緩慢,因為本來連著的兩個客戶端下線了,估計困搞去了…,很無奈,我也不 能傻等,只得也睡覺去了。第二天早上起來,1o點多的時候,才抓滿了要求的數據包,整個密鑰破解過程倒是瞬間完成,然后我看到的密碼是”1111111″ ,囧 rz,看來設無線密碼的人都很懶。這個過程還是挺漫長的,可能是沒選擇對正確的攻擊方式,導致數據包獲取的過程很長。假如有客戶端在BT下載,估計快很 多,要是只是qq聊天,那就要耗很久了。不過整個過程,已經相當的傻瓜化了。

    這事也不能說的太細,想了解詳細的人,網上查去吧,順便提供一個教程

    至于如何加強無線安全,有這么幾點(網上找的)

    如果你需要你的AP很難被破解,建議:
    1)用WPA 加密方式,并且使用不可能被字典猜到的密碼,目前還是基本可靠的
    2)如果只支持 WEP加密,那么,盡量考慮用隱藏 SSID的方式,這樣可以增加破解難度
    3)如果只支持 WEP加密,那么,可以考慮使用中文名字作為SSID,這樣基本問題不大。
    4)一般破解時候,大家都會選擇常用的頻道,例如 6頻道, 第三步顯示頻道的時候,你的AP也會被列出來,那么第一個目標失敗的時候,黑客往往會選擇第二個容易下手的目標, 但是如果你選擇了8、 4、這些奇怪的頻道,那么狠客往往懶得重新進入該頻道的監控模式,你就可以逃過一劫。不過, 某些廉價AP,往往對6 頻道做了優化,這個頻道信號最強….這就沒辦法了。
    5)有空換換你的密碼:)

    還有其他幾點也可以做,如減低信號、關閉DHCP、MAC地址綁定,當然這些措施也只是增加難度而已。

    最后提一下,蹭網是有風險的,無線信號不加密的,人家未必就是大善人或者菜鳥,而且還有人專門釣魚的,加大信號,設置簡單密碼,專門等蹭網的人來,數據包一抓,等著被玩吧。

    本文為鏡像,原貼在此:http://www.btk4ever.com/?p=10423

    posted @ 2009-04-28 09:33 生活在別處 閱讀(1190) | 評論 (0)編輯 收藏

    考慮把Live Space的日志轉移到Wordpress 架的blog去,郁悶的是Live Space并不支持通用的導出格式,要是一條條日志復制過去的話,這工作量也實在是夠嚇人的。只好到網上找解決辦法了,真搞不定的話,只能放棄Live Space的日志了。結果很不幸,被我找個一個Live Space Mover的工具,很華麗的搞定了動遷的工作。在此向作者Wei Wei致敬了,隨便介紹推廣一下。

    Live Space Mover 工具的說明在這里:http://b2.broom9.com/?page_id=519

    這個工具是通過Python腳本抓取live space的日志和留言,保存為wordpress支持的通用xml文件。最后將文件通過wordpress后臺管理提供的導入功能,將日志遷移過去。

    具體操作步驟就參照作者blog里的user guide,非常詳細的。

    大致過程是這樣:

    1.安裝Python的環境,并下載Beautiful Soup的類庫

    2.Google Code下載最近的Live Space Mover 工具(幾個python腳本)

    3.按照作者的要求,對space進行設置,主要是開放訪問權限和設置日期格式

    4.命令行方式執行腳本,開始日志抓取(腳本參數參照user guide)

    –如執行過程出現超時或者假死情況(我都碰到了…),關閉重新執行腳本即可,工具有cache文件,會從斷點開始繼續的

    5.將生成的xml文件導入wordprss

    工具目前還有一點瑕疵,下面這段話來自作者的blog,關于目前工具無法解決問題的說明,看來又是live space的怨念。

    After the live space updates in Dec 2008 (live space mover version 1.7), there are some limitations for comments, including:

    1. can’t get the accurate time of comments, sometimes even incorrect;

    2. can’t get the email and url of comment authors.

    These are both due to the ridiculous design of Live Space. If you have any idea about how to solve these 2 problems, please let me know.

    本文為鏡像,原貼在此:http://www.btk4ever.com/?p=10025

    posted @ 2009-02-17 17:00 生活在別處 閱讀(893) | 評論 (0)編輯 收藏

    已部署的一個JAVA程序最近需要改成定期執行,于是就放到crontab調度,結果遇到了中文亂碼問題。腳本在shell環境下直接運行沒有問 題。到網上收了一下,碰到這個問題的還真不少,結論是crontab執行時不會攜帶用戶的環境變量,缺失一些系統變量。需要在腳本里額外添加缺失的環境變 量,針對中文問題,需要聲明 LANG參數

    在腳本開頭增加:
    LANG=”zh_CN.GB18030″
    export LANG

    由于是中文問題,設置的編碼要和系統設置的一致,具體可以到/etc/sysconfig/i18n 查看對應的環境變量

    本文為鏡像:原帖在此:http://www.btk4ever.com/?p=10040

    posted @ 2009-02-17 16:55 生活在別處 閱讀(1417) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲AV无码一区二区三区在线观看 | 中文字幕不卡亚洲| 理论秋霞在线看免费| 日本不卡视频免费| 亚洲av成本人无码网站| 日韩视频在线免费| 蜜臀亚洲AV无码精品国产午夜.| 毛色毛片免费观看| 亚洲欧美日韩中文字幕一区二区三区 | 羞羞漫画页面免费入口欢迎你| 免费国产一级特黄久久| 免费人成大片在线观看播放电影| 免费吃奶摸下激烈视频| 国产成人无码精品久久久久免费| 亚洲欧洲国产精品香蕉网| 嫩草在线视频www免费观看| 亚洲精品在线免费观看| 成人免费视频一区| 亚洲AV无码一区二区三区性色 | 亚洲欧洲国产成人综合在线观看| 一区二区视频在线免费观看| 亚洲三区在线观看无套内射| 99精品免费观看| 亚洲中文字幕无码久久2020 | 亚洲av成本人无码网站| 亚洲熟女乱综合一区二区| 三上悠亚在线观看免费| 亚洲永久中文字幕在线| 成人免费无码大片A毛片抽搐色欲| 国产精品亚洲色婷婷99久久精品| 2048亚洲精品国产| 99爱在线精品免费观看| 国产成人va亚洲电影| 国产l精品国产亚洲区在线观看| 久久久久久国产精品免费无码| 亚洲国产熟亚洲女视频| 亚洲精品一级无码鲁丝片| 99久久99热精品免费观看国产| 亚洲av日韩av无码av| 亚洲一级片内射网站在线观看| 毛片无码免费无码播放|