Archive

Archive for the ‘Uncategorized’ Category

Submit a html form from command line using Lynx post method

November 2, 2011 2 comments

We can use the lynx command to automatically submit html forms from linux command line. In the html form I choose(https://secure.indeed.com/account/forgotpassword), there was only two input fields named “email” and the “submit”. The following commands can be used for this purpose.


# msg="email=enldpr@gmail.com&submit=Submit\n---\n"
# url="https://secure.indeed.com/account/forgotpassword"
# echo -e ${msg}|lynx -useragent="Firefox" ${url} -post_data
Ignored 1 characters from standard input.
Use "-stdin" or "-" to tell how to handle piped input.
Warning: User-Agent string does not contain "Lynx" or "L_y_n_x"!

[1]sign in

[2]one search. all jobs. Indeed

Forgot Your Password?

We sent instructions for resetting your password to enldpr@gmail.com.

[3]About - Questions? [4]Contact us

©2011 Indeed

References

1. https://secure.indeed.com/account/login?hl=en
2. http://www.indeed.com/
3. http://www.indeed.com/intl/en/about.html
4. http://www.indeed.com/support
#

This security loop hole can be exploited by spammers and can be prevented by using captcha.

Categories: Uncategorized

Hsphere Backend Files

July 26, 2011 1 comment
###################
# Hsphere locations
###################
Root directory in HShere: /hsphere/local

Configuration files:

Common path – /hsphere/local/config
Control panel – /hsphere/local/home/cpanel/arjun/psoft_config/hsphere.properties
DNS – /etc/named.conf
The main named directory – /hsphere/local/var/named/
HTTP – /hsphere/local/config/httpd/httpd.conf
FTP – /hsphere/local/config/ftpd/proftpd.conf
Qmail – /hsphere/local/var/qmail/control/
Mysql – /etc/my.cnf
php.ini – /hsphere/local/config/httpd/php.ini or /usr/local/lib/php.ini

Control Panel features – /hsphere/local/home/cpanel
Scripts in hsphere – /hsphere/shared/scripts/
Location of domains – /hsphere/local/home//
Qmail – /hsphere/local/var/qmail(A symbolic link given to /var/qmail)
Mails – /hsphere/local/var/vpopmail/domains

Log files paths:

HSphere – /var/log/hsphere/hsphere.log
DNS – /var/log/messages
HTTP – /hsphere/local/var/httpd/logs/
Mail – /var/log/maillog
Horde – /hsphere/local/var/horde/log
FTP – /hsphere/local/var/proftpd/xferlog OR /var/log/proftpd/auth.log
MySQL – /var/log/mysqld.log

Statistics: Webalizer and Modlogan

/hsphere/local/var/staticstics – statistics results from rotatelogs (used for bandwith metering)
/hsphere/shared/ – modlogan and webalizer files
/hsphere/shared/apache/conf/modlogan_user.cfg – ModLogAn config file
/hsphere/shared/apache/conf/webalizer_user.cfg – webalizer config file (if MySQL is installed)
/hsphere/shared/skel/webalizer – skeleton files for webalizer section of the site.
/hsphere/shared/skel/modlogan – skeleton files for ModLogAn section of the site.

FTP and Frontpage:

/hsphere/local/var/proftpd/ – ftp log files
/hsphere/local/config/ftpd/ – ftp config files
/hsphere/shared/sbin/proftpd – ftp daemon file
/hsphere/shared/frontpage – FrontPage installation
/hsphere/local/var/frontpage – FrontPage config files

Others:

/hsphere/local/network/ips – all IP addresses and their netmasks that will be brought up by the system at start up. Used by H-Sphere to control IPs on the server.
/hsphere/shared/apache/htdocs – document root. Place index.html into this directory.
/hsphere/shared/apache/webshell – WebShell installation. This is a web based file manager that comes with H-Sphere
/hsphere/shared/skel – skeleton files for user sites. These are html pages that users see at their address before they upload their site content.
/hsphere/shared/skel/website – skeleton files for new sites
/hsphere/shared/skel/suspended – skeleton files for suspended sites
/hsphere/local/home/cpanel/apache/logs/ssl_engine_log – SSL log file in hshpere

Categories: Uncategorized

Directadmin backend files

July 26, 2011 2 comments
BACKEND FILES

———
CONF FILES /etc/httpd/conf/httpd.conf
LOG FILES /var/log/httpd/error.log
START/STOP /usr/local/etc/rc.d/httpd start/stop
Scripts /usr/local/directadmin/scripts/

DNS:-
———
CONF FILE /var/named/etc/namedb/named.conf
DB FILES /etc/namedb/domain.db
START/STOP /usr/local/etc/rc.d/named start/stop

MAIL:-
——–
CONF FILE /etc/exim.conf
LOG FILES /var/log/exim/
START/STOP /usr/local/etc/rc.d/exim start/stop
MAIL DIRECTORY /var/spool/virtual/

EMAIL PASSWORD: /etc/virtual/acrilicos.com/passwd
Domain specific Mail settings: /etc/virtual/acrilicos.com

DATABASE:-
—————–

MYSQL PASSWORD: /usr/local/directadmin/conf/mysql.conf

CONF FILE /etc/my.cnf
DATABASE PATH /usr/local/mysql/data/
START/STOP /usr/local/etc/rc.d/mysqld start/stop

FTP:-
——-
CONF FILE /etc/proftpd.conf
START/STOP /usr/local/etc/rc.d/proftpd start/stop

DOMAINS
————————-
/etc/virtual/domains
/etc/virtual/domainowners
Email Alias: /etc/virtual/acrilicos.com/aliases
Email QUota: /etc/virtual/acrilicos.com/quota
/etc/virtual/acrilicos.com/autoresponder.conf
Email account password: /etc/virtual/acrilicos.com/passwd
/etc/virtual/acrilicos.com/filter

/etc/httpd/conf/extra/directadmin-vhosts.conf
emailspoolvirtual=/var/spool/virtual
emailvirtual=/etc/virtual

ftpconfig=/etc/proftpd.conf
ftppasswd=/etc/proftpd.passwd
ftpvhosts=/etc/proftpd.vhosts.conf

mysqlconf=/usr/local/directadmin/conf/mysql.conf
namedconfig=/etc/named.conf
nameddir=/var/named
templates=/usr/local/directadmin/data/templates

Categories: Uncategorized

Installing Xcache From source

April 3, 2011 Leave a comment

In this post, the steps to install xcache is mentioned.

Steps:
1) Download and extract Xcache source

——————————————————-
wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz
tar xzf xcache-1.3.0.tar.gz
cd xcache-1.3.0
——————————————————-

2) Use phpize to create the configure file. The “php-devel”(PHP development) package needs to be present in the server to perform this work. After that perform the normal configure, make and make install steps.

——————————————————-
phpize –clean phpize
mkdir /usr/local/xcache-1.3.0
./configure –enable-xcache –prefix=/usr/local/xcache-1.3.0 –with-php-config=`which php-config`
make && make install
——————————————————-

Once make install is completed and if xcache is successfully compiled, then something like the one pasted below will be displayed.

——————————————————-
Installing shared extensions: /opt/php-fpm/lib/php/extensions/no-debug-non-zts-20060613/
——————————————————-

Also one xcache.ini file will be present inside the directory where we performed make and make install. Open this file and then go to the line containing the attribute “zend_extension”. Assign the complete location of “xcache.so” to “zend_extension”.

eg:
——————————————————-
zend_extension = /opt/php-fpm/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
——————————————————-

After that find the configuration file of php and then append “xcache.ini” to it.

——————————————————-
[root@xcache-1.3.0 ~]# php -i|grep “Configuration File”
Configuration File (php.ini) Path => /etc/php.ini
[root@xcache-1.3.0 ~]# cp -p /etc/php.ini /etc/php.ini.bak`date +%F`
[root@xcache-1.3.0 ~]# cat xcache.ini >> /etc/php.ini
[root@xcache-1.3.0 ~]#
——————————————————-

Once this is completed verify the setup using the “php -v” command.

Categories: Uncategorized