Saturday, November 24, 2012

Installing Apache 2.4.3 from source on CentOS


Downloading and compiling Apache 2.4.3

# cd /usr/local/src/
# wget http://mirrors.issp.co.th/apache//httpd/httpd-2.4.3.tar.bz2
# tar -jxf httpd-2.4.3.tar.bz2
# cd httpd-2.4.3


Installing APR & APR-Utils dependencies :

# cd /usr/local/src/httpd-2.4.3/srclib/

# wget  http://mirrors.issp.co.th/apache//apr/apr-1.4.6.tar.bz2
# wget  http://mirrors.issp.co.th/apache//apr/apr-util-1.5.1.tar.bz2



# tar -jxf apr-1.4.6.tar.bz2
# tar -jxf apr-util-1.5.1.tar.bz2
# mv apr-1.4.6 apr
# mv apr-util-1.5.1 apr-util

Installing PCRE:

# cd /usr/local/src/
# wget  http://sourceforge.net/projects/pcre/files/pcre/8.31/pcre-8.31.tar.bz2/download
# tar -jxf pcre-8.31.tar.bz2
# cd pcre-8.31
# ./configure --enable-utf8  --enable-unicode-properties
# make
# make install

Configure it :


cd /usr/local/src/httpd-2.4.3/
./configure --prefix=/usr/local/apache --enable-so 
 --enable-ssl --enable-deflate --enable-proxy --enable-proxy-ajp --enable-proxy-balancer --enable-expires --enable-headers --enable-rewrite --with-included-apr --with-included-apr-util
make
make install

Install rpmbuild On CentOS Linux Using Yum Package Manager:

Install rpmbuild On CentOS Linux Using Yum Package Manager:
[root@leokit ~]# yum install rpm-build

Verify rpmbuild Available And Verify rpmbuild Version:

[root@leokit ~]# rpmbuild --version
RPM version 4.8.0

Thursday, February 16, 2012

password recovery from stash file

----------------unstash.pl begin ------------------------
use strict;

die "Usage: $0 \n" if $#ARGV != 0;

my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";

my $stash;
read F,$stash,1024;

my @unstash=map { $_^0xf5 } unpack("C*",$stash);

foreach my $c (@unstash) {
    last if $c eq 0;
    printf "%c",$c;
}
printf "\n";
---------------------unstash.pl end-----------------

perl unstash.pl key.sth
where key.sth is the stash file