Posts

Showing posts with the label Tips and Tricks

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...

Understanding Common Compile Time Errors in Java

What is an Error in Program? Errors are mistakes in a program that prevents it from working condition. Three types of error Compile Time Error Logical Error Runtime Error This document discusses the compile time and logical errors. Unresolved compilation problem Exception in thread "main" java.lang.Error: Unresolved compilation problem This happens when the public class keyword used other than Java File Name Example: Java File Name: Employee.java but public class is EmployeeTest Solution: File must be renamed as EmployeeTest.java class Employee { private String name; public Employee ( String name ) { this .name = name; } public String toString ( ) { return "Employee [name=" + name + "]" ; } } public class EmployeeTest { public static void main ( String[] args ) { System. out .println( new Employee( "Kumar" ).toString()); } } The method is undefined Reason-1: ...

Python Requests Library: Handling Exception for REST API Calls

Python requests is a powerful library for consuming REST API methods. There are chances for throwing errors when calling these services. This error can be handled by using base Exception class import requests url = "https://reqbin.com/echo/post/json" try : re = requests. get (url, timeout= 5 ) if re.ok: print (re. text ) else : print ( "Service Unavailable!" ) except Exception: print ( "Connection Error" ) This script will handle the connection timed out error and maximum retry error. Gist URL: https://gist.github.com/anthoniraj/619bfec6dc389290aa0ccda2927163c5

Resolved: Connecting MongoDB URI with Password having Special Characters

MongoDB provides drivers for connecting databases with various programming languages like Java, Python, JavaScript, and C#. As per official documentation, there is a standard URI (Uniform Resource Identifier) for creating connection through programming. The syntax is, mongodb://username:password@host:port/defaultauthdb If the password has special characters like : / ? # [ ] @ then there will be a problem with the above URL syntax for making connection. To resolve this, Percentage-encoding mechanism can be used in URI, A percent-encoded octet is encoded as a character triplet, consisting of the percent character "%" followed by the two hexadecimal digits representing that octet's numeric value - Wikipedia. Percentage-encoding for / ? # [ ] @ / - %2F ? - %3F # - %23 [ - %5B ] - %5D @ - %40 Sample Passwords Secure@pass567 can be written as Secure%40pass567 URI: mongodb://tom:Secure%40pass567@localhost:27017/demodbname Secre#tig] can be written as Secr...

Microsoft Edge Copy and Paste Issue with Ctrl + C Keyboard Shortcut

Image
There is a problem with copying website text content by using the Ctrl+C keyboard shortcut in the recent version of Microsoft Edge Browser. The same functionality will work if you right-click using the mouse and select the copy option. This is really annoying for Developers and Web users who frequently uses keyboard shortcuts. There is a workaround for this problem to enable copy using Ctrl+C. Workaround: Edge Settings. Open Microsoft Edge Click on the three dots (…) from the right top corner. Select Settings from the drop-down and click on " Appearance " from the left pane. Disable " Show mini menu when selecting text " from the right pane.

Convert Source Code tar.gz , tar.bz2 or rpm files into deb Package

Developer can easily convert the source code into distribution based package format. These packages are easy installable and configurable . There are two package types used in all Linux distribution deb package [ Debian based Package ] rpm package [ Redhat Package Manager] Debian, Ubuntu, Gentoo, and other Debian based OS are using DEB package,  Redhat, Fedora, CentOS are using RPM package. The conversion between rpm based package to deb package is given in this article. The tool " alien " is used for doing this job. Step 1: Install alien #sudo apt-get install  alien Step 2:  Convert tar.gz to deb #sudo alien /opt/eclipse-helios.tar.gz This command  will create eclipse-helios.deb package in /opt directory. Step 3: Convert rpm to deb #sudo alien ffmpeg-0.6-3.fc13.i686.rpm