This article explains how to utilize Tor project in our own PHP application using Curl Library.
Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.
We start by installing and configuring Tor and the necessary software then we create a simple application that fetch a website address anonymously.
Read more…
This are the required steps to setup Kannel as an SMS Gateway on Ubuntu. Here we use a simple GSM modem attached to USB port 0, using Enfora modem. You can use other standard AT command modems actually.
Enable the SMS Box
Edit file /etc/default/kannel , uncomment the START_SMSBOX line to enable the SMS Box
sudo vi /etc/default/kannel
START_WAPBOX=1
START_SMSBOX=1
Add kannel user to dialout group
This will enable kannel user (user who run kannel process as) to use the /dev/ttyUSB0 device that is necessary when we are using USB GMS modems.
Read more…
The command we need to use to list the packages currently installed in Ubuntu or Debian is dpkg –get-selections. For example:
# dpkg --get-selections
acpi install
acpi-support-base install
acpid install
adduser install
apache2 install
apache2-mpm-prefork install
apache2-utils install
apache2.2-common install
apt install
apt-utils install
aptitude install
autoconf install
automake install
automake1.4 install
autotools-dev install
avahi-daemon install
bacula-common install
bacula-fd install
base-files install
base-passwd install
bash install
bind9-host install
binutils install
…
It will return a long list showing all the installed packages. To filter to specific list of packages, for example we only need to show java packages, combine it with grep, for example:
# dpkg --get-selections|grep java
java-common install
java-gcj-compat install
java-gcj-compat-headless install
libbcel-java install
liblog4j1.2-java install
liblog4j1.2-java-gcj install
libmx4j-java install
libpg-java install
libregexp-java install
sun-java6-bin install
sun-java6-jdk install
sun-java6-jre install
We can find the locations of the files within a package from the list by using the dpkg -L command, such as:
# dpkg -L sun-java6-jdk|more
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/sun-java6-jdk
/usr/share/doc/sun-java6-jdk/changelog.Debian.gz
/usr/share/doc/sun-java6-jdk/copyright
/usr/share/doc/sun-java6-jdk/README.alternatives
/usr/share/doc/sun-java6-jdk/README.html
/usr/share/menu
/usr/share/menu/sun-java6-jdk
/usr/share/applications
/usr/share/applications/sun-java6-jconsole.desktop
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/sun-java6-jdk
/usr/share/doc-base
/usr/share/doc-base/sun-java6-jdk-readme
/usr/lib
/usr/lib/jvm
/usr/lib/jvm/java-6-sun-1.6.0.12
/usr/lib/jvm/java-6-sun-1.6.0.12/include
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux/jni_md.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux/jawt_md.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/jni.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/jdwpTransport.h
…
In BASH terminology, there are 3 file descriptors, stdin, stdout and stderr (std means standard).
Basically you can:
- redirect stdout to a file
- redirect stderr to a file
- redirect stdout to a stderr
- redirect stderr to a stdout
- redirect stderr and stdout to a file
- redirect stderr and stdout to stdout
- redirect stderr and stdout to stderr
Next, 1 represents stdout and 2 means stderr.
A little note for seeing this things: with the less command you can view both stdout (which will remain on the buffer) and the stderr that will be printed on the screen, but erased as you try to ‘browse’ the buffer.
Read more…
Feeling bored with your plain old desktop wallpaper? Then this list is worth to take a look. Listed here are the most beautiful Firefox-themed desktop wallpaper that you can download and set it as your desktop wallpaper. It will make your computer, in Indonesian term “Firefox banget!”.

Read more…
This simple PHP script can be used to backup MySQL databases and then send the zipped backup file to email addresses. The backup file can then be restored by any MySQL front end program like the mysql command line, Navicat MySQL, or phpMyAdmin.
The logic of the script is really simple:
- initialization
- create backup sql file
- zip the file
- send email
Read more…
Modul Perl yang diperlukan
Agar program Perl bisa connect ke Posgres diperlukan modul tambahan Perl sebagai berikut:
- DBI
- DBD::Pg
Instalasi Modul di Linux
Untuk sistem operasi Linux, installasi modul sangat mudah dilakukan, yaitu dengan menggunakan program RPM, Yum, dan sebagainya.
Read more…
Categories: Linux, Perl, PostgreSQL, Windows Tags: dbh, Linux, Perl, perl package manager, PostgreSQL, script perl, sistem operasi windows, Windows
Recent Comments