Enable WIFI ADAPTER Monitor Mode in Kali Linux

Connect the WIFI adapter and add it in VirtualBox USB Settings TP-Link TL-WN725N 150Mbps Wireless N Nano USB Adapter https://www.amazon.in/gp/product/B008IFXQFU Check the Adapter Chippet lsusb Bus 001 Device 002 : ID 2357 : 0109 TP-Link TL-WN823N v2 / v3 [Realtek RTL8192EU] Bus 001 Device 001 : ID 1 d6b: 0002 Linux Foundation 2 . 0 root hub Bus 002 Device 002 : ID 80 ee: 0021 VirtualBox USB Tablet Bus 002 Device 001 : ID 1 d6b: 0001 Linux Foundation 1 . 1 root hub Find Appropriate Driver for Realtek RTL8192EU from GitHub https://github.com/clnhub/rtl8192eu-linux Install the dependencies sudo apt install linux-headers-generic build-essential dkms git Clone the Driver git clone https://github.com/clnhub/rtl8192eu-linux.git Configure the Architecture and Monitor Mode Open MakeFile in Text Editor or Nano If you're using a different architecture than x86, the set (MakeFile) CONFIG_PLATFORM_I386_PC = n set your architecture CONFIG_PLATFORM_ARM_AARCH64...

How to use JShell in Java?

JSHELL is the command line tools for Read/Evaluate/Print/Loop (REPL) Java Statements. It can be used for learning Java Concepts. The Java Statements executed in JSHELL is called as Snippets. To run, type jshell in Terminal/Command Window.

Minimum Java Version?

  • Minimum JDK9 version is required to use JSHELL

JSHELL Commands

  • /help - Getting help
  • /exit - Exit JSHELL
  • /list - List ALL Snippets
  • /edit - Edit Snippet in Editor
  • /save - Save Snippets into File
  • /vars - List variables
  • /imports - List imported packages
  • /reset - Reset the current session
  • Ctrl+l - Clear the Screen
  • Ctrl+C - To exit from the current snippet

Use as Calculator (Java Operators Demo)

  10 + 20
  100 * 3863

Create a String

  String str = "Hello";
  str.toUpperCase()
  str.length()

Create a List

  • Creatigng a Simple List
  • Getting Dynamic Help of a Method (Press Tab after typing Char(s))
  • List.of() vs Arrays.asList()
  var myList = Arrays.asList(4,5,3,1,2);
  myList.sort(Comparator.naturalOrder())
  myList
  myList.sort(Comparator.reverseOrder())
  myList

Create a Greet Method

  • Simple method

    String display(){
      return "Welcome to JSHELL";
    }
    display()
    
  • Method with Parameter

    String greetUser(String name){
      return "Welcome " + name;
    }
    greetUser("Anthoniraj")
    

Create a Boolean Method

  • If-Else Statement
  boolean isEven(int n){
    if (n % 2 == 0) {
       return true;
    }else{
       return false;
    }
  }
isEven(10)
isEven(9)
  • Conditional Operator
    boolean isOdd(int n){ 
     return (n%2 !=0)? true:false; 
    }
    

Save the Snippets into File

/save C:\Users\Anthoniraj\Documents\Snippet.java

Comments