Windows useful likns

Here are some useful links:

Shutdown:
Shutdown.exe -s -t 00
Reboot:
Shutdown.exe -r -t 00
Sleep:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Hibernate:
rundll32.exe PowrProf.dll,SetSuspendState
Lock:
Rundll32.exe User32.dll,LockWorkStation

Posted in Uncategorized | Leave a comment

Virtualizor NULL how2

 

chattr -i /usr/local/virtualizor/license.php
rm -rf /usr/local/virtualizor/license.php 
php_cwd=`/usr/bin/php << EOF
<?php
eval(gzinflate(base64_decode('DZe3DsTWEUV7/YglsGBOsC2BOWcuU2Mwx2XOX+9tiAUr7nsz957zz9//+Wdu5j/KMx3+rN92rIZ0L//M0q0ksP8VZT4V5Z//EpNR5iczFnsfBT3b19005tXVUY4yP92vm1M4BUY14q5JMtn7ESSQV4HgGKGgTVevLFNhQst0mL1WWGVKVBGZGhz8VIFG+wX19kVpBYXXeJ/4g0Uo6pzVBWI6MIgVikvC5mM5DRggTQzD76i9PeQjtoTdWs/Wbm9PVgMDnI/a36BDuLRkktYzWCnrG3CLOZb7GJL3YSSnezZCbOOWvHEvfuVZR2CjQJUifCgTsNkyiI0V8N68fcXsRe2Rm0mbd6QXzM68vseSow7ia7tv1ByiQbAO8URJiy6BuIEGfALmRnsfpbULcPvmfXk/x8Vujju5BYiIGrCkAB9FCBticOs6AeuvqueStqnqZ75AvjY/hYGkmc2yCVdLRWSWc1L6RVvbqthbAGur+WJtzAZF5cJsXwy9LaDSDAZ1TsvhQ0HFODtugXR0VJYKg8aORai7/eZq6W+oOaNBrgvNiGPDdh76sfUj0u5vGFDWc3GrZXAGMs9sj7iSKZhZwi/rx5+4A0SGk4vOcsNCEuXvzVszBNnoosBnMR1mTPNfxp8A+b0JpL06UkoJBYx3M8QQ65RtezVlW0s73dvqukTllDfJWgdjhaDL73BJvrO+JbuVhQ8B32zbogu44lKWjv0qg+zxfLV9Kokidb/pytWX6zMZZgqvtkWWSnwAIG7Xge/rJnt38vpqwWXnRqfWwDJfFbJKPt++YuF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Ebzh8ExumLot2eScHVRvetk+fcU1bzVicfUuz4Ho9yEoXEbMkDcczglOOo7xZ2C6ShnmM3Tb1t2eOgPQhoVu4WcK1ThVgTGjmBPKKYwlFf8w19Jk3BraAb//IBp7t+sH8mmzSCIFhKfplQ4GyfrkJzGPjz6Lu/MONQNm0ptUGRRNp9SgPZ9bHooa3ASiM1T8/JGO+ssXFMOjn8UGS01d0wDP8xdI/HGZysw6C5RYXEuZQXsNcV2NqmWMyx2LzVG76s0Px9NzRfeecGaXON8yL0/8+PNKsPwbVZp3SE0usHX5kACtiP0XyOpqjwfw15YuIv5ezZW43dMW02Oes6jixZukGBtAbAFniFVoJ68llFaRxQUqsbjf1Yy2tXEKsyObUwx5xNkWZF1A95hhwmGA+dVBbqGrOgiWKCAzbS+QJm73bJVyqFraodJJesG4e5QjHxfWbkzD2oyz7tLHO0zPz/uuPW6OTlGceNLk6M7cl4cYuvI36OY8NKjNPZxa+Pikq0ZN2d6A1qmXacxkgB2gcLR98X1pJLN0Mnq3IYV71wMvgha2Y2VobL8Lo2PxNj8AIuMM6wLGNeBqYx3RgTzYbbUUKUrBehqiAWuY9IySjVqUB4/K2KeWSG8K96dlF7Ml+8h/QIRx+9AvIfrpvk+bhNX3dUrfy3/ECA7AL7XthwoIohf3Lhzp8lO3y4IMERRL/P6Qv0PeDHYhuFgtfsTFr7mwkWbURQmsQz/Nrj8sV4fcPTyMEj48Fh7ViZEvAJY0CNpRFIEghQE/0rXOE7yE//7rr7/++vcf//z9n3/+Dw==')));
?>
EOF`
echo $php_cwd > /usr/local/virtualizor/license.php
chattr +i /usr/local/virtualizor/license.php

 

Posted in Uncategorized | Leave a comment

A bit of cleanups

for i in $(ls /apps/ldap_backups); do k=$(ls /apps/ldap_backups/$i | wc -l)&& if [ $(expr $k) -gt 10 ]; then for l in $(ls -tr /apps/ldap_backups/$i |head -$(expr $k – 10));do echo removing “/apps/ldap_backups/$i/$l” && rm -rf /apps/ldap_backups/$i/$l; done ; fi ;done

Posted in Uncategorized | Tagged | Leave a comment

Changing root pass without command prompt

sudo echo -e ‘Dl5ch0tS.’ | (sudo passwd –stdin root)

Posted in wrk | Leave a comment

Secure uTorrent Server : Ubuntu uTurrent + Apache reverse Proxy + OpenSSL

Hi ladies and gents! recently I discovered that downloading torrents could be against the law 🙂 So became of a need to install remote uTorrent Server + Apache reverse http proxy covered by SSL connection.

Install ÎĽTorrent in Ubuntu / Fedora

μTorrent is a freeware and a closed source BitTorrent Client. One of the most used lightweight BitTorrent Client, Now it is available for Linux as μTorrent Server. You can download the tar file from utorrent.com. Before installing the uTorrent, you have to install the dependency library.

To Install Dependency Library

Ubuntu 14.04  / 13.10 / 13.04 / 12.10 / 12.04 / 11.10 users run the below command to install the dependency library. Issue the password for the user when prompted.

sudo apt-get install libssl0.9.8:i386

Now Open a Terminal and use the following command to download.

wget http://download.utorrent.com/linux/utorrent-server-3.0-25053.tar.gz

After downloading the tar file, move to the directory where the downloaded file is located.

For example if the downloaded file is in Downloads directory then use the below command.

cd Downloads/

Now copy / move the tar file to opt directory, use the following command to copy the file to opt directory. Type the password for the user when prompted. Then extract it.

sudo cp utorrent-server-3.0-25053.tar.gz /opt/

Now move to the opt directory to extract the tar file. Run the following commands one by one.

cd /opt/
sudo tar -xvf utorrent-server-3.0-25053.tar.gz

After extracting the tar file remove it.

sudo rm -rf utorrent-server-3.0-25053.tar.gz

Change the permission of the extracted folder.

sudo chmod 777 -R utorrent-server-v3_0/

Create a symbolic link so that you can run the torrent server from terminal.

sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver

That’s it. Now you can start the utorrent server by using the following command in terminal.

utserver -settingspath /opt/utorrent-server-v3_0/ &

To access utorrent server

Open a browser and type the following line.

http://localhost:8080/gui/

Type the User Name as admin and leave the password field as empty and click ok.Check the screen shot below.

Before you start downloading the torrents set the download location, by clicking on the Preferences icon and selectDirectories then click on the check box “Put new downloads in:” and specify the download location. For example if you like to have the Downloads directory as default then use the following line.

/home/user/Downloads/

*Note: in the above line change user to your user name in the system. Check the screen shot below.

That’s it for the torrent Server : Next Apache reverse proxy

Make mods enabled for apache2:

lrwxrwxrwx 1 root root 28 Feb 22 10:23 proxy.conf -> ../mods-available/proxy.conf
lrwxrwxrwx 1 root root 33 Feb 22 10:24 proxy_http.load -> ../mods-available/proxy_http.load
lrwxrwxrwx 1 root root 28 Feb 22 10:34 proxy.load -> ../mods-available/proxy.load
lrwxrwxrwx 1 root root 30 Feb 22 12:27 rewrite.load -> ../mods-available/rewrite.load
lrwxrwxrwx 1 root root 26 Feb 22 10:35 ssl.conf -> ../mods-available/ssl.conf
lrwxrwxrwx 1 root root 26 Feb 22 10:35 ssl.load -> ../mods-available/ssl.load

Create config :

cat /etc/apache2/vhosts/tor.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName tor.lan.rr

RewriteEngine on
RewriteRule ^/gui(/?)(.*)$ /$2 [PT]

ProxyRequests off
ProxyPass / http://127.0.0.1:8080/gui/
ProxyPassReverse / http://127.0.0.1:8080/gui/
ErrorLog /var/log/apache2/utorrent-error.log
CustomLog /var/log/apache2/utorrent-access.log common

SSLEngine on
SSLCertificateFile /etc/ssl/tor.crt
SSLCertificateKeyFile /etc/ssl/tor.pem
BrowserMatch “MSIE [2-6]” \

nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch “MSIE [17-9]” ssl-unclean-shutdown

</VirtualHost>

 

generate ssl keys and cert:

cd /etc/ssl/
openssl genrsa -des3 -out tor.key 1024
openssl req -new -key tor.pem -out tor.csr
openssl x509 -req -days 365 -in tor.csr -signkey tor.key -out tor.crt

service apache2 reload

Done.

 

 

 

Posted in Uncategorized | Leave a comment

Free memory Linux

  • To free pagecache:
    $ echo 1 > /proc/sys/vm/drop_caches 
  • To free dentries and inodes:
    $ echo 2 > /proc/sys/vm/drop_caches 
  • To free pagecache, dentries and inodes:
    $ echo 3 > /proc/sys/vm/drop_caches
Posted in Uncategorized | Leave a comment

VCS Resuorce not enabled.

haconf -makerw && hagrp -enableresources SG_wmPRD
hares -probe proxy_wmPRD -sys esb05a

hagrp -online SG_wmPRD -sys esb05a

Posted in Uncategorized | Leave a comment

VXFree : (check how many space available in Veritas DG)

loa@cldb26b ~ $cat ./vxfree
#!/bin/bash
for i in `sudo /sbin/vxdg list | sed 1d | awk ‘{print $1}’`; do

echo -n $i” = ” sudo /sbin/vxdg -g $i free | sed 1d | awk ‘{s+=$5} END {print s/2048 ” MB”}’

done

Posted in Uncategorized | Leave a comment

yum download only

 

To install package in RHEL6.x /CentOS 6.x,use below given command

yum install yum-plugin-downloadonly

To install package in RHEL5.x /CentOS 5.x,use below given command

yum install yum-downloadonly

After installation get completed,you can find two new options in yum command
Run the command yum --help for more information.

Downloadonly Plugin Options:

(1) --downloadonly : don’t update, just download

(2) --downloaddir=/path/to/directory : specifies an alternate directory to store packages

Notes:

(1) The downloadonly plugin can be enable/disable from /etc/yum/pluginconf.d/downloadonly.conf file. To enable the downloadonly, in downloadonly.conf file confirm “enabled=1″ (to disable “enabled=0″)

(2) Without using –downloaddir option,files are saved in by-default path /var/cache/yum/. Further from this path,you have to change directory into OS-architecture/channel/package-directory

Example. In this eg. path is /var/cache/yum/x86_64/6/base/packages/ (Reference from CentOS 6.5,arch:x86_64)

[root@localhost ~]# ls -l /var/cache/yum/x86_64/6/base/packages/
total 152
-rw-r--r--. 1 root root 154576 Mar  1  2013 vsftpd-2.2.2-11.el6_4.1.x86_64.rpm
[root@localhost ~]#

(3) This is not applicable to “yum groupinstall”.It is applicable to “yum install” and “yum update”.Whereas, you can use “yum groupinfo” to check the packges in a specific group

(4) By-default it downloads latest available package from yum repository.To download particular package,use the full package name.(example- vsftpd-2.2.2-11.el6)

How to download rpm file by using downloadonly plugin

After installing downloadonly plugin,we are ready to download rpm package.

Example: In this we are downloading vsftpd.By-default it will download to /var/cache/yum directory

yum install --downloadonly vsftpd

Check the path in dir /var/cache/yum . (After this directory path,the location of downloaded package may be differ as per Operating System Version and architecture)

Example:

[root@localhost ~]# ls -l /var/cache/yum/x86_64/6/base/packages/
total 152
-rw-r--r--. 1 root root 154576 Mar  1  2013 vsftpd-2.2.2-11.el6_4.1.x86_64.rpm
[root@localhost ~]#

How to download rpm file in specific directory by using downloadonly plugin

To download rpm file in specific directory, we will use option –downloaddir along with –downloadonly

Example: In this eg. we are creating new directory called packages, for downloading rpm into it.You can specify to any other accessible pre exist directory(like /opt , /tmp , user’s home directory) . Specify the path of destination directory in –downloaddir option

mkdir -p ~/packages
yum install --downloadonly --downloaddir=~/packages wget

Check the file,in specified directory

[root@localhost ~]# ls -l ~/packages/
total 636
-rw-r--r--. 1 root root 494344 Feb 11 16:24 wget-1.12-1.11.el6_5.x86_64.rpm
[root@localhost ~]#

Method 2: Using yumdownloader for downloading rpm files without installing it in linux system

By using yumdownloader,we can also download rpm packages from yum repositories without installng it.The yumdownloader command has lots of option.We will specify only few ,which are frequently we use.

With yumdownloader command,the package will be downloaded into the current path of user. (See given below examples)

Install yum-utils package.After installation ,we can use the yumdownloader command

yum install yum-utils

Download rpm packages with yumdownloader command

Syntax :

yumdownloader package-name

Example: In below given example,we have downloaded the package called zip . With ls command, we checked the downloaded file and its location.

[root@localhost ~]# yumdownloader zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosmirror.go4hosting.in
 * extras: centosmirror.go4hosting.in
 * updates: centosmirror.go4hosting.in
zip-3.0-1.el6.x86_64.rpm                                                     | 260 kB     00:00     
[root@localhost ~]# 
[root@localhost ~]# ls -lhrt zip-3.0-1.el6.x86_64.rpm 
-rw-r--r--. 1 root root 260K Jul  3  2011 zip-3.0-1.el6.x86_64.rpm
[root@localhost ~]# 
[root@localhost ~]#

Note: yumdownloader command has many option,you can check these option by command yumdownloader --help

[root@localhost ~]# yumdownloader --help
Loaded plugins: fastestmirror
Usage: "yumdownloader [options] package1 [package2] [package..]

Options:
  Plugin Options:

  Yum Base Options:
    -h, --help          show this help message and exit
    -t, --tolerant      be tolerant of errors
    -C, --cacheonly     run entirely from system cache, don't update cache
    -c [config file], --config=[config file]
                        config file location
    -R [minutes], --randomwait=[minutes]
                        maximum command wait time
    -d [debug level], --debuglevel=[debug level]
                        debugging output level
    --showduplicates    show duplicates, in repos, in list/search commands
    -e [error level], --errorlevel=[error level]
                        error output level
    --rpmverbosity=[debug level name]
                        debugging output level for rpm
    -q, --quiet         quiet operation
    -v, --verbose       verbose operation
    -y, --assumeyes     answer yes for all questions
    --version           show Yum version and exit
    --installroot=[path]
                        set install root
    --enablerepo=[repo]
                        enable one or more repositories (wildcards allowed)
    --disablerepo=[repo]
                        disable one or more repositories (wildcards allowed)
    -x [package], --exclude=[package]
                        exclude package(s) by name or glob
    --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
    --obsoletes         enable obsoletes processing during updates
    --noplugins         disable Yum plugins
    --nogpgcheck        disable gpg signature checking
    --disableplugin=[plugin]
                        disable plugins by name
    --enableplugin=[plugin]
                        enable plugins by name
    --skip-broken       skip packages with depsolving problems
    --color=COLOR       control whether color is used
    --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
    --setopt=SETOPTS    set arbitrary config and repo options

  yumdownloader options:
    --destdir=DESTDIR   destination directory (defaults to current directory)
    --urls              just list the urls it would download instead of
                        downloading
    --resolve           resolve dependencies and download required packages
    --source            operate on source packages
    --archlist=ARCHLIST
                        only download packages of certain architecture(s)
[root@localhost ~]#

 

Posted in Uncategorized | Leave a comment

yum rebuild db

  1. yum clean all
  2. mv /var/cache/yum/ /tmp/
  3. mv /var/lib/rpm/__db* /tmp/
  4. rpm –rebuilddb
Posted in Uncategorized | Leave a comment