Sabtu, 11 Februari 2012

How to Fix APC Installation Error on Ubuntu

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP.

Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

Installation of APC is quite simple.

This article shows you how to fix APC installation problem when it fails at make process as following:

In file included from /tmp/pear/temp/APC/apc.c:44:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included

Read more on How to Fix APC Installation Error on Ubuntu

Rabu, 01 Februari 2012

How to Create Google Page Rank Script Using PHP

Page rank is created by Google to rank website based on popularity. Now you can create your own page rank look up script using PHP. I get this script from phurix.net website and modify it to have security code.

First of all, we are going to create HTML form to capture URL and security code.

This is the index.php file contains the HTML form:

session_start();

/**
* PageRank Lookup (Based on Google Toolbar for Mozilla Firefox)
*
* @copyright 2011 HM2K

Read more How to Create Google Page Rank Script Using PHP

Kamis, 22 Desember 2011

How to Install Easy Hosting Control Panel (EHCP) on Ubuntu

EHCP is a free and open source web hosting control panel. This guide will show you how to install it on Ubuntu server.

Check /etc/apt/sources.list. It should have the following line (replace oneiric with your version).

deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted
deb-src http://archive.ubuntu.com/ubuntu/ oneiric main restricted
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
deb-src

Read more How to Install Easy Hosting Control Panel (EHCP) on Ubuntu

How to Fix MTP USB Driver Error

MTP device is used by Samsung Kies application to connect to Samsung mobile phone through PC using USB cable.

This is how to setup your Android phone to use Samsung Kies:

Go to Setting => Application => Development, and then make sure USB Debugging is unchecked.
Connect your phone to PC using USB cable.
Turn on Samsung Kies and it will try connecting to the phone.

But the problem came when I connect my phone to the PC. Windows unable to install driver for MTP device. I tried

Read more How to Fix MTP USB Driver Error

How to Hack WD My Book Live

WD My Book Live is network storage installed with Debian Linux operating system. We can setup this device to be our web server at home. Here are the steps how I did it:

1. Activate SSH
Open browser, and go to http://device_ip/UI/ssh and then enable SSH service.
2. Login to SSH
username: root
default password: welc0me
3. Backup the system and protect udev update
Backup system:
# dd if=/dev/sda bs=15728640 count=1 | bzip2 >

Read more How to Hack WD My Book Live

Selasa, 01 Maret 2011

Read / Write NTFS on Mac OSX

Open Disk Utility:
Applications => Utilities => Disk Utility

Right click partition, and click Information.
Take note the value on Universal Unique Identifier.

Open Terminal:
Applications => Utilities => Terminal

Edit /etc/fstab:
$ sudo nano /etc/fstab

Type in this line into /etc/fstab:
UUID= none ntfs rw

Save the file.
Reboot.

Jumat, 11 Februari 2011

Setup MRTG Squid on Ubuntu 10.10

Install MRTG, Apache2, Squid and SNMP
$ sudo apt-get install apache2 snmpd mrtg snmp-mibs-downloader squid

Configure SNMP

Backup /etc/snmp/snmpd.conf
$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

Create new /etc/snmp/snmpd.conf
$ sudo nano /etc/snmp/snmpd.conf

and key in these lines:
rocommunity  public
syslocation  "Bukit Batok"
syscontact  xxxxxx@yahoo.com
com2sec public localhost public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public "" any noauth exact all none none

Edit /etc/default/snmpd:
$ sudo nano /etc/default/snmpd

and make sure it contains these lines:
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
SNMPDCOMPAT=yes


Configure Squid

Edit /etc/squid/squid.conf
$ sudo nano /etc/squid/squid.conf

and make sure these lines exist:
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic all

Restart Squid:
$ sudo /usr/sbin/squid -k reconfigure


Configure MRTG

Create configuration file:
$ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg  --snmp-options=:::::1 public@localhost

Edit /etc/mrtg.cfg and make sure these lines exist:
### Global Config Options
WorkDir: /var/www/mrtg
RunAsDaemon: yes
EnableIPv6: no
Options[_]: bits
LoadMIBS: /usr/share/snmp/mibs/SQUID.txt
### Squid Config
Target[proxy-hit]: cacheHttpHits&cacheServerRequests:public@localhost:3401
# If you are using Squid 2.6 or later, uncomment the following line
RouterName[proxy-hit]: cacheUniqName
MaxBytes[proxy-hit]: 100000
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]: <H1>proxy Cache Statistics: HTTP Hits/Requests</H1>
 <TABLE>
   <TR><TD>System:</TD><TD>saniya</TD></TR>
   <TR><TD>Maintainer:</TD><TD>kumkum</TD></TR>
   <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
 </TABLE>
Suppress[proxy-hit]: y
LegendI[proxy-hit]:  HTTP hits
LegendO[proxy-hit]:  HTTP requests
Legend1[proxy-hit]:  HTTP hits
Legend2[proxy-hit]:  HTTP requests
YLegend[proxy-hit]: perminute
ShortLegend[proxy-hit]: req/min
Options[proxy-hit]: nopercent, perminute, dorelpercent, unknaszero

Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@localhost:3401
# If you are using Squid 2.6 or later, uncomment the following line
RouterName[proxy-srvkbinout]: cacheUniqName
MaxBytes[proxy-srvkbinout]: 76800
Title[proxy-srvkbinout]: Cache Server Traffic In/Out
PageTop[proxy-srvkbinout]: <H1>Cache Statistics: Server traffic volume (In/Out)</H1>
 <TABLE>
   <TR><TD>System:</TD><TD>saniya</TD></TR>
   <TR><TD>Maintainer:</TD><TD>kumkum</TD></TR>
   <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
 </TABLE>
Suppress[proxy-srvkbinout]: y
LegendI[proxy-srvkbinout]:  Traffic In
LegendO[proxy-srvkbinout]:  Traffic Out
Legend1[proxy-srvkbinout]:  Traffic In
Legend2[proxy-srvkbinout]:  Traffic Out
YLegend[proxy-srvkbinout]: per minute
ShortLegend[proxy-srvkbinout]: b/min
kMG[proxy-srvkbinout]: k,M,G,T
kilo[proxy-srvkbinout]: 1024
Options[proxy-srvkbinout]: nopercent, perminute, unknaszero

Create MRTG index file:
$ sudo indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

Execute MRTG:
$ env LANG=C /usr/bin/mrtg /etc/mrtg.cfg

MRTG will default graph the data every 5 minutes.
To change this interval into 10 minutes, add this line into mrtg.cfg:
Interval : 10

To view MRTG graphs, go to http://localhost/mrtg/

Rabu, 09 Februari 2011

Notes: Setup Ubuntu Web Hosting

This is my little note on web hosting setup.

- Install Ubuntu Server 10.10
- Setup static private IP address
- Install ehcp hosting control panel: ehcp.net
- Configure ehcp: add domain, add ftp user, modify ehcp dns template, modify external IP
- Upload website source code
- Import website database
- Install smbfs: apt-get install smbfs
- Create samba script
- Check .htaccess
- Check dl.php to follow .htaccess path
- Change file upload setting in php.ini:  upload_max_filesize = 200M
- Change file upload setting in php.ini:  post_max_size = 200M

- Setup cronjob

Samba Shell Script

Below is shell script to load Windows' folder share using Ubuntu 10.10:
--
#!/bin/bash
umount /var/www/vhosts/saniya/id-ebook.com/httpdocs/gudang
umount /var/www/vhosts/saniya/id-ebook.com/httpdocs/gudang2
mount.cifs \\\\ubuntu-pc\\z\\gudang /var/www/vhosts/saniya/id-ebook.com/httpdocs/gudang -o uid=www-data,gid=0,user=ubuntu,pass=xxx,rw
mount.cifs \\\\ubuntu-pc\\z\\gudang2 /var/www/vhosts/saniya/id-ebook.com/httpdocs/gudang2 -o uid=www-data,gid=0,user=ubuntu,pass=xxx,rw

Jumat, 21 Januari 2011

Teknik Menjebol Password Hotspot WEP

Hardware yg digunakan
- USB Wi-Fi adapter merk Linksys

Software yg digunakan
- Ubuntu 10.10
- Aircrack-ng
- Terminal / Konsole

TUTORIAL

Install aircrack-ng:

$ sudo apt-get install aircrack-ng

Pastikan USB Wi-Fi sudah tertancap di komputer.
Periksa interface wifi:

$ ifconfig

Misalnya nama interface adalah wlan0.
Non-aktifkan interface wifi wlan0:

$ airmon-ng stop wlan0
$ ifconfig wlan0 down
$ macchanger --mac 00:11:22:33:44:55 wlan0

Perintah macchanger ini optional, digunakan utk mengubah mac address adapter wifi (spoofing). Jika tidak ingin mengganti mac address, gunakan mac address asli adapter wifi.
Mac address wlan0 bisa dilihat dengan menjalankan perintah 'ifconfig'.

Setelah kita mengetahui mac address di atas, jalankan perintah utk mengubah status wifi menjadi monitor mode:

$ airmon-ng start wlan0

Kemudian akan muncul keluaran seperti berikut ini:

Interface Chipset Driver
wlan0 Intel 4965 a/b/g/n iwl4965 - [phy0]
(monitor mode enabled on mon0)

Untuk selanjutnya akan dipakai mon0 sebagai interface menggantikan wlan0.
Jalankan perintah berikut utk menampilkan daftar akses poin terdekat:

$ airodump-ng mon0














Yang perlu diperhatikan adalah kolom berikut,

BSSID = mac address akses poin target
PWR = kekuatan sinyal, semakin kecil nilainya semakin dekat jarak akses poin (sinyal kuat)
#Data = banyaknya lalu lintas data yg sedang terjadi
CH = channel yg digunakan
ENC = jenis enskripsi akses poin. pilih yg menggunakan WEP.
ESSID = nama akses poin
STATION = mac address komputer yg sedang terhubung

Selanjutnya kita akan memonitor lalu lintas data di salah satu akses poin.
Misalnya kita target akses poin "yoyo".
Buka aplikasi terminal / konsole, dan jalankan perintah monitor berikut:

$ airodump-ng -c 3 -w hasilmonitor --bssid 99:88:77:66:55:44 mon0







Parameter "-c 3" menunjukkan bahwa akses poin 99:88:77:66:55:44 menggunakan channel 3.
Parameter "-w hasilmonitor" menunjukkan nama file hasil rekaman data.

Biarkan terminal monitor ini berjalan.
Kita buka satu lagi terminal baru, untuk melakukan fake authenticate bssid.

$ aireplay-ng -1 0 -a 99:88:77:66:55:44 -h 00:11:22:33:44:55 -e yoyo mon0

Pastikan hasilnya berupa pesan Association successful.
Jika tidak sukses, ganti target akses poin yg lain.

Kemudian jalankan perintah berikut utk melakukan arp inject.

$ aireplay-ng -3 -b 99:88:77:66:55:44 -h 00:11:22:33:44:55 mon0

Arp inject ini bertujuan utk mempercepat lalu lintas data yg terjadi pada akses poin target, sehingga kita dapat mengumpulkan cukup banyak data yg akan kita crack nantinya.
Arp inject ini membuat paket baca/tulis yg sangat cepat yg memungkinkan komputer lain yg sedang terhubung ke akses poin tersebut tidak bisa melakukan akses internet (diskonek).
Jika arp inject ini dilakukan dengan frekuensi yg sering, bisa saja membuat pemilik akses poin curiga bahwa ada oknum yg sedang melakukan penyerangan.

Ada cara lain yg lebih sadis yaitu dengan cara deauth attack. Dengan menggunakan deauth attack, kita memaksa komputer yg sedang terhubung ke akses poin utk putus / diskonek. Dan jika suatu komputer terputus dari akses poin, maka komputer tersebut otomatis akan berusaha tersambung kembali dengan akses poinnya. Kegiatan putus-sambung yg berulang kali ini akan membuat lalu lintas data menjadi bertambah, yg bisa kita rekam di aplikasi monitor kita sebelumnya. Perintahnya:

$ aireplay-ng --deauth 0 -a aa:bb:cc:dd:ee:ff mon0

Mac address aa:bb:cc:dd:ee:ff adalah milik komputer client yg sedang terhubung ke akses poin. Mac address komputer client ini terlihat pada terminal saat kita menampilkan daftar akses poin, yaitu pada kolom STATION.

Data (dinamakan data IV = Initialization Vector) yg diperlukan utk melakukan crack keamanan WEP minimal berjumlah 10.000. Jika kolom #Data yg terlihat di terminal monitor sudah mencapai sekitar angka 10.000 (semakin banyak semakin akurat), kita sudah bisa hentikan proses monitoring data.

Kemudian kita lakukan crack file hasil monitor data tersebut.

$ aircrack-ng -b 99:88:77:66:55:44 hasilmonitor.cap

Kemudian akan muncul keluaran: KEY FOUND [ 5F:81:BD:13:1F ]

Kita gunakan hasil tersebut sebagai password WEP dengan menghilangkan tanda titik dua, sehingga menjadi: 5F81BD131F.







Kamis, 20 Januari 2011

Pad Number with Leading Zero in Javascript

The following function will pad number with leading zero(es).

function pad(number, length) {
   var str = '' + number;
   while (str.length < length) {
   str = '0' + str;
   }
   return str;
} 
 
Some code to test the function:

document.write(pad(1, 1) + '');
document.write(pad(1, 2) + '');
document.write(pad(15, 2) + '');
document.write(pad(1, 3) + '');
document.write(pad(15, 3) + '');
document.write(pad(155, 3) + '');
document.write(pad(1, 4) + '');
document.write(pad(1, 5) + ''); 
 
And the result output:

1
01
15
001
015
155
0001
00001

http://www.electrictoolbox.com/pad-number-zeroes-javascript/

Jumat, 14 Januari 2011

Login Multiple Yahoo Messenger



There's a registry hack to enable multiple login for Yahoo Messenger.

1. Start => Run => regedit
2. Go to HKEY_CURRENT_USER => Software => Yahoo => Pager => Test
3. On the right window, right click => New => DWORD => type in Plural
4. Type in decimal value: 1
5. Close registry and run multiple Yahoo Messenger login.


Minggu, 10 Oktober 2010

Activate VirtualBox USB on Kubuntu 8.10

1. Search for virtualbox group id, make sure you already put your username under vboxusers group:
$ cat /etc/group
..
vboxusers:x:122:kumkum
..

2. Add this line to /etc/fstab:
none /proc/bus/usb usbfs devgid=122,devmode=664 0 0

3. Reboot system. Finish. Try plug your usb device to VirtualBox.

Note:
- devgid=122 is vboxusers group id which is taken from /etc/group
- USB is not supported in VirtualBox-Open Source Edition

Install Froyo (Android 2.2) on Samsung Galaxy S (SGS I9000)

Below is step by step tutorial on how to install Froyo on Samsung Galaxy S.
I assume you’re running Éclair (Android 2.1) on SGS.

Requirements:
1.    Froyo firmwares (download from http://www.samfirmware.com/WEBPROTECT-i9000.htm)
  • I9000XXJPC
  • I9000XXJPH
2.    I9000 kernel root files (download from http://pandawa-digital.co.id/download/I9000_KERNEL_ROOT.zip)
3.    Odin software (included in kernel root files)
4.    USB Driver for SGS (search from google: samsung galaxy s usb driver)
5.    Windows XP operating system

Upgrade to Froyo firmware:
1.    Install USB Driver for SGS.
2.    Extract I9000_KERNEL_ROOT.zip. You will find Odin executable in this file.
3.    Extract I9000XXJPC firmware file to any folder in your PC. It has 3 main files:
  • CODE_xxxx.tar
  • MODEM_xxxx.tar
  • CSC_xxxx.tar 
4.    Run Odin.
5.    Power off your SGS and go to Download Mode.
  • Press Volume Down + Home + Power
6.    Connect SGS to PC using USB cable. At this moment, Odin will show message: Added!! and there’s a yellow color on ID:COM.
7.    Still in Odin:
  • check Re-Partition and Auto Reboot options
  • click PIT button and put s1_odin_20100803.pit file which is extracted from I9000_KERNEL_ROOT.zip.
  • click PDA button, and put CODE_xxxx.tar
  • click PHONE button, and put MODEM_xxxx.tar
  • click CSC button, and put CSC_xxxx.tar 
  • click Start button and wait until Odin finish flashing the firmware.
8.    Your SGS will reboot into Froyo now.
9.    Disconnect USB cable.
10.    Extract I9000XXJPH into any folder in your PC. The three component (CSC, MODEM, and CODE) is compressed in one file: ADD_P_U.tar
11.    Run Odin (if you have closed it).
12.    Power off your SGS and go to Download Mode.
  • Press Volume Down + Home + Power
13.    Connect SGS to PC using USB cable.
14.    In Odin:
  • un-check Re-Partition (Auto Reboot is remain checked).
  • click PDA button, and put ADD_P_U.tar file
  • make sure PIT, CSC, and PHONE field are empty
  • click Start button and wait until Odin finish the job.
15.    Your SGS will reboot.
16.    Froyo is now installed on your device.
17.    Disconnect USB cable.

Rooting your device:
18.    Now we will root your device to allow Super User. We will need I9000_KERNEL_ROOT.zip extracted files:
  • update.zip
  • i9000_Kernel.tar
  • I9000XXJPH_KERNEL.tar
19.    Mount USB on SGS, and copy update.zip into sdcard root directory.
20.    Run Odin (if you have closed it).
21.    Power off your SGS and go to Download Mode.
  • Press Volume Down + Home + Power
22.    Connect SGS to PC using USB cable.
23.    In Odin:
  • unchecked Auto Reboot option (Re-Partition option must also be unchecked)
  • click PDA button, and put i9000_Kernel.tar
  • click Start button
24.    Pull the battery on SGS, and put in again (to power off from Download Mode).
25.    Reboot into Recovery Mode:
  • Press Volume Up + Home + Power
26.    Select apply update.zip using Volume button, and press Home button to confirm.
27.    Your SGS will reboot. Quickly pull the battery, and put in again.
28.    Reboot into Download Mode.
  • Press Volume Down + Home + Power
29.    Run Odin with Auto Reboot option checked.
30.    Connect SGS to PC using USB cable.
31.    In Odin:
  • click PDA button, and put I9000XXJPH_KERNEL.tar
  • click Start button
32.    Your SGS now will reboot
33.    At this stage, your device is rooted already.

Apply lag fix:
34.    Open Market application
35.    Search: one click lag fix
36.    Download and run RyanZA’s OCLF 2.0

Selasa, 05 Oktober 2010

Rapidshare Download Manager for Linux



Tucan is a graphical manager to upload and download from the most famous file hosting sites (e.g. rapidshare, megaupload).

You can use this application to replace Rapidshare Manager (windows version).

The application name itself, 'Tucan', has similar pronounciation to Bahasa Indonesia expression: "tuh kan... apa gua bilang!"


Download it from http://www.getdeb.net/software/Tucan


Coldfusion 7 (32bit) on Windows 64 bit

To enable IIS 6.0 to run 32-bit applications on 64-bit Windows

1.

Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.

2.

Type the following command:

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true

3.

Press ENTER.

Jumat, 27 Agustus 2010

Multiply : Multiple your blog


 

Buat para pecandu blog, terutama yang memiliki account blog dimana2 :D terdapat layanan cross post dari multiply ke layanan jejaring sosial lainnya sepert :
1. Facebook
2. Twitter
3. Yahoo!
4. Blogger

Seperti terlihat pada gambar disamping,
Posting yang saya buat ini (saya harap) akan muncul di layanan
jejaring sosial facebook, twitter, yahoo, dan blogger.



Sumber : http://www.multiply.com/