troubleshoot

Global Search and Replace with Perl

There are a couple of switches that make Perl a very useful command-line

editing tool. Learn these switches, and you too can learn how to mumble magic

Perl one-liners to confound your friends (and frighten your project manager).

how to DRM decryption

DRM (Digital Rights Management) คือการเอาไฟล์ WMV WMA (ของ Microsoft อ่ะ) มาทำการเข้ารหัสไฟล์
เพื่อให้ไม่สามารถดูได้ การเปิดดูนั้นต้องใช้ License ในการเปิดดู
ใน License จะมี KID และ SID เป็นคีย์ที่ใช้ในการถอดรหัสข้อมูลออกมา
ซึ่งทางผู้ให้บริการจะเป็นคนให้ License กับเราทุกครั้งที่เปิด ซึ่งก็ขึ้นอยู่กับทางผู้ให้บริการนั้นว่าจะให้ทำอะไรกับไฟล์เค้าได้บ้าง เช่น

SSH Brute Force .Protect by Iptables

For some of public server that open ssh service you will got some annoy log on (/var/log/secure) that attack from ssh brute force 

 


Jun 23 07:22:39 campus sshd[60775]: Failed password for root from 212.160.184.82 port 38212 ssh2
Jun 23 07:22:42 campus sshd[60777]: Failed password for root from 212.160.184.82 port 38626 ssh2
Jun 23 07:22:46 campus sshd[60779]: Failed password for root from 212.160.184.82 port 39056 ssh2
Jun 23 07:22:50 campus sshd[60781]: Failed password for root from 212.160.184.82 port 39348 ssh2
Jun 23 07:22:54 campus sshd[60783]: Failed password for root from 212.160.184.82 port 39621 ssh2
Jun 23 07:22:58 campus sshd[60785]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:01 campus sshd[60787]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:05 campus sshd[60789]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:09 campus sshd[60791]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:13 campus sshd[60793]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:16 campus sshd[60795]: Illegal user johnny from 212.160.184.82

MSN Errorcode

สาเหตุที่เกิด โดยดูจาก Errorcode
ErrorCode : *beep*
- สาเหตุ: เกิดจาก MSN หาไฟล์พวก .dll บางตัวไม่เจอ ทำให้ไม่สามารถ sign in ได้
- วิธีแก้: แก้ตามวิธีแก้ที่ 3 คับ

ErrorCode : 81000362
- สาเหตุ: เกิดจากที่ตัว IE เปิด Work OffLine ไว้คับ
- วิธีแก้: แก้ตามวิธีแก้ที่ 11 คับ

ErrorCode : 80048820

จำกัด CPU usage (Windows) ด้วยโปรแกรม ThreadMaster

เคยบ้างไหม ที่เครื่องเรา process โปรแกรมหนึ่ง จนไม่เหลือให้โปรแกรมอื่น ซ้ำร้ายบางทียังถึงขนาดแฮ้งไปเลย

คงไม่ดีแน่ ถ้าหาก server ของเราทำงานจนไม่มี process เหลือให้ service อื่นๆบ้าง หรือร้ายกว่านั้น อาจ down ไปเลยก็เป็นได้

เมื่อคุณลืม password ของ root บน FreeBSD 5.4 หรือสูงกว่า

เราสามารถแก้ไขปัญหาได้โดยวิธีการดังนี้ครับ
1. เมื่อ Boot เครื่องปรากฏหน้าจอภาพมีเมนูให้เลือก 1. 2. 3 ให้เราเลือก หมายเลข 4. ครับเพื่อเข้าสู่ Single User mode ครับ

2. ปรากฏเครื่องหมาย #
3. ให้ใช้คำสั่ง mount -u และ mount -a
4. ใช้คำสัง passwd แล้วใส่รหัสผ่านใหม่ของ root ครับ สองครั้งให้เหมือนกันครับผม

Mass Queue Drop on Qmail

วันนี้ เจอปัญหามีเมล์ไรก็ไม่รู้อยู่ในระบบเต็มไปหมด ไม่รู้จะล้างทิ้งไง เลยลองหา สาคิปมา ลบล้าง Queue ของ Qmail ไปเจอ มาจาไหนไม่รู้เลย เอามา ทิ้งไว้ในนี้

root@mail:/etc/rc.d# more remove_queue_more_than_6hours
#!/bin/bash
find /var/qmail/queue/mess -type f -mmin +360 -exec rm {} \\;
find /var/qmail/queue/info -type f -mmin +360 -exec rm {} \\;

Cluster

พากันนิ่ง

วันนี้ได้มีโอกาศไปประชุมกับลูกค้ารายสำคัญ ที่เราให้ความสำคัญสูงมาก มาเมื่อช่วงเช้าประเด็นมีอยู่ว่า จำทำไงให้ฐานข้อมูลนิ่งที่สุดหนออออ ลืมบอกไป เขาใช้ mysql เนอะ เป็นฐานข้อมูลหลัก อยู่บนเครื่องแรงๆ ครืงนึ่ง

ผี ip หลอก

ประสบการณจริง เจอมากับตัวเลย ผีหลอกไปหมด

วันก่อน จะต้องทำการโยกย้าย ip จากเครื่องเก่าไปยังเครื่องใหม่ ก็ถือโอกาสจัดการโดยการ ตั้งเครื่องใหม่แล้ว เอา ip อื่นใส่เข้าไปให้ remote ได้ แต่ ip เจ้ากรรมที่นี่ดันเป็น superclass แปลกดีเนอะเขาให้มา กันอย่างนี้ 255.255.254.0 ไหมไม่ให้ class c ไปเลย ง่ายกว่า เฮ้อ

- 10MB or 100MB Uplink? -

10MB or 100MB Uplink?

Very occasionally my websites are inaccessible for several seconds, then back to normal, soon inaccessible again. The uptime is very good and unlikely to be a performance problem, the only reason I can think of is network congestion. Currently I'm using 10 MB uplink, and I have been wondering if 100 MB uplink is only for heavy servers, or most servers can benefit from it as well.
I monitored the bandwidth usage for two days with netstat command, but still not sure about it. I plan to upgrade if I see the problem again.

# netstat -b -w 60 > /var/log/netstat.log &

Syndicate content