Tuesday, December 31, 2013

How to Install GRUB Customizer 4 in Ubuntu / Debian linux

GRUB Customizer is a graphical front end  for managing famous boot loader GRUB 2, 




Howto Install Grub Customizer


$ sudo add-apt-repository ppa:danielrichter2007/grub-customizer

$ sudo apt-get update

$ sudo apt-get install grub-customizer

Sunday, December 29, 2013

Shutdown your ubuntu / Debian system with a USB Pendrive

Shutdown your ubuntu / Debian system with a USB Pendrive

It is for fun !!! and a utility!!!

First  find out the vendorId and productId of your USB stick:
$ lsusb
 
my output
Bus 002 Device 002: ID 13fe:3600 Kingston Technology Company Inc.  
 
here
13fe - vendor Id
3600 - Product Id

Now create a file in: /etc/udev/rules.d/
 
I was created file :  100-usb-device-action.rules 
Then add the following line.
ACTION=="add", ATTRS{idVendor}=="13fe", ATTRS{idProduct}=="3600", RUN+="/sbin/shutdown -h now"
 
Substitute your vendorid and ProductID
After saving the file . Just plug your USB Pendrive in any USB Port . Your System will Shutdown!!!!

Thursday, October 31, 2013

Nikto : Open Source Web Server Scanner for Ubuntu / Debian Linux


Nikto is an Open Source (GPL) web server scanner which scans your webserver against more than 6500 potentially dangerous files/CGIs, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers. It has a very good plugin support

What Nikto can do.

    SSL Support (Unix with OpenSSL or maybe Windows with ActiveState's
    Perl/NetSSL)
    Full HTTP proxy support
    Checks for outdated server components
    Save reports in plain text, XML, HTML, NBE or CSV
    Template engine to easily customize reports
    Scan multiple ports on a server, or multiple servers via input file (including nmap output)
    LibWhisker's IDS encoding techniques
    Easily updated via command line
    Identifies installed software via headers, favicons and files
    Host authentication with Basic and NTLM
    Subdomain guessing
    Apache and cgiwrap username enumeration
    Mutation techniques to "fish" for content on web servers
    Scan tuning to include or exclude entire classes of vulnerability
    checks
    Guess credentials for authorization realms (including many default id/pw combos)
    Authorization guessing handles any directory, not just the root
    directory
    Enhanced false positive reduction via multiple methods: headers,
    page content, and content hashing
    Reports "unusual" headers seen
    Interactive status, pause and changes to verbosity settings
    Save full request/response for positive tests
    Replay saved positive requests
    Maximum execution time per target
    Auto-pause at a specified time
    Checks for common "parking" sites
    Logging to Metasploit
    Thorough documentation

Official site
To install in ubuntu / debian
$ sudo apt-get install nikto

Full installation of nikto will offer lot of options
$ nikto will give the list of options

For simple test

$ sudo nikto -h www.yoursite.com

output will we like this
abc@abc-desktop:~$ sudo nikto -h www.xxxx.com
- Nikto v2.1.4
---------------------------------------------------------------------------
+ Target IP:          202.18.233.233
+ Target Hostname:    www.abcx.com
+ Target Port:        80
+ Start Time:         2013-10-32 08:29:09
---------------------------------------------------------------------------
+ Server: Apache/2.2.22 (Debian)
+ Retrieved x-powered-by header: PHP/5.4.4-14+deb7u5

+ Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
- Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP method ('Allow' Header): 'TRACE' is typically only used for debugging and should be disabled. This message does not mean it is vulnerable to XST.
+ OSVDB-0: ETag header found on server, inode: 3965147, size: 2857, mtime: 0x433a88acc26c0
+ PHP/5.2.6-1+lenny3 appears to be outdated (current is at least 5.2.6RC4)
+ mod_perl/2.0.4 appears to be outdated (current is at least 5.8)

Wednesday, October 9, 2013

Linux Troubleshooting with dmesg command

During  bootup process, kernel gets loaded into the system memory and it controls the entire system.

During the bootup process , kernel displays number of messages and hardware divice information.

These messages will keep in a ring buffer. You can use these messages for sytem Troubleshooting. You can see these messages by using dmesg command.

1. open a terminal and type

  $ dmesg |more


2. To see the status of Network

  $ dmesg | grep eth

3. To see the memory status

  $ dmesg | grep Memory

4. for clearing dmesg buffer

  $ dmesg -c

Thursday, September 26, 2013

How to Check motherboard manufacturer, product name, version and serial number in Ubuntu Linux

 If you are a Hardware enthusiast , some times you need to check motherboard details of a system.

Open a terminal and Use the following command


$ sudo dmidecode | grep -i 'Base Board Information' -A4 -B1

Friday, July 19, 2013

How to Install FreeBasic For Beaglebone Black in Ubuntu and Debian Linux

FreeBASIC is a free/open source (GPL), 32-bit BASIC compiler for Microsoft Windows, DOS and Linux.

Now it is available for Beaglebone Black Arm7

How to install FreeBASIC in Debian

BBB: debian wheezy
download: fbc-bbb-debian.tar.gz

cd fbc-bbb-debian & sudo ./install.sh -i
fbc -arch arm7 -gen gcc xxx.bas


uninstall:
sudo ./install.sh -u


How to install FreeBASIC in UBUNTU 


download: fbc-bbb-ubuntu.tar.gz
cd fbc-bbb-ubuntu & sudo ./install.sh -i
fbc -arch arm7 -gen gcc xxx.bas

uninstall:
sudo ./install.sh -u

FreeBasic Documentation : http://www.freebasic.net/

https://www.facebook.com/BeagleboneBlack

Wednesday, June 26, 2013

How to Install rtl8192cu based Wifi on the Beaglebone Black (BBB)

How to Install  rtl8192cu based Wifi on the Beaglebone Black (BBB)



 
$opkg update
$opkg install kernel-dev
$opkg install kernel-headers


Now reboot Your System

Run the Following Commands
$ ln -s /usr/src/kernel /lib/modules/$(uname -r)/build
$ cd ~
$ git clone git://github.com/cmicali/rtl8192cu_beaglebone.git
$ cd rtl8192cu_beaglebone
$ make CROSS_COMPILE=""



Now Install the rtl8192cu  driver

$mv 8192cu.ko /lib/modules/$(uname -r)
$depmod -a
$cd /etc/modules-load.d
$echo "8192cu" > rtl8192cu-vendor.conf


Blacklist the old RealTek wifi drivers

$cd /etc/modprobe.d
$echo "install rtl8192cu /bin/false" >wifi_blacklist.conf
$echo "install rtl8192c_common /bin/false" >>wifi_blacklist.conf
$echo "install rtlwifi /bin/false" >>wifi_blacklist.conf


Edit /var/lib/connman/settings and enable WIFI

[global]
OfflineMode=false

[Wired]
Enable=true
Tethering=false

[WiFi]
Enable=true
Tethering=false

Encrypt your passphrase

$ wpa_passphrase YourSSID YourPassphrase

Edit /var/lib/connman/wifi.config and set it to the following

[service_home]
Type=wifi
Name=YourSSID
Passphrase=YourEncryptedPassphrase


Plug in your WIFI adaptor and reboot

$shutdown -r 0


Sources :  bonenotes.tumblr.com/
nomel.org/post/30357133735/beaglebone-tutorial-how-to-compile-kernel-modules-and

Tuesday, June 18, 2013

How to Convert Document Formats in Ubuntu / Debian Linux : unoconv

unoconv converts between any document format that OpenOffice understands.

It supports  document formats like Open Document Format (.odt), MS Word (.doc), MS Office Open/MS OOXML (.xml),LaTeX 2e (.ltx), pdf, HTML, XHTML, RTF, Docbook (.xml), and more.

 It also supports image files JPG, BMP,  GIF, PNG and more
 unoconv supports Spreadsheet file formats also

Requirements
unoconv is written in python. It needs a recent LibreOffice or OpenOffice with UNO bindings.


It Supports OpenOffice on Linux, Windows and MacOSX

How to install unoconv in ubuntu / debian Linux

$ sudo apt-get install unoconv

Usage

it is a command line utility. read man page for more details

    unoconv -f pdf your-document.odt
    unoconv -f doc your-document.odt
    unoconv -f xsl your-spreadsheet.csv
    unoconv -f jpg your-image.png
   

Monday, June 10, 2013

How to instal Python 2.6 in ubuntu 12.04 and Ubuntu 13.04


 According to https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/UbuntuDesktop "Python 2.6 is no longer available for install". Some legacy software that runs only on Python 2.6.

 You can use the following

 PPA: https://launchpad.net/~fkrull/+archive/deadsnakes

How to install PPA:
sudo add-apt-repository ppa:fkrull/deadsnakes

Run Update:
sudo apt-get update

Install your flavor:
sudo apt-get install python2.6 python2.6-dev

Sunday, June 9, 2013

How to Install and Test Beaglebone black in Ubuntu / Debian Linux



The Use and working of Beaglebone Black is very simple. You need only BBB and a USB cable (Supplied with BBB). In Ubuntu / Debian Linux you just download this file Download here and install it.

How to install downloaded file.

Open a terminal and type the following

$ chmod 755 mkudevrule.sh
$ ./mkudevrule.sh

This script will create a new file called 73-beaglebone.rules in /etc/udev/rules.d/

 Now  Plug your BBB to Ubuntu System through the USB Cable

Now BBB establish an adhoc Network Connection through USB

After a short time check the connectivity


The BBB will have an IP address, so using Chrome or Firefox (not Internet Explorer) connect to the URL http://192.168.7.2 (Chrome or chromium Browser)

Now You can see a web page served by BBB.
Top of the web page you can see the serial number of your board


Now Open a terminal and type

$ ssh root@192.168.7.2

Now it will prompt a security warning  type 'yes' or click on 'yes'

Now it will ask for PASSWORD.  There is no password so press Enter