Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Monday, January 21, 2013

Linux Terminal 101: How to Use Permissions


Permissions exist for Linux computers so more than one person can use a machine at one time and only be allowed to do certain things.


Friday, January 4, 2013

Share a Printer from XP to Windows 7

One common problem I have run into with clients is trying to share a printer connected to a Windows XP machine with Windows 7. There are lots of people out there that have USB connected printers attached to one computer, usually a Windows XP machine.
If you get a new laptop running Windows 7, it makes sense to share that printer so that any computer can print to it. Unfortunately, trying to print to an shared printer on XP from Windows 7 is not as simple as it should be!
In this article I will walk you through the steps for XP to Windows 7 printer sharing. I am assuming your printer is directly attached to a Windows XP machine and you want to print from a Windows 7 machine.
Step 1: First make sure that the printer on the XP machine is shared. You can do this by right-clicking on the printer and choosing Sharing.
share printer xp to 7
Click the Share this printer radio button and give your printer a share name. Make sure is less than 8 characters and does not contain any symbols.
share printer
Step 2: Make sure you can see the printer share from the network browsing area in Windows 7. You can do this by going to Control Panel and clicking on Network and Internet.
win 7 to xp printer sharing
Then click on View network computers and devices under Network and Sharing Center.
printer sharing win 7
At this point, you should see the name of your XP computer in the list of computers. Mine XP machine is called Aseem.
network printer sharing
Double-click on the computer name and you should see your shared printer in the list. Here you can try to add the printer by right-clicking on it and choosing Connect.
connect to printer
If everything goes perfectly, Windows 7 should automatically add the printer to your set of printers. However, if you get a message like “Cannot connect to printer”, follow the next steps.
Step 3: Click on Start and then click on Devices and Printers. At the top, click on the Add a printer link.
add printer win 7
Step 4: Next choose Add a local printer. Yes, that sounds counter-intuitive, but this is what you have to do!
local printer win 7
Step 5: Next, click Create a new port and choose Local port from the list of options.
create new local port
Step 6:  Click Next and in the Port name box, type in the path to the shared printer. It should be something like \\Aseem\HPXP, where Aseem is the name of your XP machine and HPXP is the shared name of the printer.
printer share name
Step 7: Now choose the printer driver from the list or download the latest driver for the printer and choose Have Disk. Note that if you printer is a little older, it’s a good idea to download the Windows 7 driver for the printer and click Have Disk.
add prin to win 7
That’s it! Windows 7 will load the driver and you’ll be able to print to the XP machine from Windows 7! The main things to remember are sharing the XP printer and downloading the latest driver for the printer on the Windows 7 machine.
If you have any problems sharing your printer on XP and printing from Windows 7, post a comment here and I will try to help! Enjoy!

Source link : http://helpdeskgeek.com/windows-7/xp-to-windows-7-printer-sharing/

Install Flash Player | Backtrack 5R3

  • As you may have noticed Flash Player does not work on Backtrack 5, so in order to fix this we first need to remove the current flash player by issuing the following commands:
root@bt:~# apt-get purge flashplugin-nonfree flashplugin-installer 
           gnash gnash-common mozilla-plugin-gnash swfdec-mozilla
root@bt:~# rm -f /usr/lib/firefox/plugins/*flash*
root@bt:~# rm -f /usr/lib/firefox-addons/plugins/*flash*
root@bt:~# rm -f /usr/lib/mozilla/plugins/*flash*
root@bt:~# rm -f ~/.mozilla/plugins/*flash*so
root@bt:~# rm -rfd /usr/lib/nspluginwrapper
  • Next up we will take care of the Flash Player:
root@bt:~# mkdir -p ~/.mozilla/plugins
root@bt:~# mkdir flash
root@bt:~# mv -f install_flash_player_11_linux.i386.tar.gz flash/
root@bt:~# cd flash/
root@bt:~/flash# tar xvfz install_flash_player_11_linux.i386.tar.gz 
root@bt:~/flash# cp -f libflashplayer.so ~/.mozilla/plugins/
  • We can test if flash player works over here
source link : http://www.backtrack-linux.org/wiki/index.php/Install_Flash_Player

Thursday, December 20, 2012

Useful slapt-get commands

Please refer to the documentation for slapt-get: man slapt-get, the HOWTOs at the VL Forum: slapt-get basics and gslapt basics or go to the slapt-get FAQ site for more advanced topics.
You may wish to try some of these slapt-get commands:
  • to list all the available packages from the source repository:
    slapt-get --available
  • to list only those packages that you have already installed:
    slapt-get --installed
  • to search the listings for specific package(s):
    slapt-get --search [packagename(s)]
  • to install (or to upgrade an already installed) package(s):
    slapt-get --install [packagename(s)]
  • to remove packages(s):
    slapt-get --remove [packagename(s)]
  • to clear your temp directory of downloaded packages:
    slapt-get --clean
  • to show a package(s) description:
    slapt-get --show [package(s)]
  • to reinstall an existing package:
    slapt-get --reinstall --install [package]
  • to downgrade a package:
    slapt-get --reinstall --install [exactpackagenameandnumbers]
  • to show a sorted, paged list of available packages from the source repository: slapt-get —available | sort | less
  • to show a sorted, paged list of installed packages on your system:
    slapt-get --installed|sort|less
  • to show a sorted, paged list of available, uninstalled packages:
    slapt-get --available|grep inst=no|sort|less
  • to show only available packages related to e.g. fluxbox:
    slapt-get --available|grep fluxbox
  • to show only available, uninstalled packages specifically packaged for VL5:
    slapt-get --available|grep inst=no|grep vl5|sort|less
  • to install all packages pertaining to e.g. fluxbox:
    slapt-get --available|grep fluxbox|awk '{print $1}'|sort|uniq|xargs -r slapt-get --install
  • to install every available package not yet installed (DANGER!):
    slapt-get --available|grep inst=no|awk '{print $1}'|sort|uniq|xargs -r slapt-get --install
     
    souce link : http://xpt.sourceforge.net/techdocs/nix/live/slax/slax02-SlackwarePackagesRepositories/single/ 

Wednesday, December 19, 2012

Upgrade KDE to 4.9.4 Slackware 14 64bit

KDE4.9
======

This is the KDE Software Compilation 4.9.4 for Slackware 14 and later.

You have to run Slackware 14 in order to use these packages!

The upgrade from Slackware's own 4.8.5 will be trivial.  I added five
updated dependencies (akonadi, qt, soprano, shared-desktop-ontologies and
virtuoso-ose).  One of those dependencies has been updated since my previous
KDE 4.9.3 packages: qt.
I updated several 'extragear' packages compared to Slackware 14, and two of
those are all new: kdevelop, kdevplatform, oxygen-gtk2, oxygen-gtk3
and kio-mtp.
Two KDE packages have been removed since the KDE 4.8.5 of Slackware 14:
* kdemultimedia has been split up into several smaller individual packages.
* ksecrets has been removed completely in the 4.9.x series.

NOTE:
* Possible issue when rebuilding these packages on 13.37: the new kwin
  requires at least mesa-7.10 and this is not installed by default.
  Slackware 13.37 has mesa-7.10.2 in the /testing directory though.  Use that.
  It looks like KDE 4.9.x is the last series which will actually build on 13.37.

NOTE:
About the language packs (KDEI) - for Slackware 32-bit as well as 64-bit:
* KDE localizations (language packs) are available in "x86_64/kdei". You only
  need one package (for your own language).  Don't let the "x86_64" in the
  directory name fool you, the language packs are useable on both platforms.
  translations/localizations.

NOTE:
Sources and scripts have been separated from the packages in my 'ktown
  repository starting with KDE 4.9-rc1.  If you want the sources for
  4.9.4, run the following command to download them:

  # rsync -av rsync://alien.slackbook.org/alien/ktown/source/4.9.4 .

-------------------------------------------------------------------------------

Below are the steps you need to take to install or upgrade to KDE 4.9.4.

Make sure you are not running KDE or even X !  If you are running an X session,
log out first, and if you are in runlevel 4 (graphical login) you first have to
go back to runlevel 3 (console) by typing "init 3".

To make it easy for you, here is a one-line command that downloads the whole
4.9.4 directory (excluding the sources), with 32-bit and 64-bit packages
(and be careful of the 'dot' at the end of that command, it is part of the
commandline !!):

  # rsync -av rsync://alien.slackbook.org/alien/ktown/14.0/4.9.4 .

Or else, if you want to download packages for just one of the two supported
architectures, you would run one of the following commands instead.
If you want only the 64-bit packages:
  # rsync -av --exclude=x86 rsync://alien.slackbook.org/alien/ktown/14.0/4.9.4 .
If you want only the 32-bit packages:
  # rsync -av --exclude=x86_64 rsync://alien.slackbook.org/alien/ktown/14.0/4.9.4 .

OK.  Assuming you just downloaded the bits you want from directory tree "4.9.4" 
and below that, you now change your current directory to where you found
this README (which is the directory called '4.9.4').  If you used one of the
above "rsync" commands then that would mean a simple:

  # cd 4.9.4

From within this directory, you run the following commands as root.  Note that
some of the old KDE package names are obsoleted too, they have been split up,
renamed or integrated:

  On Slackware 32-bit:
  # upgradepkg --reinstall --install-new x86/deps/*.t?z
  # upgradepkg --reinstall --install-new x86/kde/*.t?z
  # removepkg kdemultimedia
  # removepkg ksecrets

  On Slackware 64-bit:
  # upgradepkg --reinstall --install-new x86_64/deps/*.t?z
  # upgradepkg --reinstall --install-new x86_64/kde/*.t?z
  # removepkg kdemultimedia
  # removepkg ksecrets

  If you already have one or more non-english language packs installed:
  # upgradepkg x86_64/kdei/*.t?z
  
  If you want to have a non-english language pack installed but none is
  currently installed, substitute your country code instead of the 'XX'
  in the next command:
  # upgradepkg --install-new x86_64/kdei/kde-l10n-XX-*.t?z

  Check if any ".new" configuration files have been left behind by
  the upgradepkg commands.  Compare them to their originals and decide
  if you need to use them.
  # find /etc/ -name "*.new"
  A graphical (ncrses) tool for processing these "*.new" files is slackpkg:
  # slackpkg new-config

Then reboot your system.

===============================================================================
Eric Hameleers - alien at slackware dot com - 04dec012
 
souce link : http://repo.ukdw.ac.id/alien-kde/14.0/4.9.4/ 

Tuesday, December 18, 2012

Transparacy Conky di Slackware 14

Salam temen2 dan pengunjung setia gr33nc0d3-info. Kali ini mau share kan cara untuk men-transparasikan background pada conky | Slackware 14

Tambahkan 2 baris script ini pada conky.conf  :

#kwrite /etc/conky/conky.conf
own_window_type desktop
own_window_argb_visual yes

atau kalau temen2 mau conky.conf yang ane pake, silahkan click link below :
http://pastebin.com/DYWZS7m2

Command : Locate error ? | Slackware 14

root@darkstar:/# locate gslapt
locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db':  No such file or directory


nah solusinya mudah :

ketikkan pada terminal :

#updatedb

tunggu hingga selesai. Dan coba lagi command locate nya :D

mudah2an informasi ringan ini dapat membantu para pemula slackware 14 dalam mengatasi masalah ini. 

salam
gr33nc0d3

Cara Mengganti LILO Background | Mine : Slackware 14 64bit

Syarat & ketentuan :

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8 (Lebar  X Tinggi X Bit)


1. Download/siapkan 1 image file yang ukurannya sudah ditentukan dan simpan dengan ekstensi .BMP

2. Copy/Simpan ke dalam folder /boot

3. Edit lilo.conf yang berada didalam folder :
    #nano  /etc/lilo.conf

4. Cari baris berikut 
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp    ----->
ganti dengan nama file yang sudah anda siapkan
5. Tekan CTRL+O ---> ENTER

6.  ketikan baris perintah berikut :
     #/sbin/lilo -v 

7. Restart/Reboot PC/Laptop anda
    #reboot

Cara Install VLC di Slackware 14 64bit

Sesuai dengan judul di atas ...  maka dibawah ini adalah langkah2nya :

1. Download file dari:
#wget http://www.slackware.com/~alien/slackbuilds/vlc/pkg64/14.0/vlc-2.0.5-x86_64-1alien.txz

2. Setelah selesai download
#upgradepkg --install-new vlc-2.0.5-x86_64-1alien.txz

Mudah bukan? bagi yang sudah expert sebagai reminder saja ...

Monday, December 17, 2012

Installation of flash player for Slackware 14 64bit

Bagi pengguna Slackware 14 64bit yang ingin meng-install flashplayer untuk Mozilla, mudah2an tutorial singkat ini bisa membantu temen2/pengunjung setia blog saya ini.

1. Download Flash-player-plugins di :
# wget http://slackbuilds.org/slackbuilds/14.0/multimedia/flash-player-plugin.tar.gz

2. Download juga Installer nya di :
#wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.243/install_flash_player_11_linux_x86_64.tar.gz

3. Extract file Flash-player-plugins nya
# tar -xf flash-player-plugin.tar.gz

4. Masuk dalam folder flash-player-plugin
#cd flash-player-plugin

5. Ketikkan baris perintah berikut :
#doinst.sh flash-player-plugin.info slack-desc

6. Copy File install_flash_player_11_linux_x86_64.tar.gz kedalam folder flash-player-plugin
#cp /download/install_flash_player_11_linux_x86_64.tar.gz /download/flash-player-plugin
** dlm hal ini contoh foldernya ada dalam folder download

7. Teruskan dengan perintah dibawah ini :
#sh flash-player-plugin.SlackBuild

dan tunggu hingga proses "build " selesai :

Slackware package maker, version 3.14159.

Searching for symbolic links:
usr/share/pixmaps/flash-player-properties.png -> ../icons/hicolor/48x48/apps/flash-player-properties.png

Making symbolic link creation script:
( cd usr/share/pixmaps ; rm -rf flash-player-properties.png )
( cd usr/share/pixmaps ; ln -sf ../icons/hicolor/48x48/apps/flash-player-properties.png flash-player-properties.png )

Unless your existing installation script already contains the code
to create these links, you should append these lines to your existing
install script. Now's your chance. :^)

Would you like to add this stuff to the existing install script and
remove the symbolic links ([y]es, [n]o)? y


Removing symbolic links:
removed './usr/share/pixmaps/flash-player-properties.png'

Updating your ./install/doinst.sh (prepending symlinks)...

This next step is optional - you can set the directories in your package
to some sane permissions. If any of the directories in your package have
special permissions, then DO NOT reset them here!

Would you like to reset all directory permissions to 755 (drwxr-xr-x) and
directory ownerships to root.root ([y]es, [n]o)? n

Creating Slackware package:  /tmp/flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz

./
install/
install/doinst.sh
install/slack-desc
usr/
usr/bin/
usr/bin/flash-player-properties
usr/share/
usr/share/applications/
usr/share/applications/flash-player-properties.desktop
usr/share/pixmaps/
usr/share/icons/
usr/share/icons/hicolor/
usr/share/icons/hicolor/22x22/
usr/share/icons/hicolor/22x22/apps/
usr/share/icons/hicolor/22x22/apps/flash-player-properties.png
usr/share/icons/hicolor/48x48/
usr/share/icons/hicolor/48x48/apps/
usr/share/icons/hicolor/48x48/apps/flash-player-properties.png
usr/share/icons/hicolor/32x32/
usr/share/icons/hicolor/32x32/apps/
usr/share/icons/hicolor/32x32/apps/flash-player-properties.png
usr/share/icons/hicolor/16x16/
usr/share/icons/hicolor/16x16/apps/
usr/share/icons/hicolor/16x16/apps/flash-player-properties.png
usr/share/icons/hicolor/24x24/
usr/share/icons/hicolor/24x24/apps/
usr/share/icons/hicolor/24x24/apps/flash-player-properties.png
usr/share/kde4/
usr/share/kde4/services/
usr/share/kde4/services/kcm_adobe_flash_player.desktop
usr/lib64/
usr/lib64/mozilla/
usr/lib64/mozilla/plugins/
usr/lib64/mozilla/plugins/libflashplayer.so
usr/lib64/kde4/
usr/lib64/kde4/kcm_adobe_flash_player.so
usr/doc/
usr/doc/flash-player-plugin-11.2.202.243/
usr/doc/flash-player-plugin-11.2.202.243/flash-player-plugin.SlackBuild
usr/doc/flash-player-plugin-11.2.202.243/readme.txt

Slackware package /tmp/flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz created
8. Perhatikan baris terakhir diatas yang telah diberi effect cetak tebal
Hasil BUILD tadi tersimpan dalam :
/tmp/flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz 

9. Langkah terkahir :
#installpkg  /tmp/flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz 

Tunggu hingga selesai. Contoh seperti dibawah ini :
Verifying package flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz.
Installing package flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz:
PACKAGE DESCRIPTION:
# flash-player-plugin (flash plugin for web browsers)
#
# Provides Adobe Flash plugin for browsers that recognize
# /usr/lib(64)/mozilla/plugins as a valid plugin directory
#
# Plugin is subject to Adobe terms of use:
#  https://www.adobe.com/misc/terms.html
#
Executing install script for flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz.
Package flash-player-plugin-11.2.202.243-x86_64-2_SBo.tgz installed.

Slapt-get Slackware 14

Bagi temen yang baru mencoba slackware 14 dan tidak menemukan slapt-get (apt-get = Ubuntu) .... 

Solusinya sbb :

1. Jalankan terminal
#wget http://software.jaos.org/slackpacks/14.0-x86_64/slapt-get/slapt-get-0.10.2o-x86_64-1.tgz

2. Tunggu download nya hingga selesai.
setelah selesai download :
#installpkg slapt-get-0.10.2o-x86_64-1.tgz

3. Silahkan test run command slapt-get pada #
#slapt-get

 

Install Atheros (AR9287) Wireless Network Adapter on Kernel 3.2.2

1. Downloading driver

2. Extracting
1bash-# tar -jxf compat-wireless-3.6-8-1.tar.bz2

3. Compile & Install
1bash-# cd compat-wireless-3.3-rc1-2
2bash-# ./scripts/driver-select ath9k
3bash-# make
4bash-# make install

4. Enabling
unload all network driver
1bash-# make unload

module probe
1bash-# modprobe ath9k

check wirelles network
1bash-# iwconfig

5. Restart

source link : http://abi71.wordpress.com/2012/02/02/install-atheros-ar9285-wireless-network-adapter-on-kernel-3-2-2/ 

Tuesday, December 11, 2012

Backtrack 5 Update Python code

Bagi teman-teman yang mengalami kesulitan dalam meng-update system/tools di Backtrack 5 ... copy-paste script dibawah ini dan simpan dengan "nama apa saja".py ... contoh : btupdate.py

#!/usr/bin/python
# Update script for Backtrack 5 R2/R3.
# Author: sickness
# Thanks goes to: g0tmi1k
# #########################################
#
# Depending on how you run the script it may cause issues with your Backtrack installation.
# DO NOT RUN IT UNLESS YOU KNOW WHAT YOU ARE DOING.
# Further more I am not responsable if your Backtrack OS starts encountering issues.
#
###########################################

# Imports
import sys, urllib2, subprocess, argparse, os
from time import sleep
from argparse import RawTextHelpFormatter

GREEN = '\033[92m'
END = '\033[0m'
RED = '\033[31m'

# Update Functions
def internet_check():
    try:
        urllib2.urlopen("http://www.google.com", timeout=1)
        print "\n"
        print GREEN + "[>] Internet connection: available!" + END
        sleep(0.1)
    except:
        print "\n"
        print RED + "[>] Internet connection: unavailable!" + END
        sys.exit()

def backtrack_update():
    print GREEN + "[>] Updating & cleaning Backtrack, please wait...\n" + END
   
    if subprocess.Popen("ls -l /pentest/web/scanners/ 2>/dev/null | grep -q 0", shell=True).wait() == 0:
        subprocess.Popen("rm -rf /pentest/web/scanners/", shell=True).wait()
       
    if subprocess.Popen("apt-get update && apt-get -y dist-upgrade", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Backtrack updated & cleaned successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Backtrack\n" + END
        sleep(2)

def exploit_db():
    print GREEN + "[>] Updating Exploit-DB, please wait...\n" + END

    if subprocess.Popen("cd /pentest/exploits/exploitdb/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Exploit-DB updated successfully!" + END
    else:
        print RED + "[>] Exploit-DB's SVN didn't work. Updating manually. Please wait...\n" + END
        if subprocess.Popen("wget http://www.exploit-db.com/archive.tar.bz2", shell=True).wait() == 0:
            subprocess.Popen("tar xvfj archive.tar.bz2 > /dev/null", shell=True).wait()
            subprocess.Popen("rm -rf /pentest/exploits/exploitdb/platforms/", shell=True).wait()
            subprocess.Popen("mv -f platforms/ files.csv /pentest/exploits/exploitdb/", shell=True).wait()
            subprocess.Popen("rm -rf archive.tar.bz2*", shell=True).wait()
            print "\n"
            print GREEN + "[>] Exploit-DB updated successfully!" + END
        else:
            print "\n"
            print RED + "[>] Failed to update Exploit-DB\n" + END
            sleep(2)

def s_e_t():
    print GREEN + "[>] Updating SET, please wait...\n" + END

    if subprocess.Popen("cd /pentest/exploits/set/ && ./set-update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] SET updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update SET\n" + END
        sleep(2)

def warvox():
    print RED + "[>] The following software has been completely integrated within Metasploit, update might fail!" + END
    print GREEN + "[>] Updating Warvox, please wait...\n" + END

    if subprocess.Popen("cd /pentest/telephony/warvox/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Warvox updated successfully!" + END
    elif subprocess.Popen("apt-get remove warvox -y && rm -rf /pentest/telephony/warvox/ && svn checkout http://www.metasploit.com/svn/warvox/trunk/ /pentest/telephony/warvox/", shell=True).wait() == 0:
    #elif subprocess.Popen("svn checkout http://www.metasploit.com/svn/warvox/trunk/ /pentest/telephony/warvox/", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Warvox updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Warvox\n" + END
        sleep(2)

def giskismet():
    print GREEN + "[>] Updating Giskismet, please wait...\n" + END

    if subprocess.Popen("cd /pentest/wireless/giskismet/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Giskismet updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Giskismet\n" + END
        sleep(2)

def dedected():
    print GREEN + "[>] Updating Dedected, please wait...\n" + END

    if subprocess.Popen("cd /pentest/telephony/dedected/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Dedected updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Dedected\n" + END
        sleep(2)

def msf():
    print GREEN + "[>] Updating Metasploit, please wait...\n" + END

    if subprocess.Popen("msfupdate", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Metasploit updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Metasploit\n" + END
        sleep(2)

def w3af():
    print GREEN + "[>] Updating W3AF, please wait...\n" + END

    if subprocess.Popen("cd /pentest/web/w3af/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] W3AF updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update W3AF\n" + END
        sleep(2)

def nikto():
    print RED + "[>] The following software hasn't been updated for an extensive period of time, update might fail!" + END
    print GREEN + "[>] Updating Nikto, please wait...\n" + END

    if subprocess.Popen("cd /pentest/web/nikto/ && ./nikto.pl -update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Nikto updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Nikto\n" + END
        sleep(2)

def fasttrack():
    print GREEN + "[>] Updating Fast-track, please wait...\n" + END
    if subprocess.Popen("cd /pentest/exploits/fasttrack/ && ./fast-track.py -c 1", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Fast-track updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Fast-track\n" + END
        sleep(2)

def pyrit():
    print GREEN + "[>] Checking to see if Pyrit is installed" + END

    if subprocess.Popen("pyrit > /dev/null", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Pyrit installed!" + END
    else:
        print GREEN + "[>] Installing Pyrit, please wait...\n" + END
        subprocess.Popen("apt-get -y install libssl-dev scapy python-dev", shell=True).wait()
        subprocess.Popen("svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn", shell=True).wait()
        subprocess.Popen("cd pyrit_svn/pyrit && python setup.py build && python setup.py install", shell=True).wait()
        subprocess.Popen("rm -rf pyrit_svn", shell=True).wait()
        print "\n"
        print GREEN + "[>] Pyrit installed successfully!" + END
        sleep(2)

def nmap():
    print GREEN + "[>] Updating Nmap (OS fingerprinting), please wait...\n" + END  
    if subprocess.Popen("wget http://nmap.org/svn/nmap-os-db -O /usr/local/share/nmap/nmap-os-db", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Nmap fingerprint updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update nmap fingerprint\n" + END
        sleep(2)

    print GREEN + "[>] Updating Nmap (scripting engine), please wait...\n" + END  
    if subprocess.Popen("nmap -script-updatedb", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Nmap scripting engine updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update nmap  scripting engine\n" + END
        sleep(2)

def fimap():
    print GREEN + "[>] Updating Fimap & installing MSF plugin, please wait...\n" + END

    if subprocess.Popen("cd /pentest/web/fimap/ && ./fimap.py --update-def", shell=True).wait() == 1:
        print "\n"
        print GREEN + "[>] Fimap updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Fimap\n" + END
        sleep(2)

def wpscan():
    print GREEN + "[>] Updating WPScan, please wait...\n" + END
   
    if subprocess.Popen("find /root/.gem/ruby/*/bin/ -name nokogiri | egrep '.*' > /dev/null", shell=True).wait() == 1:    #gem list nokogiri | grep -q nokogiri
        print GREEN + "[>] Installing the required ruby gem, please wait...\n" + END
        if subprocess.Popen("gem install --user-install nokogiri", shell=True).wait() == 0:
            print GREEN + "[>] Ruby gem installed successfully!" + END
        else:
            print RED + "[>] Failed to install ruby gem\n" + END

    if subprocess.Popen("cd /pentest/web/wpscan/ && ./wpscan.rb --update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] WPScan updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update WPScan\n" + END
        sleep(2)

def joomscan():
    print GREEN + "[>] Updating JoomScan, please wait...\n" + END

    if subprocess.Popen("cd /pentest/web/joomscan/ && perl joomscan.pl update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] JoomScan updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update JoomScan\n" + END
        sleep(2)

def sqlmap():
    print GREEN + "[>] Updating SQLMap, please wait...\n" + END

    if subprocess.Popen("cd /pentest/database/sqlmap/ && python sqlmap.py --update", shell=True).wait() == 1:
        print "\n"
        print GREEN + "[>] SQLMap updated successfully!" + END
    elif subprocess.Popen("cd /pentest/database/sqlmap/ && ./sqlmap.py --update", shell=True).wait() == 1: # svn update
        print "\n"
        print GREEN + "[>] SQLMap updated successfully!" + END
    #elif subprocess.Popen("apt-get remove sqlmap && rm -rf /pentest/database/sqlmap/ && svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap /pentest/database/sqlmap/", shell=True).wait() == 1:
    elif subprocess.Popen("svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap /pentest/database/sqlmap/", shell=True).wait() == 1:
        print "\n"
        print GREEN + "[>] SQLMap updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update SQLMap\n" + END
        sleep(2)

def hexorbase():
    print GREEN + "[>] Updating HexorBase please wait...\n" + END

    if subprocess.Popen("cd /pentest/database/hexorbase/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] HexorBase updated successfully!" + END
    #elif subprocess.Popen("apt-get remove hexorbase && rm -rf /pentest/database/hexorbase/ && svn checkout http://hexorbase.googlecode.com/svn/ /pentest/database/hexorbase/", shell=True).wait() == 1:
    elif subprocess.Popen("svn checkout http://hexorbase.googlecode.com/svn/ /pentest/database/hexorbase/", shell=True).wait() == 1:
        print "\n"
        print GREEN + "[>] HexorBase updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update HexorBase\n" + END
        sleep(2)

def sqlninja():
    print GREEN + "[>] Updating SQLNinja, please wait...\n" + END

    if subprocess.Popen("apt-get remove sqlninja -y && rm -rf /pentest/database/sqlninja && svn co https://sqlninja.svn.sourceforge.net/svnroot/sqlninja /pentest/database/sqlninja", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] SQLNinja updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update SQLNinja\n" + END
        sleep(2)

def openvas():
    print GREEN + "[>] Updating OpenVAS, please wait...\n" + END

    if subprocess.Popen("openvas-nvt-sync", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] OpenVAS updated successfully!" + END

    else:
        print "\n"
        print RED + "[>] Failed to update OpenVAS\n" + END
        sleep(2)

def aircrack():
    print GREEN + "[>] Updating AirCrack-NG & Airodump, please wait...\n" + END

    subprocess.Popen("apt-get install libssl-dev", shell=True).wait()
    if subprocess.Popen("cd /pentest/wireless/aircrack-ng/ && svn update", shell=True).wait() == 0:
        subprocess.Popen("cd /pentest/wireless/aircrack-ng/scripts/ && chmod a+x airodump-ng-oui-update && ./airodump-ng-oui-update", shell=True).wait()
        print "\n"
        print GREEN + "[>] AirCrack-NG & Airodump updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update AirCrack-ng\n" + END
        sleep(2)
       
def webhandler():
    print GREEN + "[>] Updating WebHandler, please wait...\n" + END

    if subprocess.Popen("cd /pentest/backdoors/web/webhandler/ && python webhandler.py --update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] WebHandler updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update WebHandler\n" + END
        sleep(2)
       
def beef():
    print GREEN + "[>] Updating BeEF, please wait...\n" + END

    if subprocess.Popen("cd /pentest/web/beef/ && ./update-beef", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] BeEF updated successfully!" + END
    else:
        print RED + "[>] Unable to update BeEF normally. Downloading a fresh copy, please wait...\n" + END
        if subprocess.Popen("mv -f /pentest/web/beef{,_old} && cd /pentest/web/ && git clone git://github.com/beefproject/beef.git && cd /pentest/web/beef/ && ./update-beef", shell=True).wait() == 0:
            print "\n"
            print GREEN + "[>] BeEF updated successfully!" + END
        else:
            print "\n"
            print RED + "[>] Failed to update BeEF\n" + END
            sleep(2)
       
def wifite():
    print GREEN + "[>] Updating WiFite, please wait...\n" + END

    if subprocess.Popen("cd /pentest/wireless/wifite/ && python wifite.py -upgrade", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] WiFite updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update WiFite\n" + END
        sleep(2)
       
def nessus():
    if subprocess.Popen("ls -l /etc/init.d/nessusd 2>/dev/null | grep -q 0", shell=True).wait() == 0:
        print GREEN + "[>] Updating Nessus, please wait...\n" + END
        nessusrunning = False
        if subprocess.Popen("ps -A | grep nessus > /dev/null", shell=True).wait() == 0:
            nessusrunning = True
           
        if subprocess.Popen("/etc/init.d/nessusd start && sleep 10 && nessus-update-plugins", shell=True).wait() == 0:
            print "\n"
            print GREEN + "[>] Nessus updated successfully!" + END
        else:
            print "\n"
            print RED + "[>] Failed to update Nessus\n" + END
            sleep(2)
       
        if nessusrunning == False:
            subprocess.Popen("/etc/init.d/nessusd stop", shell=True).wait()
    else:
        print RED + "[>] You do not have Nessus installed. Skipping...\n" + END
       
def fernwificracker():
    print GREEN + "[>] Updating Fern WIFI Cracker, please wait...\n" + END

    if subprocess.Popen("cd /pentest/wireless/fern-wifi-cracker/ && svn update", shell=True).wait() == 0:
        print "\n"
        print GREEN + "[>] Fern WIFI Cracker updated successfully!" + END
    else:
        print "\n"
        print RED + "[>] Failed to update Fern WIFI Cracker\n" + END
        sleep(2)
       
def system():
    backtrack_update()

def tools():
    exploit_db()
    s_e_t ()
    warvox()
    giskismet()
    dedected()
    msf()
    w3af()
    nikto()
    fasttrack()
    pyrit()
    nmap()
    fimap()
    wpscan()
    joomscan()
    sqlmap()
    hexorbase()
    sqlninja()
    openvas()
    aircrack()
    webhandler()
    beef()
    wifite()
    nessus()
    fernwificracker()
   
def all():
    system()
    tools()
  
def tryharder():
    print "\n"
    print RED + "[>] Wrong choice, possible choices are: system, tools, all\n" + END

def complete():
    print GREEN + "[>] Cleaning up, please wait...\n" + END
    subprocess.Popen("rm -f /root/fimap.log", shell=True).wait()
    subprocess.Popen("apt-get -y autoremove && apt-get -y clean", shell=True).wait()
    print GREEN + "[>] Cleaned successfully!" + END
    print "\n"
    print GREEN + "[>] Backtrack update completed successfully!\n" + END
    sys.exit()

# Main
if __name__ == "__main__":
    parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description='''[>] Update script for Backtrack 5 R2/R3\n[>] Author: sickness \n[>] Version: 2.0''')
    parser.add_argument('--update', help="Select what to update: system, tools, all")

    args = parser.parse_args()
    if len(sys.argv) > 4:
        parser.print_help()
        sys.exit()
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit()

    internet_check()

    if args.update == "system":
        system()
        complete()
    elif args.update == "tools":
        tools()
        complete()
    elif args.update == "all":
        all()
        complete()
    else:
        tryharder()

FIXED : WPscan error - Backtrack 5R3

Apakah error ini terjadi waktu anda menjalankan command wpscan ?

[ERROR] RubyGem version error: typhoeus(0.2.4 not = 0.4.2)

Error tersebut timbul karena wpscan membutuhkan versi yang lebih tinggi typhoeus nya ? 

nah cara update nya gini :
#gem install typhoeus -v 0.4.2

Sunday, December 9, 2012

Copy File dari Partisi Linux - Backtrack 5

The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions.
The ext4 or fourth extended filesystem is a journaling file system for Linux, developed as the successor to ext3.

It was born as a series of backward compatible extensions to remove 64-bit storage limits and add other performance improvements to ext3.However, other Linux kernel developers opposed accepting extensions to ext3 for stability reasons and proposed to fork the source code of ext3, rename it as ext4, and do all the development there, without affecting the current ext3 users
Ext2Read is an explorer like utility to explore ext2/ext3/ext4 files. It now supports LVM2 and EXT4 extents. It can be used to view and copy files and folders. It can recursively copy entire folders. It can also be used to view and copy disk and file
You can download Ext2Read from here
Screenshot
Ext2Fsd is an ext2 file system driver for Windows 2000,  XP, Vista. It’s a free software and everyone can distribute and modify it under GPL2.
Procedure o follow
Important Note:- When creating/formatting the ext4 filesystem, make sure to add “-O ^extent” which means disabling the “extent” feature bit. The following steps will not work if your ext4 filesystem still has “extent” feature enabled. ext2 and ext3 partitions should be fine.
First Download ext2fsd from here
Right-click the downloaded file and click Properties. Set the compatibility mode to “Windows Vista Service Pack 2? and check “Run as administrator”.
Run the ext2fsd installer. During install, we recommend you uncheck the “enable write access” feature to safeguard against losing data in your Linux partitions.
Restart your Windows 7 PC and run the Ext2 Volume Manager from Start Menu.
Important Note:- Use these tools with your own risk if you don't use them properly it will remove your linux partition data
If you have any other tools to do this you share with us.

source link : http://www.ubuntugeek.com/how-to-read-ext3ext4-linux-partition-from-windows-7.html