Install Steghide CentOS 6

Steghide is steganography tool to hide data in various kinds of image- and audio-files. first of all lets download RMP for centos

wget http://prdownloads.sourceforge.net/steghide/steghide-0.5.1-1.i386.rpm?download

after Download we can install it

rpm -ivh steghide-0.5.1-1.i386.rpm?download

if no error will be displayed then its ready but if error for example somthing like this

error: Failed dependencies:
ld-linux.so.2 is needed by steghide-0.5.1-1.i386
libc.so.6 is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.0) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.1) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.1.3) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.2) is needed by steghide-0.5.1-1.i386
libgcc_s.so.1 is needed by steghide-0.5.1-1.i386
libgcc_s.so.1(GCC_3.0) is needed by steghide-0.5.1-1.i386
libjpeg.so.62 is needed by steghide-0.5.1-1.i386
libm.so.6 is needed by steghide-0.5.1-1.i386
libm.so.6(GLIBC_2.0) is needed by steghide-0.5.1-1.i386
libmcrypt.so.4 is needed by steghide-0.5.1-1.i386
libmhash.so.2 is needed by steghide-0.5.1-1.i386
libstdc++.so.5 is needed by steghide-0.5.1-1.i386
libstdc++.so.5(CXXABI_1.2) is needed by steghide-0.5.1-1.i386
libstdc++.so.5(GLIBCPP_3.2) is needed by steghide-0.5.1-1.i386
libstdc++.so.5(GLIBCPP_3.2.2) is needed by steghide-0.5.1-1.i386
libz.so.1 is needed by steghide-0.5.1-1.i386

Need to install all dependencies

yum install "compat-libstdc++-33.i686" "compat-libstdc++-33.x86_64";
yum install zlib-devel.i686;
yum install libjpeg-turbo-devel.i686;
rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm";
yum install libmcrypt-devel;
yum install mhash.i686;
yum install "libmcrypt.i686";
root@server [/tmp]# rpm -ivh steghide-0.5.1-1.i386.rpm?download
Preparing...                ########################################### [100%]
   1:steghide               ########################################### [100%]

now you can use it for example

steghide embed -cf in.jpg -ef out.jpg -p password
  • in.jpg is file where we want to add hidden data
  • out.jpg is ready file after add is completed
  • password is pass to encrypt data

PNG/JPG Images Optimization Recursively

Optimization of PNG and JEPG images, using two different utilities first one is jpegoptim which is used to optimize JEPG images to use it recursively and optimize all of images in directory and sub directory you can use this command:

find . -name "*.jpg" | xargs jpegoptim --strip-all --all-progressive

This will strip all data and make images progressive.

PNG images can be optimized with Optipng

find . -name *.png | xargs optipng -nc -nb -o7 -full

Top Hex Editors Linux

For manipulation of binary data there are tons of tools on Linux but I will try to list some of great looking GUI tools

Bless Hex Editor

Written in mono/gtk it can be used in any platform where mono and gtk can work, this is feature which is listed on main website

Efficiently working with large files with fast data rendering on screen.
Supports multilevel redo/undo operations.
You can customizable data views use multiple tabs use find and replace operations.
Export of data to plain text and html or you can use plugins for different formats.

wxHex Editor

Newer soft then bless hex with some new features it’s written in C++ and can be used on mac and windows also.

For speeding up rendering and work on big files it’s not copying full file to ram so it’s good for really big files, memory usage is low, how there site is telling it’s using 25MB while working on several files with size more then 8GB.

Allows to work as low level disk editor you can edit sectors in hex, has X86 disassembly support, allows process memory editing and much more, last release was in 2014 and project is still beta.

DHEX

Running on Linux, HP-UX, FreeBSD, NetBSD, MacOS X, IRIX and Solaris, it has diff mode which means you can open two files same time and compare it, also have several different themes so you can customize layout. last release was in 2012.

GHex

Hex editor for gnome desktop nice looking with simple design, no so many function but you can still edit files and save hex as html, so nice looking gnome hex editor.

Install NGINX Mod PageSpeed

Installing mod_pagespeed on apache is simpler then on nginx, here we should build nginx from sure with mod page speed, I will write down how to do this on ubuntu but this may work on any other distro

first of all we will need to install dependencies

sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip

after lets set mod page speed version at this time it’s 1.9.32.4

NPS_VERSION=1.9.32.4;

now get mod page speed from github and unzip

wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip --no-check-certificate;
unzip release-${NPS_VERSION}-beta.zip;

we also need psol lib

cd ngx_pagespeed-release-${NPS_VERSION}-beta;
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz --no-check-certificate;
tar -xzvf ${NPS_VERSION}.tar.gz;

now we can download nginx configure and install it

NGINX_VERSION=1.8.0;
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz;tar -xvzf nginx-${NGINX_VERSION}.tar.gz;
cd nginx-${NGINX_VERSION}/;
./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/access.log --user=www-data --group=www-data --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --with-http_gzip_static_module --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}-beta;
make;
make install;

now you need to activate mod add below code into nginx.conf(/etc/nginx/nginx.conf) below listen 80 line and create tmp directory and set user to it

pagespeed on;
pagespeed RewriteLevel CoreFilters;
pagespeed FileCachePath "/var/cache/ngx_pagespeed/";
pagespeed EnableFilters combine_css,combine_javascript,remove_comments,collapse_whitespace;
mkdir /var/cache/ngx_pagespeed/;
chown www-data:www-data /var/cache/ngx_pagespeed/;

after this you should have everything installed, but when we building nginx from source there is no upstart script, create file /etc/init/nginx.conf and insert this in it upstart script from nginx website

# nginx
description "nginx http daemon"
author "George Shammas <[email protected]>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/sbin/nginx
env PID=/var/run/nginx.pid
expect fork
respawn
respawn limit 10 5
#oom never
pre-start script
        $DAEMON -t
        if [ $? -ne 0 ]
                then exit $?
        fi
end script
exec $DAEMON

now you can start nginx using simple command

initctl start nginx

LAMP Server Arch Linux

This is tutorial how to install Apache,Mysql,PHP on arch linux.

First of all lets update arch linux:

sudo pacman -Syu

Now we can continue, install apache server:

sudo pacman -S apache
sudo systemctl start httpd

Mysql:

sudo pacman -S mysql

you will see something like this:

: There are 2 providers available for mysql:
:: Repository extra
   1) mariadb
:: Repository community
   2) percona-server

I’m recommending mariadb so click 1, before starting mysql we need to initialize the mariadb data directory and after start it:

udo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mysqld

now to create password for mysql root user type:

sudo mysql_secure_installation

install php and it’s apache module:

sudo pacman -S php php-apache

open apache config file

sudo nano /etc/httpd/conf/httpd.conf

and comment this line

LoadModule mpm_event_module modules/mod_mpm_event.so

by adding # at start, after at the end of document add

#php
Include conf/php.conf

click CTRL + O and CTRL + X

sudo nano /etc/httpd/conf/php.conf

and add this lines

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule php5_module modules/libphp5.so
 
Include conf/extra/php5_module.conf

click CTRL + O and CTRL + X

restart apache,

sudo systemctl restart httpd

now create php file and add into it:

<?php
 
phpinfo();
 
?>

navigate to this file, for example localhost/index.php

Now to install PHPMyadmin

sudo pacman -S phpmyadmin php-mcrypt

edit php.ini file and uncomment some needed extensions

extension=mcrypt.so
extension=mssql.so
extension=mysqli.so
extension=openssl.so
extension=iconv.so
extension=imap.so
extension=zip.so
extension=bz2.so

also search for base_dir and make sure it’s like this

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/

now open

sudo nano /etc/httpd/conf/httpd.conf

add at bottom

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
 
<Directory "/usr/share/webapps/phpMyAdmin">
    DirectoryIndex index.html index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

restart apache

sudo systemctl restart httpd

you can access phpmyadmin using http://localhost/phpmyadmin

Thats all last step if you want LAMP stack to be started at start-up us this

sudo systemctl enable httpd mysqld

sudo systemctl enable httpd mysqld

Joomla 3.3.4 – 3.3.6 pagination bug

This is bug which mostly not allowing you to go to first page or use back button, in version 3.4 it’s fixed but if you want to make just fix of 3.3 version, this is how you should do it open file /libraries/cms/router/site.php now find this

if ($this->_mode == JROUTER_MODE_SEF && $route)
{
    $limitstart = (int) $uri->getVar('limitstart');
    if ($limitstart > 0)
    {
        $uri->setVar('start', $limitstart);
    }
    $uri->delVar('limitstart');
}

and replace it with this code:

f ($this->_mode == JROUTER_MODE_SEF && $route)
{
    if ($limitstart = $uri->getVar('limitstart'))
    {
        $uri->setVar('start', (int) $limitstart);
        $uri->delVar('limitstart');
    }
}