วันจันทร์ที่ 18 สิงหาคม พ.ศ. 2557

วันพฤหัสบดีที่ 3 กรกฎาคม พ.ศ. 2557

Turn off bluetooth by default in ubuntu 14.04

วิธีการปิด bluetooth ไม่ให้ทำงานตั้งแต่ Ubuntu เปิดเครื่องทำดังนี้
sudo apt-get install gksu
gksudo gedit /etc/rc.local
rfkill block bluetooth บันทึกแฟ้ม เสร็จสิ้น

วันอาทิตย์ที่ 29 มิถุนายน พ.ศ. 2557

Install Python 3.4.0 on Ubuntu 14.04

Install Python 3.4.0 on Ubuntu 14.04
----------------------------------------------------------------------------
sudo apt-get install python-software-propertie
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.3
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.4 /usr/bin/python
python --version

วันอังคารที่ 24 มิถุนายน พ.ศ. 2557

วันจันทร์ที่ 20 มกราคม พ.ศ. 2557

Wamp แบ็กอัพ Mysql

Wamp แบ็กอัพ MySQL
ทดสอบแล้วใช้ได้ แต่ใช้จริงต้องปรับตำแหน่งเรียก mysqldump
C:\wamp\bin\mysql\mysql5.5.24\bin\mysqldump
เป็นตำแหน่งที่ถูกต้องของแต่ละเซิร์ฟเวอร์
@echo off
echo Running dump...
set MYDATABASE=xxxxxxx
set MYSQLUSER=root
set MYSQLPASS=xxxxxxx
set BACKUPFILE="F:\Backup\MySQL\%MYDATABASE%_%date:~10,4%-%date:~4,2%-%date:~7,2%_TIME.%time:~0,2%.%time:~3,2%.sql"
C:\wamp\bin\mysql\mysql5.5.24\bin\mysqldump -u%MYSQLUSER% -p%MYSQLPASS% --result-file=%BACKUPFILE% %MYDATABASE%
echo Done! %BACKUPFILE%
ทดสอบฐานข้อมูล 1GB ใช้เวลา 1 นาที
ส่วนผลข้างเคียงยังไม่ทราบ
แต่ที่แน่ๆ เขาบอกว่าดีกว่า Batch file ตัวเดิมที่ผมใช้อยู่
(แบบเดิมคัดลอกไดเรกทอรี่ฐานข้อมูลทั้งดุ้น)

Credit: https://www.facebook.com/sunzandesign

วันอังคารที่ 14 มกราคม พ.ศ. 2557

เอกสารอบรม Web Hacking and Security Workshop


เอกสารที่เกี่ยวกับหัวข้ออบรม Workshop
http://sysadmin.psu.ac.th/2014/01/10/web-hacking-and-security-workshop/

เอกสาร Presentation
https://docs.google.com/presentation/d/1zCgSh90FpLPBll0Zqbd9sNkQ9gSyjAjkrz-Bms50DTc/pub?start=false&loop=false&delayms=3000&slide=id.p

เว็บไซต์ตรวจสอบ Software Appl ช่องโหว่ต่างๆ
http://www.cvedetails.com

Developer Joomla
http://developer.joomla.org/security.html

วันพุธที่ 1 มกราคม พ.ศ. 2557

CentOS 6 - การติดตั้ง MyBB Board

Install MyBB on CentOS 5.5

      # yum install php-xml

- Download myBB, unzip it (I renamed the folder to ‘forum’), and upload it into the /var/www/html/forum directory.
     
      # cd /var/www/html/forum/inc
 # cp config.default.php config.php
 # chmod 666 config.php
 # chmod 666 settings.php

 # cd /var/www/html/forum
      # chmod 777 cache
 # chmod 777 cache/themes
 # chmod 777 uploads
 # chmod 777 uploads/avatars
 # chmod 777 languages
 # chmod 777 admin/backups

- Now set up MySQL:
      # mysql -u -root -p
         CREATE DATABASE myBB_db;

         CREATE USER 'myBB_user'@'localhost' IDENTIFIED BY 'asecurepassword';

         GRANT ALL PRIVILEGES ON myBB_db.* to 'myBB_user'@'localhost';

         FLUSH PRIVILEGES;

         EXIT;

Setup myBB. In my case, I typed in 192.168.1.25/forum/install/ and followed the instructions.

Remove the install/ folder after installation is complete.

CentOS 6 - วิธีการปิด SELinux ไม่ให้ทำงาน

วิธีการปิดการทำงานของ SELINUX ทำดังนี้
- คำสั่งตรวจสอบรุ่นของ CentOS ที่ใช้งาน
     # cat /etc/redhat-release

- คำสั่งตรวจสอบว่า SELinux เปิดใช้งานอยู่หรือไม่
     # sestatus
     หากปรากฎข้อความ SELinux status: enabled แสดงว่าทำงานอยู่

- วิธีการปิด SELinux ไม่ให้ทำงานให้แก้ไขแฟ้มดังนี้
     # vi /etc/selinux/config
     แก้ไขข้อความเป็นดังนี้  SELINUX=disabled
     # init 6

- ใช้คำสั่งตรวจสอบว่าปิด SELinux เรียบร้อยหรือไม่ดังนี้
     # sestatus