25 มี.ค. 2558

แก้ไขลำดับการบูทของ grub

ให้แก้ไขแฟ้ม /etc/default/grub
แก้ไขบรรทัดนี้โดยให้เลข 0 เป็นลำดับของ os ที่จะ boot เป็นอันแรก
GRUB_DEFAULT=0  

การแก้ไขชื่ออันดับหรือจะลบบางอันทิ้งให้ไปแก้ไขไฟล์
/boot/grub/grub.cfg

How to Install Open Office in Kali Linux

#nano /etc/apt/sources.list

just add the following repositories in this file:

deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main contrib non-free
deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main/debian-installer
deb http://http.kali.org/kali kali main contrib non-free
deb-src http://http.kali.org/kali kali main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free


#apt-get update
#apt-get install openoffice.org  

24 มี.ค. 2558

How to Create a Wireless Ad Hoc in Windows 8

Step 1:Open the Command Prompt (CMD)
Step 2:Type in the following command to ensure that your network interface supports Hosted Network feature:
netsh wlan show drivers
If Hosted network supported shows “Yes”, that’s great.
If it says “No”, you can try to update your wireless driver. If the updated driver still does not help, then you need to upgrade your hardware.

12 มี.ค. 2558

บล็อก baidu ด้วย iptables

1.เพิ่มคำสั่ง บล็อกด้วย string ลงใน chain magle
#iptables -t mangle -A PREROUTING -p tcp --dport 80 -m string --string 'baidu' --algo bm -j DROP

2.DROP จาก Domain โดยใช้ dig
#iptables -t mangle -A PREROUTING -d $(dig @8.8.8.8 upf.bav.baidu.com +short) -j DROP

3.มองดูผลงาน
#iptables -t mangle -nvxL | grep DROP

11 มี.ค. 2558

เปลี่ยน time stamp ใน access.log ของ squid3 โดยใช้ logformat

เพิ่ม

logformat common %{%Y-%m-%d %H:%M:%S}tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
cache_access_log  /var/log/squid/access.log common


แทนที่

cache_access_log  /var/log/squid3/access.log

ลงในไฟล์ /etc/squid3/squid.conf

เสร็จแล้วทำการ reload config ของ squid3 ใหม่ ด้วยคำสั่ง

/etc/init.d/squid3 restart