29 Ekim 2017 Pazar

How To Install Oracle Java 8 In Debian Via Repository [JDK8]

Oracle Java 8 was released yesterday and it can be installed in Debian by using the WebUpd8 Java PPA repository.

Usually, the packages available in Launchpad PPAs don't support Debian because they are built against specific Ubuntu libraries, but since the WebUpd8 Oracle Java PPA contains just an installer, it works on Debian too.

Using this PPA repository, you'll be able to install Oracle Java 8 (which includes both JRE8 and JDK8) in Debian for both 32bit and 64bit as well as ARM (ARM v6/v7 Hard Float ABI - there's no JDK 8 ARM Soft Float ABI archive available for download on Oracle's website).

The installer automatically downloads and installs Oracle JDK8, but no actual Java files are available in our repository (that's not allowed by the Oracle Java license).

For Ubuntu / Linux Mint installation instructions, see: Install Oracle Java 8 In Ubuntu Via PPA Repository [JDK8]


Install Oracle Java 8 (both JDK8 and JRE8) in Debian


Oracle Java 8 installed Debian
Tested on Debian Wheezy but it should work with any Debian version

To add the WebUpd8 Oracle Java PPA repository and install Oracle Java 8 in Debian, use the following commands:
su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

And that's it, Oracle Java 8 should now be installed and you should get automatic updates for future Oracle Java 8 versions, under Debian.

-----------------------------------------------------------
Update October 20, 2016:

Previously, this package would increment the Java priority to make it default. The oracle-java8-installer package now sets the Java priority to 1081, and that may or may not set it as default, depending on other Java packages you may have installed (for instance, if Java 7 is also installed, Java 8 becomes default, but if Java 9 is installed, Java 8 doesn't become default).

To make Java 8 default, you must install the "oracle-java8-set-default" package (which configures the Java environment variables and sets it as default), which I added as a "Recommended" package to "oracle-java8-installer".

For instance, in Ubuntu, recommended packages are automatically installed, so "oracle-java8-set-default" should be installed when installing "oracle-java8-installer". In Linux Mint on the other hand, recommended packages are not installed by default, so you must install this package manually if you want to set Oracle Java 8 as default.

So, if you want to set Oracle Java 8 as default, no matter what other Java versions are installed, make sure that you install the oracle-java8-set-default package (which, again, should be automatically installed with the main Oracle Java Installer package in Ubuntu, but not in Linux Mint):
sudo apt-get install oracle-java8-set-default

If you don't want to make Oracle Java 8 default (it might still be set as default, depending on what other Java versions you may have installed), install the oracle-java8-installer with "--no-install-recommends":
sudo apt-get install --no-install-recommends oracle-java8-installer

Note: removing the oracle-java8-set-default package does not undo all the changes (I have yet to find a way to do this properly). If you don't want to set it as default, remove both oracle-java8-installer and oracle-java8-set-default packages, and then install oracle-java8-installer with "--no-install-recommends" (like mentioned above).
-----------------------------------------------------------

Tip: if you're behind a firewall / router that blocks some of the redirects required to download the Oracle Java archive, you can download the JDK tar.gz archive manually and place it under /var/cache/oracle-jdk8-installer - then, installing the "oracle-java8-installer" package will use the local archive instead of trying it to download it itself.

After installing Oracle Java and the "oracle-java8-set-default" package, you can check out the Java version on your system by using these commands:
java -version
This should display something like this:
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Or:
javac -version
Which should display something like this:
javac 1.8.0_111

For how to install Oracle Java 7 in Debian, see THIS article.

For Oracle Java 9, see THIS article.


How to accept the Oracle JDK8 license automatically


The Oracle Java 8 installer requires you to accept the Oracle license before the installation begins. If for some reason you want to accept the license automatically, you can use the following command:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

Update: if the command above doesn't work, use the following (thanks to Adam!):
echo oracle-java8-installer shared/accepted-oracle-licence-v1-1 boolean true | sudo /usr/bin/debconf-set-selections

Install packages you want in kali linux light

Install packages you want in kali linux light
If you have downloaded Kali Linux 32 bit mini, Kali Linux 64 bit mini, Kali Linux 32 bit Light, Kali Linux 64 bit Light, then you might find that some tools are missing and only some basic tools are available such as nmap, Aircrack-ng.

Kali Linux provide multiple metapackages that would allow us to easily install subsets of tools based on our particular needs. After installation of kali linux mini or light version here is what you want to do first. Below is the way to install the package you want.

1. Make sure you have correct repo. for more info go to http://docs.kali.org/general-use/kali-linux-sources-list-repositories

a. Always take a backup
 # mv /etc/apt/sources.list /etc/apt/sources.list_BAK

b. Create a repo source file
# vi /etc/apt/sources.list

c. Paste following 
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

# sudo apt-get update

d. search available metapackages 
# apt-cache search kali-linux



you can play around with apt-cache
# apt-cache -h
# apt-cache showpkg kali-linux  

e. If you want kali-linux-web package then install with below command
# apt-get install kali-linux-web

Find out list of tools inside each packages: http://tools.kali.org/kali-metapackages

What if you just want a tool. For example, if there is no arpspoof by default and 
you want to install it

# apt-cache search arpspoof



# apt-get install dsniff

There you go :)

How to Auto Install All Kali Linux Tools Using “Katoolin” on Debian/Ubuntu

Katoolin is a script that helps to install Kali Linux tools on your Linux distribution of choice. For those of us who like to use penetration testing tools provided by Kali Linux development team can effectively do that on their preferred Linux distribution by using Katoolin.
Katoolin - Install Kali Linux Tools
Katoolin – Install Kali Linux Tools
In this tutorial we are going to look at steps to install Katoolin on Debian based derivatives.

Major Features of Katoolin

  1. Adding Kali Linux repositories.
  2. Removing Kali Linux repositories.
  3. Installing Kali Linux tools.

Requirements

Requirements for installing and using Katoolin.
  1. An operating system for this case we are using Ubuntu 14.04 64-bit.
  2. Python 2.7

Installing Katoolin

To install Katoolin run the following commands.
# apt-get install git
# git clone https://github.com/LionSec/katoolin.git  && cp katoolin/katoolin.py /usr/bin/katoolin
Sample Output
cp katoolin/katoolin.py /usr/bin/katoolin
Cloning into 'katoolin'...
remote: Counting objects: 52, done.
remote: Total 52 (delta 0), reused 0 (delta 0), pack-reused 52
Unpacking objects: 100% (52/52), done.
Checking connectivity... done.
Then make /usr/bin/katoolin executable by running the command below.
# chmod +x  /usr/bin/katoolin
Now you can run Katoolin as follows.
# katoolin
The output below shows the interface of Katoolin when you run the command.
Sample Output
 $$\   $$\             $$\                         $$\ $$\           
$$ | $$  |            $$ |                        $$ |\__|          
$$ |$$  /  $$$$$$\  $$$$$$\    $$$$$$\   $$$$$$\  $$ |$$\ $$$$$$$\  
$$$$$  /   \____$$\ \_$$  _|  $$  __$$\ $$  __$$\ $$ |$$ |$$  __$$\ 
$$  $$<    $$$$$$$ |  Kali linux tools installer |$$ |$$ |$$ |  $$ |
$$ |\$$\  $$  __$$ |  $$ |$$\ $$ |  $$ |$$ |  $$ |$$ |$$ |$$ |  $$ |
$$ | \$$\ \$$$$$$$ |  \$$$$  |\$$$$$$  |\$$$$$$  |$$ |$$ |$$ |  $$ |
\__|  \__| \_______|   \____/  \______/  \______/ \__|\__|\__|  \__| V1.0 
+ -- -- +=[ Author: LionSec | Homepage: www.lionsec.net
+ -- -- +=[ 330 Tools 
1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help
As you can see it provides a menu from which you can make selections of what you want to do.
Incase the above way of installation fails, you also can try the following steps.
Go to https://github.com/LionSec/katoolin.git page download the zip file and extract it.
# wget https://github.com/LionSec/katoolin/archive/master.zip
# unzip master.zip
After extracting, you should be able to find katoolin.py script. Run katoolin.py command, you will be able to view the output similar to above.
# cd katoolin-master/
# chmod 755 katoolin.py
#  ./katoolin.py 

How do I use Katoolin?

To add Kali Linux repositories and update repositories, select option 1 from the Menu.
1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help
kat > 1
1) Add kali linux repositories
2) Update
3) Remove all kali linux repositories
4) View the contents of sources.list file
What do you want to do ?> 1
Sample Output
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.DC9QzwECdM --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
gpg: requesting key 7D8D0BF6 from hkp server pgp.mit.edu
gpg: key 7D8D0BF6: public key "Kali Linux Repository <devel@kali.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Then you can select option 2 from the interface above to update the repositories. From the output below, I have only captured a portion where Kali Linux repositories are being updated so that one can install Kali Linux tools in Ubuntu.
What do you want to do ?> 2
Ign http://in.archive.ubuntu.com vivid InRelease                                                                                            
Ign http://security.ubuntu.com vivid-security InRelease                                                                                                               
Ign http://in.archive.ubuntu.com vivid-updates InRelease                                                                                                               
Get:1 http://security.ubuntu.com vivid-security Release.gpg [933B]                                                                                                    
Ign http://in.archive.ubuntu.com vivid-backports InRelease                                                                                                                      
Get:2 http://repo.kali.org kali-bleeding-edge InRelease [11.9 kB]                                                                              
Get:3 http://security.ubuntu.com vivid-security Release [63.5 kB]                                                            
Hit http://in.archive.ubuntu.com vivid Release.gpg                                                                              
Get:4 http://repo.kali.org kali-bleeding-edge/main amd64 Packages [8,164 B]                                                
Get:5 http://in.archive.ubuntu.com vivid-updates Release.gpg [933 B]                                                                
Get:6 http://repo.kali.org kali-bleeding-edge/main i386 Packages [8,162 B]                                               
Hit http://in.archive.ubuntu.com vivid-backports Release.gpg    
...  
If you want to delete the Kali Linux repositories you added, then select option 3.
What do you want to do ?> 3
All kali linux repositories have been deleted !
As part of its operation, the Apt package uses a /etc/apt/sources.list that lists the ‘sources‘ from which you can obtain and install other packages.
To view contents of /etc/apt/sources.list file, select of 4.
What do you want to do ?> 4
#deb cdrom:[Ubuntu 15.04 _Vivid Vervet_ - Release amd64 (20150422)]/ vivid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ vivid main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ vivid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ vivid-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ vivid-updates main restricted
...
To go back you can simply type back and press [Enter] key.
What do you want to do ?> back
1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help
kat > 
To go back to the main menu, simply type gohome and press [Enter] key.
kat > gohome
1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help
kat >
There are different categories of Kali Linux tools you can install on your Ubuntu using Katoolin.
To view the available categories, select option 2 from the main menu.
kat > 2
**************************** All Categories *****************************
1) Information Gathering   8) Exploitation Tools
2) Vulnerability Analysis   9) Forensics Tools
3) Wireless Attacks    10) Stress Testing
4) Web Applications    11) Password Attacks
5) Sniffing & Spoofing    12) Reverse Engineering
6) Maintaining Access    13) Hardware Hacking
7) Reporting Tools     14) Extra
0) All
Select a category or press (0) to install all Kali linux tools .
You can select a category of choice or install all available Kali Linux tools by selecting option (0) and press [Enter] to install.
You can also install a ClassicMenu indicator using Katoolin.
    1. ClassicMenu Indicator is a application indicator for the top panel of Ubuntu’s Unity desktop environment.
    2. ClassicMenu Indicator provides a simple way for you to get a classic GNOME-style application menu for those who prefer this over the default Unity dash menu.
For more information, please visit : http://www.florian-diesch.de/software/classicmenu-indicator/
To install classicmenu indicator, press y and press [Enter].
kat > back
1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help
kat > 3
ClassicMenu Indicator is a notification area applet (application indicator) for the top panel of Ubuntu's Unity desktop environment.
It provides a simple way to get a classic GNOME-style application menu for those who prefer this over the Unity dash menu.
Like the classic GNOME menu, it includes Wine games and applications if you have those installed.
For more information , please visit : http://www.florian-diesch.de/software/classicmenu-indicator/
Do you want to install classicmenu indicator ? [y/n]> y
This PPA contains the most recent alpha/beta releases for
 * Arronax http://www.florian-diesch.de/software/arronax/
 * ClassicMenu Indicator http://www.florian-diesch.de/software/classicmenu-indicator/
* Privacy Indicator http://www.florian-diesch.de/software/indicator-privacy/
 * RunLens http://www.florian-diesch.de/software/runlens/
 * Unsettings http://www.florian-diesch.de/software/unsettings/
 * UUdeLens http://www.florian-diesch.de/software/uudelens
More info: https://launchpad.net/~diesch/+archive/ubuntu/testing
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpaqk6fphl/secring.gpg' created
gpg: keyring `/tmp/tmpaqk6fphl/pubring.gpg' created
...
You can also install Kali menu in Ubuntu by select option 4 and press y and then press [Enter].
To quit Katoolin, simply press Control+C.
kat > ^CShutdown requested...Goodbye...

For other brands usernames and passwords please see below:

Camera Manufacturer Username Password Default IP 3xLogic  admin 12345 192.0.0.64 ACTI Admin or admin 1...