Simple bash script to Clone A website

Code —-

echo “”
read SITE
mkdir $SITE
cd $SITE
wget -rkp -l6 -np -nH -N http://$SITE

How to Create a Custom Wordlist for bruteforcing from a website.

Creating Custom Wordlists For Password Brute Forcing 

       wget -r -l 2

Next step is to remove the weird characters. Don't worry, we can put them back. This primarily removes the HTML tags and such:

     grep -hr "" | tr '[:space:]' '\n' | sort | uniq > wordlist.lst

  egrep -v '('\,'|'\;'|'\}'|'\{'|'\<'|'\>'|'\:'|'\='|'\"'|'\/'|'\/'|'\['|'\]')' wordlist.lst | sort -u > wordlist.clean

   john --wordlist=wordlist.lst --rules --stdout | uniq > wordlist_Clean.lst        modify the rules so that it does a better job of adding in special characters (such as replacing all "i" with "1").

aticonfig examples


  1. Setting up fglrx for the first time.
       Single head :    aticonfig –initial –input=/etc/X11/xorg.conf
       Dual head   :    aticonfig –initial=dual-head –screen-layout=above
                        This command will generate a dual head configuration
                        file with the second screen located above the first
       Multi head  :    aticonfig –initial –heads=4 –adapter=1
                        This command will generate 4 adjacent X Screens
                        on adapter 1.  Use with -f to reduce previously configured heads.
  2. Setting up big desktop to horizontal and set overlay on secondary display.
                        aticonfig –dtop=horizontal –overlay-on=1
  3. Setting up modes for primary display.
                        aticonfig –resolution=0,1600×1200,1280×1024,1024×768
  4. Change tv geometry

                         aticonfig –tv-geometry=85×90+10-10
         This will set tv to 85% width (where 100% ==
         overscan) 90% height and shift 10 pixels right of centre
         and 10 pixels down of centre.

  5. Multiple display adapters.

       List adapters :  aticonfig –list-adapters
       Init 0 and 2  :  aticonfig –adapter=0,2 –initial
       Init all      :  aticonfig –adapter=all –initial
       MultiView     :  aticonfig –xinerama=on

  6. AMD Overdrive (TM).

       List adapters          :  aticonfig –list-adapters
       Get Clocks of 0        :  aticonfig –adapter=0 –od-getclocks
       Set new Clocks for 0   :  aticonfig –adapter=0 –od-setclocks=770,1126
       Test out 3D            :  atiode -P60 -H localhost:0; echo $?
       Check Temperature of 0 :  aticonfig –adapter=0 –od-gettemperature
       Commit changes for 0   :  aticonfig –adapter=0 –od-commitclocks

             atiode is a stress application you start with a required
             parameter -P which specifies the test duration and the optional
             -H parameter to target a specific display to use.  For example
             atiode -P 600 -H localhost:0 would test display 0 for 10 minutes
             the return code from the application is the test result
             0: Test successfully completed.
             1: Invalid command-line parameters.
             2: Test failed because of rendering errors.
             3: Target adapter not found.
             4: Test aborted due to unknown reason

  7. Framelock/Genlock with GL Sync module

       Set GL Sync connector parameters for particular adapter:
                     aticonfig –glsync-setconfig=0,0,2,0.0,3,8 –adapter=1
       Enable Genlock for particular display:
                     aticonfig –glsync-setgenlock=lvds,1,0 –adapter=1
       Enable Timing Master:
                     aticonfig –glsync-setgenlock=dfp3,0,1 –adapter=1
       Verify if the frequency is locked for particular display:
                     aticonfig –glsync-getgenlock=crt1 –adapter=1
       Set GL Sync output port RJ45_1:
                     aticonfig –glsync-setport=RJ45_1,1,BNC
       Reinitialize all genlock settings for all displays and adapters:
                     aticonfig –glsync-restart

X11 Forwarding over SSH *slackware*

SSH is a program for logging into a remote machine and for executing commands on a remote machine. It is possible to run X Window graphical applications over SSH also. X forwarding allows you to run remote X applications that open their windows on your local display.

To establish an X Window connection over SSH:

1. Make sure that openssh package has installed and ssh service is active on both server and client machines.
(OpenSSH is free version of SSH)

2. Login to server machine (remote computer) using SSH

ssh remote_user_name@remote_machine

and edit remote computer’s /etc/ssh/sshd_config file as remote root adding following lines and save.

AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

3. Restart ssh service on remote machine by executing following command as remote root.

/etc/rc.d/rc.sshd restart

4. On client machine (your computer), edit /etc/ssh/ssh_config file as root adding following lines and save.

ForwardAgent yes
ForwardX11 yes

5. To establish SSH connection with configured remote machine, execute following command from an X Terminal Emulator.

ssh -Y remote_user_name@remote_machine

6. After logging into remote machine, execute below command to check the value of display variable in remote host environment.


If you do not see anything when typing above command, set value by executing:

export DISPLAY=localhost:10.0

Now try to launch an X application on remote machine from client machine, for example:

xlogo &

* /etc/ssh/sshd_config and /etc/ssh/ssh_config files have required lines for X11 forwarding in commented form as system default. Instead of adding new lines, just uncomment related lines and check parameters.

* You need to open port “22” on remote network for WAN connections over SSH.

color support for ls *xterm*

executing ls command in “Terminal” and “Xterm” does not give me colorful output as in “Konsole”. To get colorful output in these X terminals in bash, add below lines to your ~/.bashrc file and restart X terminal.

# enable color support of ls and add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'


To enable the same function for your root shell, add above lines to /root/.bashrc file.

Adding Users to Sudoers File *slackware*

Users can execute commands that are usually restricted to the root account using sudo program. The sudo configuration file is /etc/sudoers.

Open /etc/sudoers file with your favorite text editor as root, then remove comment character, #, in front of line “%wheel ALL=(ALL) ALL” and save.

# visudo


# nano /etc/sudoers

# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

Change above line as in below and save file.

# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL

You need to add your user name to group wheel also.

# gpasswd -a user wheel

(Replace user with your user name)

Now you can execute some privileged commands using sudo as user without becoming root with su. For example it is possible to edit system file inittab as user executing below command.

# sudo nano /etc/inittab