<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=26320619&amp;blogName=d.ts%2Fash&amp;publishMode=PUBLISH_MODE_BLOGSPOT&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fbulastog.blogspot.com%2Fsearch&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fbulastog.blogspot.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>

d.ts/ash

sudo echo "Linux Shortcut Techniques For Dummies" >/dev/null


delete all MAILER-DAEMON emails in POSTFIX

3.27.2008
22E2B1989E8 25708 Thu Mar 27 19:15:00 MAILER-DAEMON
48FB319C8D2* 23163 Thu Mar 27 19:18:14 MAILER-DAEMON

root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | postsuper -d -
postsuper: warning: valid_hostname: invalid character 42(decimal): 48FB319C8D2*
postsuper: warning: invalid mail queue id: 48FB319C8D2*

### to delete all mailer-daemon including those mailq with * ,
root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | tr -d '*' | postsuper -d -
postsuper: 22E2B1989E8: removed
postsuper: 48FB319C8D2: removed

that's simple :) ampz

IRC Hacks: setup IRC proxy with multiserver support

Here's an example of setting-up an IRC proxy

FROM IRC PROXY SERVER (192.168.3.133)
1. Install ctrlrproxy
redhat: yum install ctrlrproxy
debian: apt-get install ctrlproxy

2. configure (IRC server, listen port, channelname)
ampz@bulastog:~# vi .ctrlrproxyrc (dont just copy and paste the code below. edit and change the [ ] to < > )

[?xml version="1.0"?]
[ctrlproxy]
[plugins]
[plugin autoload="1" file="libsocket"/]
[plugin autoload="1" file="librepl_memory"/]
[plugin autoload="1" file="libadmin"/]
[plugin autoload="1" file="liblog_irssi"/]
[plugin autoload="1" file="libctcp"/]
[plugin autoload="1" file="libstrip"/]
[plugin autoload="1" file="libnickserv"/]
[plugin autoload="1" file="libantiflood"/]
[plugin autoload="1" file="libauto-away"/]
[/plugins]


[networks]
[network autoconnect="1" name="phazenet" nick="bulastog" username="bulastog" fullname="bulastog in irc.phazenet.com"]
[listen]
[ipv4 port="1234"/]
[/listen]

[servers]
[ipv4 host="irc.phazenet.com"/]
[/servers]

[channel name="#streetkorner" autojoin="1"/]
[channel name="#cable-pinoy-mp3" autojoin="1"/]
[/network]

[network autoconnect="1" name="dalnet" nick="bulastog" username="bulastog" fullname="bulastog in irc.dal.net"]
[listen]
[ipv4 port="5678"/]
[/listen]

[servers]
[ipv4 host="irc.dal.net"/]
[/servers]

[channel name="#makati" autojoin="1"/]
[channel name="#lampungan" autojoin="1"/]
[/network]

[network autoconnect="1" name="undernet" nick="bulastog" username="bulastog" fullname="bulastog in irc.undernet.org"]
[listen]
[ipv4 port="1248"/]
[/listen]

[servers]
[ipv4 host="irc.undernet.org"/]
[/servers]

[channel name="#makati" autojoin="1"/]
[channel name="#ateneo" autojoin="1"/]
[/network]
[/networks]
[/ctrlproxy]


3. run IRC proxy
ampz@bulastog:~# ctrlproxy
Added linestack backend 'memory'
Filter 'repl_simple' added
Adding new client hook 'repl_simple'
Filter 'admin' added
Filter 'log_irssi' added
Filter 'ctcp' added
Filter 'strip' added
Adding lose client hook 'nickserv'
Filter 'nickserv' added
Filter 'antiflood' added
Filter 'auto-away' added
socket-Message: Listening on port 1234(socket 3)
Connecting with ipv4 for server phazenet
socket-INFO: Connecting to irc.phazenet.com:6667
socket-INFO: Successfully connected to irc.phazenet.com:6667
socket-Message: Listening on port 5678(socket 5)
Connecting with ipv4 for server dalnet
socket-INFO: Connecting to irc.dal.net:6667
socket-INFO: Successfully connected to irc.dal.net:6667
socket-Message: Listening on port 1248(socket 7)
Connecting with ipv4 for server undernet
socket-INFO: Connecting to irc.undernet.org:6667
socket-INFO: Successfully connected to irc.undernet.org:6667
Joining channel #streetkorner
Joining channel #cable-pinoy-mp3


FROM CLIENT (10.11.3.212)
open your mIRC/xchat client and connect /server ctrlproxyServer:listenport
for phazenet: /server 192.168.3.133:1234
for dalnet: /server 192.168.3.133:5678
for undernet: /server 192.168.3.133:2468

oryt? ampz

HTTPD Server Error

Server Error


The following error occured:

[code=SERVER_RESPONSE_CLOSE] The server closed the connection while reading the response. Contact your system administrator.


Solution: increase the memory_limit in php.ini from default 16M to any value you want to apply then reload apache

root@bulastog:~# vi /etc/php.ini
memory_limit = 20M ; Maximum amount of memory a script may consume

root@bulastog:~# /etc/init.d/httpd reload

shoud work now. ampz

MySQL: change root password

5.13.2006
#!/bin/amp
#*********************************************
Setting up mysql password is one of the essential tasks. root user is MySQL admin account. Remember Linux/UNIX login root account for your operating system and MySQL root are different. They are separate and have nothing to do with each other (indeed some admin removes root account and setup admin as mysql super user).

Method # 1
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:

root@bulastog:~# mysqladmin -u root password NEWPASSWORD

However if you want to change (or update) a root password, then you need to use following command:

root@bulastog:~# mysqladmin -u root -p oldpassword newpass
Enter password:


To change a normal user password you need to type (let us assume you would like to change password for vivek):

root@bulastog:~# mysqladmin -uroot -p oldpassword newpass

Method # 2:
MySQL stores username and passwords in user table inside MySQL database. You can directly update password using following method to update or change password for user vivek:

1) Login to mysql server, type following command at shell prompt:

root@bulastog:~# mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

mysql> use mysql;

3) Change password for user vivek:

mysql> update user set password=PASSWORD("NEWPASSWORD") where User='amp';

4) Reload privileges (very important):

mysql> flush privileges;
mysql> quit

PASSWORDLESS SCP / Secure Shell (SSH) LOGIN

#!/usr/bin/amp
#********************************************************

#lets set two computer to act as server and client:
SERVER=kuwatog(192.168.3.127)
CLIENT=bulastog(192.168.3.133)

#from our client pc, lets connec to the server.
#for server kuwatog to recognize/register our client to its known_host.
noc@bulastog:~$ ssh 192.168.3.127
Password:

noc@kuwatog:~$ ll .ssh/known_hosts
-rwx------ 1 noc noc 21502 2006-05-13 12:24 .ssh/known_hosts
noc@kuwatog:~$ cat .ssh/known_hosts
192.168.3.133 ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAv6lteeuQ0VRzCR8q0V4FkUYO4Z1puIm9EGGAZhxR/MA8skmhG7
FTyAQNNW+z/ILQO+5by63NB0po8Eyt/irF0SQJnnq2ek8BnrotQlAA+VXH85Z4bjvqrG+5sGkACLChCA
Kv0R6WY1cEyU5bjl6tYK5CBnJq8gBOkoEHyuf51Wk=


#lets generate rsa key:
noc@bulastog:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/noc/.ssh/id_rsa): [enter]
Enter passphrase (empty for no passphrase):
[enter]
Enter same passphrase again: [enter]
Your identification has been saved in /home/noc/.ssh/id_rsa.
Your public key has been saved in /home/noc/.ssh/id_rsa.pub.
The key fingerprint is:
07:91:04:68:1c:11:7c:92:8a:d2:d4:6a:99:61:45:ca noc@bulastog

noc@bulastog:~$ cd .ssh/
noc@bulastog:~$ ls -l
total 32
-rw------- 1 noc noc 883 2006-05-13 22:26 id_rsa
-rw-r--r-- 1 noc noc 222 2006-05-13 22:26 id_rsa.pub
-rwx------ 1 noc noc 24090 2006-05-13 22:24 known_hosts
noc@bulastog:~$

#we will copy the generated id_rsa.pub to kuwatog's authorized_keys

noc@bulastog:~/.ssh$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAv/gurMZuiR4d6GnRP0BKr4O8qJHf232Q7M7gKv3AD+IfqjBB9OsH
vvljTF2QZ3hYztOr1ONz/hvpQVhE8SYxZRF/yEvGbDqZ18q+TOiyTxv2YdZFqDubxXsqIq/mlWFpAXEYF3
ORZ5iCMaEdRwp6AGNWxteCHs0uvR3IL4j0U18= noc@bulastog


noc@kuwatog:~/.ssh$ vi authorized_keys

#create a file named authorized_keys to kuwatog and copy paste the content of bulastog's id_rsa.pub

noc@kuwatog:~/.ssh$ cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAv/gurMZuiR4d6GnRP0BKr4O8qJHf232Q7M7gKv3AD+IfqjBB9OsH
vvljTF2QZ3hYztOr1ONz/hvpQVhE8SYxZRF/yEvGbDqZ18q+TOiyTxv2YdZFqDubxXsqIq/mlWFpAXEYF3
ORZ5iCMaEdRwp6AGNWxteCHs0uvR3IL4j0U18= noc@bulastog


noc@kuwatog:~/.ssh$ chmod 700 *
noc@kuwatog:~/.ssh$ ls -l
total 36
-rwx------ 1 noc noc 222 2006-05-13 22:30 authorized_keys
-rwx------ 1 noc noc 21502 2006-05-13 22:24 known_hosts

#try to login now from bulastog client to server kuwatog:
noc@bulastog:~$ ssh 192.168.3.127
noc@kuwatog:~$

#it will not ask for password anymore

#try to copy files from server kuwatog:
noc@bulastog:~/.servers$ scp 192.168.3.127:~/.servers/* .
globix1 100% 39 0.0KB/s 00:00
globix2 100% 39 0.0KB/s 00:00
globix3 100% 39 0.0KB/s 00:00
globix4 100% 39 0.0KB/s 00:00
globix5 100% 39 0.0KB/s 00:00
globix6 100% 35 0.0KB/s 00:00
globix7 100% 35 0.0KB/s 00:00
globix8 100% 35 0.0KB/s 00:00


that's it. ampz!!!

Linux: Bash Shell Option

4.22.2006
If you are using bash shell. There is a way to cd a particular directory even if you spelled incorrectly on the command line. Set the shell option to:

shopt -s cdspell

eg:-
Suppose you want to cd to "cd /tmp" and you have miss typed to "cd /amp" still it will cd to "cd /tmp".

noc@bulastog:/tmp$ cd /amp
/tmp
noc@bulastog:/tmp$

This setting will be very usefull if you have a long named directory.

chix: Chikka IM on GAIM

from: Ryan Escarez

I don't know if chikka will make action regarding this reverse engineering activity, but hey it's really work!

IIRC, The first version of chix is only a CLI, but with this new version they integrate it to gaim to be the GUI of chix. I tried downloading the package and see if chix really work with gaim.

My first attempt is to compile the chix from source, but after compiling theres nothing chix protocol appear in the protocol section of gaim. I've tried hacking the code and changing the global path of variable, but still unable to use chix.

Second, is to install the chix using the debian package included and downloadable from the sourceforge, but dpkg is complaining that version of libc6 2.3.2.ds1-21 is missing and currently the libc6 2.3.2.ds1-20 is installed but it's older version than the one dpkg looking for. I can't find any version of libc6 2.3.2.ds1-21.

Third, is to force the dpkg to install without dependency using --force-depends option.


root@bulastog:/opt# wget http://surfnet.dl.sourceforge.net/sourceforge/chix/libchix_1.0.0-1_i386.deb
root@bulastog:/opt# wget http://jaist.dl.sourceforge.net/sourceforge/chix/libchix-dev_1.0.0-1_i386.deb
root@bulastog:/opt# wget http://keihanna.dl.sourceforge.net/sourceforge/chix/libchixgaim_1.0.0-1_i386.deb

root@bulastog:/opt# dpkg --force-depends -i libchix_1.0.0-1_i386.deb
root@bulastog:/opt# dpkg --force-depends -i libchix-dev_1.0.0-1_i386.deb
root@bulastog:/opt# dpkg --force-depends -i libchixgaim_1.0.0-1_i386.deb

see screenshot

XAMPP for Linux

XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

Follow this simple instruction on how to setup XAMPP in Linux.

1. login to root, then goto /opt directory

amp@bulastog:/opt$ su -
Password:
root@bulastog:~# cd /opt/


2. get the sourcecode.

root@bulastog:/opt# wget http://jaist.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.5.1.tar.gz


3. extract the sourcecode

tar -xvzf xampp-linux-1.5.1.tar.gz

(this will create lampp directory)
root@bulastog:/opt# ll
total 50508
drwxr-xr-x 20 root root 4096 2005-12-15 04:58 lampp
-rw-r--r-- 1 root root 6407320 2006-04-22 19:04 xampp-linux-1.5.1.tar.gz
root@bulastog:/opt# cd lampp/
root@bulastog:/opt/lampp#


4. run the applications (Apache, MySQL, PHP, FTP )

root@bulastog:~# /opt/lampp/lampp start

Starting XAMPP for Linux 1.5.0...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


5. check MySQL and Apache if its running.

root@bulastog:~# /opt/lampp/bin/mysql

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.15

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>



or you may link the /opt/lampp/bin/mysql to /usr/bin/mysql so you won't type the whole directory in running mysql.

to check if apache is working, just type in your browser:
http://localhost
http://localhost/phpmyadmin/


that's simple! amp :P