原创 關於C、C++中的const和指針

偶然的因素,對const來了點興趣,做了一下實驗: 1. 語法:const、指針        在gcc中, 對於C語言,下面的語句是合法的: const int a=0; int *p=&a;       而C++中,需要手工強制轉換

原创 Linux程序設計——用getopt處理命令行參數

轉自:http://hi.baidu.com/52hack/blog/item/398a98522c972e060df3e35f.html   Linux下很多程序甚至那些具有圖形用戶界面(graphical user interface

原创 linux netstat 命令常用選項詳解

轉自:http://hi.baidu.com/zhangdaoxie/blog/item/d9f49f4a991f412b08f7efff.html Netstat用於顯示與IP、TCP、UDP和ICMP協議相關的統計數據,一般用於檢驗本

原创 C語言的inline

轉自:http://superding.spaces.live.com/Blog/cns!89E842A8485366C7!1137.entry   轉以前我用Docbook寫的一篇關於C語言inline關鍵字使用的文章。唉,要是能用d

原创 兩個linux內核rootkit--之一:enyelkm

轉自:http://blog.csdn.net/dog250/archive/2010/02/09/5303687.aspx     首先,這個rootkit其實是一個內核木馬,和大多數木馬不同的是,惡意木馬所在的機器是客戶端而不是服務器

原创 修改shell的環境變量

修改shell環境變量的方法大致分爲兩種,一種是使用export命令,一種是修改配置文件。   1.export命令,該方式只對該次登陸shell有效,退出shell再次進入後修改的內容丟失:   例如將/home/xxxx/bin添加到

原创 硬盤安裝Fedora8

轉自:http://hi.baidu.com/%D4%C6%CB%AF%C1%CB/blog/item/dd477b09de0b83c93bc763d2.html   本測試爲硬盤安裝Fedora8,前提,你安裝了windos,並且用分區

原创 linux下開發遇到的問題集合

 記錄在linux下開發遇到的各種問題,方便以後查找。   1.關於shell中腳本的執行方式:在當前腳本執行還是啓動一個新的shell進程來執行腳本。 假設當前目錄下有腳本script.sh。 啓動一個新的shell進程來執行: 這是s

原创 Fedora8下安裝firefox3的兩種方法!

轉自:http://hi.baidu.com/%D4%C6%CB%AF%C1%CB/blog/item/1c70776350c886660d33fa09.html   Fedora 8下firefox的版本好像是2.0.0.8, yum

原创 /proc/self/status講解

轉自:http://hi.baidu.com/wylhistory/blog/item/8f51ff38243d6322b8998f0a.html     別人寫的: [root@localhost ~]# cat /proc/sel

原创 利用pcap編寫自己的sniffer程序

轉自:http://blog.csdn.net/dangdanding/archive/2004/05/17/22419.aspx   Programming with pcap Tim Carstens timcarst at ya

原创 關閉SELinux的方法

轉自:http://www.diybl.com/course/6_system/linux/Linuxjs/2008629/129166.html   關閉SELinux的方法:修改/etc/selinux/config文件中的SELIN

原创 linux的shell腳本編程

轉自:http://hi.baidu.com/%D4%C6%CB%AF%C1%CB/blog/item/bba1a03eb6fac0fc838b132b.html   在 Linux系統中,雖然有各種各樣的圖形化接口工具,但是sell仍然

原创 bash中常用快捷鍵

參考:http://www.linuxsir.org/bbs/showthread.php?threadid=20511   命令行的歷史記錄   通過按向上方向鍵,您可以向後遍歷近來在該控制檯下輸入的命令。用向下方向鍵可以向前遍歷。與

原创 struct--iphdr -- IP頭部

轉自:http://hi.baidu.com/zengzhaonong/blog/item/d897958276351393f603a6dd.html sk_buff ->iphdr /usr/src/linux-2.6.19/i