Quick and Dirty Mysql backup to Samba share

#mount the samba share

mount -t smbfs -o username=<username>,password=<password> //server/share /mnt/database

#backup database

for i in $(mysql-uroot -password -e "SHOW DATABASES"|tail +2); do mysqldump -uroot -ppassword $i | gzip -9 > /mnt/database/$i.sql.gz; done

#unmount the samba share
umount /mnt/database

By penoi on Friday, April 18, 2008 | | A comment?

Pinoy Funny Pictures and Travel Photos

Last December 2005, i started my first picture blog. At first it shows pictures of flowers and some experimental images. But after the success of Pinoy Jokes, i added pinoy funny pictures. It was in hiatus for almost a year, but now, i reviving it once more to give you my collection of never before seen funny pictures, travel photos and images taken from the internet. Please visit the site and see this Special Jumbo Siopao, shot from my officemate's merienda.

By penoi on Monday, April 14, 2008 | | 1 comment

First edition of Playboy Philippines

Playboy Philippines picture


No, i will not give you a free download pdf edition of Playboy Philippines :) Due to the fact that this is the first edition of Playboy here in the Philippines, i wont miss the opportunity to have my own copy coz it will be a collectible in due time. I may say that this local version of Playboy has the censorship suited for a conservative(?) country. Yes, you will see half naked girls, but not as vulgar as those images that we always see on Tiktik, Sagad, and even on FHM.  It doesnt have articles like on FHM's Ladies Confession and Sex Positions. My girlfriend commented that this magazine is more of a Men's fashion magazine. Oh well, just grab a copy and see it for yourself.


By penoi on Monday, April 7, 2008 | | 3 comments

XMMS Mp3 Plugin in Backtrack Linux

wget http://www.osnews.com/files/xmms-mp3-fc1.tar.gz

tar xvzf xmms-mp3-fc1.tar.gz

cd xmms-mp3-fc1

cp libmpg123.so /usr/lib/xmms/Input/

By penoi on Sunday, April 6, 2008 | | 1 comment

Windows backup using DLINK DNS-323

1. Install CWRsync: http://sourceforge.net/project/showfiles.php?group_id=69227&package_id=68081

2. Create ssh-rsa for the server(password-less rsync)
cd "c:\program files\cwrsync\bin"
ssh-keygen -t rsa -N '' (hit enter twice)

3. Upload your generated key to the backup server
rsync -av "/cygdrive/c/documents and settings/administrator/.ssh/id_rsa.pub" root@ipaddress:/home/root/

4. SSH to your DNS-323 and copy the new id_rsa.pub to authorized_keys
#cat /home/root/id_rsa.pub >> /home/root/.ssh/authorized_keys

5. Create a Batch file in your Windows


@ECHO OFF
REM *****************************************************************
REM
REM CWRSYNC.CMD - Batch file template to start your rsync command (s).
REM
REM By Tevfik K. (http://itefix.no)
REM *****************************************************************

REM This is where we can find our .ssh

SET HOME=C:\Documents and Settings\Administrator

REM Make environment variable changes local to this batch file
SETLOCAL

REM ** CUSTOMIZE ** Specify where to find rsync and related files (C:\CWRSYNC)
SET CWRSYNCHOME=%PROGRAMFILES%\CWRSYNC

REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions
REM on your windows machine are not updated as a side effect of cygwin
REM operations.
SET CYGWIN=nontsec

REM Set HOME variable to your windows home directory. That makes sure
REM that ssh command creates known_hosts in a directory you have access.
SET HOME=%HOMEDRIVE%%HOMEPATH%

REM Make cwRsync home as a part of system PATH to find required DLLs
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%\BIN;%PATH%

REM Windows paths may contain a colon (:) as a part of drive designation and
REM backslashes (example c:\, g:\). However, in rsync syntax, a colon in a
REM path means searching for a remote host. Solution: use absolute path 'a la unix',
REM replace backslashes (\) with slashes (/) and put -/cygdrive/- in front of the
REM drive letter:
REM
REM Example : C:\WORK\* --> /cygdrive/c/work/*
REM
REM Example 1 - rsync recursively to a unix server with an openssh server :
REM
REM rsync -r /cygdrive/c/work/ remotehost:/home/user/work/
REM
REM Example 2 - Local rsync recursively
REM
REM rsync -r /cygdrive/c/work/ /cygdrive/d/work/doc/
REM
REM Example 3 - rsync to an rsync server recursively :
REM (Double colons?? YES!!)
REM
REM rsync -r /cygdrive/c/doc/ remotehost::module/doc
REM
REM Rsync is a very powerful tool. Please look at documentation for other options.
REM

REM ** CUSTOMIZE ** Enter your rsync command(s) here
REM You want to copy C:\Documents and Settings\Administrator\My Documents\ to DNS-323
rsync --progress -aurp --delete "/cygdrive/c/Documents and Settings/Administrator/My Documents/" root@dns.ip.address:/mnt/HD_a2/Mydocs/




6. Sched the backup using Windows Task Scheduler

By penoi on Tuesday, April 1, 2008 | | 4 comments

Configuring ssh and rsync in DLINK DNS-323

1. Download and untar funplug(i have problems with 0.4 version cause there's no dropbear.sh in the package file)

http://www.inreto.de/dns323/fun-plug/0.3/funplug-0.3.tar.gz

2. Copy fun_plug and fun_plug.tar into Volume_1 of Dlink DNS-323

3. Restart Dlink DNS-323

4. Telnet to your DNS 323

#cd /mnt/HD_a2/fun_plug.d/start


#sh dropbear.sh start

5. Set your root account

#echo "root::0:0:99999:7:::" >>/etc/shadow
#passwd root


6. Test first your ssh access with the new password

7. Store your root password

#/mnt/HD_a2/fun_plug.d/bin/store-passwd.sh

8. Configure your dropbear.sh and rsyncd.sh to start at bootup

#chmod a+x dropbear.sh

#chmod a+x rsyncd.sh

9. Disable insecure telnet

#chmod a-x telnetd.sh

10. Restart your DNS-323

By penoi on Monday, March 31, 2008 | | 2 comments

PuttyTabs: putty on tabs

Tired of unorganized ssh putty sessions and don't have the budget for SecureCRT??? Use PuttyTabs!!! PuttyTabs is a utility use to organize your ssh on tabs. It has its own docking window that you can hide in your desktop.

By penoi on Friday, March 28, 2008 | | A comment?

Installing Security Auditor's Research Assistant(SARA) in backtrack linux

Installing Security Auditor's Research Assistant(SARA) in backtrack linux 

Install tcsh. Perl needs the csh shell to execute SARA
#wget http://mirror.muntinternet.net/pub/slackware/slackware_source/a/tcsh/tcsh-6.15.00.tar.bz2
#bunzip2 tcsh-6.15.00.tar.bz2
#tar xvf tcsh-6.15.00.tar
#cd tcsh-6.15.00
#./configure
#make
#make install
#ln -sf /usr/local/bin/tcsh /bin/csh


Download and install SARA
#wget http://www-arc.com/sara/downloads/sara-7.5.2.tgz
#tar xvzf sara-7.5.2.tgz
#cd sara-7.5.2
#./configure
#make
#make install


Add sara user
./add_user

Scan a host
./sara -a4 <ip.address>

Run SARA in daemon mode
./sara -D

Now browse to http://localhost:666

By penoi on Tuesday, March 25, 2008 | , | A comment?

Should i Perl or Python now

my 30 days lab access ended last February for the security course that im attending. Im still waiting for a May slot and extend another 30 days access. For the meantime, im struggling to learn perl and python programming needed in some of the course lab exercises.

By penoi | , | A comment?

SEO poisoning attacks growing

SEO Poisoning Attacks 

"Online fraudsters have continued to expand their efforts this week to inject iframe attacks into the optimized search results of major Web sites.

The attack abuses a common practice among Web sites -- caching search queries -- an activity designed to boost their rankings among major search engines, such as Google, according to security researcher Dancho Danchev. The attackers inject common search terms and an iframe script designed to send victims to other sites hosting malicious code. The search term and iframe redirect get cached in search engines such as Google."

By penoi on Tuesday, March 18, 2008 | | A comment?

Holy Week... Mega Holidays

Its Holy Week again!!! Time to pray and to ask forgiveness for our sins. Nakakalungkot isipin, pero  kapag narinig natin ang word Holy week, ang unang pumapasok sa isip natin ay BAKASYON, BEACH at HIKING.

So saan ako ngayong Lenten Season??? sa bahay lang, kasama ang buong pamilya at buong araw ko lang kukulitin ang aking mga pamangkin :)

By penoi on Sunday, March 16, 2008 | | A comment?

Journey new Album

March 11, 2008 -- A new chapter in the legendary career of multi-Platinum rockers JOURNEY--Neal Schon (guitar), Jonathan Cain (keyboards), Ross Valory (bass), Deen Castronovo (drums) and Arnel Pineda (vocals)—will begin on June 3 with the highly anticipated release of REVELATION, a three-disc CD and DVD package to be sold exclusively at Wal-Mart stores in North America.

The first disc will consist of 11 re-recorded classics, the second is filled with 11 new songs, and the third is a live, in-concert DVD. All of the music on REVELATION was produced by Kevin Shirley (who previously worked with JOURNEY on their Platinum-certified TRIAL BY FIRE album).
JOURNEY will take REVELATION on the U.S. concert trail later this July, with details to be announced in the coming weeks.

taken from journeymusic.com


By penoi on Thursday, March 13, 2008 | | A comment?

Xen hangs my Linux server!!!

My officemate created a Xen Windows 2003 server virtual machine on one server. The virtual machine supposedly was configured to eat up 30GB of hard disk space but unknowingly it goes up to 85 Gb which eats up all of hd space and cause my server to hang.

I have to restart and fix all of MySQL table crashes. Here's a simple script that i created that will help me monitor my server's harddisk and mysql crash

*************************************************************************************************

#!/bin/sh
#check harddisk space
date > serverhealth.log
echo "******** Disk Space **********" >> serverhealth.log
df -h >> serverhealth.log
echo "********Check Eventum database ***********" >> serverhealth.log
#check Mysql datase for errors
mysqlcheck -umysqluser -ppassword mysqldatabase >> serverhealth.log

SUBJECT=`hostname`" Automated Server Health Alert"

TO="admin@admin.com"

mail -s "$SUBJECT" "$TO" < /root/serverhealth.log
**************************************************************************************

By penoi on Wednesday, March 12, 2008 | | A comment?

Learning how to shoot

"the art is not in the machine"

- taken from imag photography magazine

im a newbie in dslr photography and still learning how aperture, shutter, flash, etc. works. Photography is addicting especially in upgrading gadgets if you have the extra bucks :)

check out some of my photos at penoi's multiply site....

By penoi on Friday, March 7, 2008 | | A comment?

North Face Hot Shot Bag

North Face Bag HotShot

Now, i have my own The North Face HotShot bag. It has many pockets and a laptop sleeve that i always wanted on a bag.

By penoi on Monday, February 25, 2008 | | 3 comments

Arnel Pineda with Journey Live in Chile





Arnel Pineda Faithfully with Journey!!!! Journey Philippine Tour please!!!!

By penoi on Sunday, February 24, 2008 | | 2 comments

PostgreSQL

[root@localhost]# postgres
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.
[root@localhost]#

im starting to like PostgreSql...

By penoi on Friday, February 22, 2008 | , | A comment?

Microsoft ISA and Squid Proxy Server

I might be wrong or maybe there are still misconfiguration with our ISA configs( we are not that expert though), i noticed that every time you browse the net, you're always authenticated by the Active Directory, not a one-time-only  authentication. After weeks of messing with Microsoft ISA and still having issues and problems, we finally decided to bring our old proxy server back.

Being lazy-as-i-am person, i dont have any documentation of process on how i installed our Squid+Dansguardian with WCCP support. Thanks a lot to Sun's Big Admin Portal for their step by step installation and i was able to setup our proxy server in just a couple of hours.

By penoi on Thursday, February 21, 2008 | | A comment?

Backtrack V3 in Toshiba Satellite M50

Toshiba M50 Backtrack 3 Linux


 


My Toshiba Satellite M50 laptop now runs Backtrack v3 Linux!!!! The installation manual was straightforward although i have to mess around with lilo bootloader and the computer's mbr. Copying the livecd's xorg.conf to my HD installed xorg.conf fixed the LCDs resolution :)

By penoi on Sunday, February 17, 2008 | , , | 2 comments

Microsoft Exchange Problem

Our Microsoft Exchange fucked up leaving headache to the whole department. Two of the RAID 5 disk crashed and we have to reinstall everything from scratch.


By penoi on Monday, February 11, 2008 | | A comment?