Saturday 28 March 2020

Laravel Interview Questions and answers

Laravel Interview Questions and answers

Question: What is Laravel?
Laravel is a free and open-source PHP framework that follows the model–view–controller design pattern.


Question: What is the latest version of Laravel?
7.0, released on 3rd March 2020.


Question: Who created Laravel?
Taylor Otwell


Question: Who created Laravel?
Taylor Otwell


Question: What language does Laravel use?
PHP


Question: Which is the best IDE for Laravel?
Netbeans,
PhpStorm,
Atom,
Sublime Text


Question: Features of Laravel?
  1. Eloquent ORM
  2. Reverse routing
  3. Restful controllers
  4. Migrations
  5. Unit testing
  6. Automatic pagination
  7. Database Seeding
  8. Query builder available



Question: What are the new features of Laravel 7?
Laravel 7.0 is incorporated features such as Better routing speed, Laravel Airlock, Custom Eloquent casts, Fluent string operations, CORS support, and many more features like below.
  1. Custom Eloquent Casts
  2. Route Caching Speed Improvements
  3. HTTP Client
  4. Query Time Casts
  5. Blade Component Tags & Improvements
  6. Laravel Airlock
  7. CORS Support
  8. Fluent string operations
  9. Multiple Mail Drivers
  10. New Artisan Commands etc



Question: How to extend login expire time in Auth?
Open config\session.php file and add/update following key's value.
'lifetime' => 180



Question: What is middleware in Laravel?
Middleware operates as a bridge and filtering mechanism between a request and response.


Question: How to pass CSRF token with ajax request?
In between head, tag put
[meta name="csrf-token" content="{{ csrf_token() }}"]


In Ajax, we have to add
$.ajaxSetup({
   headers: {
     'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
   }
});



Question: What is laravel Service container?
Service Container is a powerful tool which is used to manage class dependencies and perform dependency injection. Also known as the IoC container.


Question: How to use session in laravel?
Retrieving Data from session
session()->get('key');

Retrieving All session data
session()->all();

Remove data from session
session()->forget('key');

Storing Data in session
session()->put('key', 'value');


Friday 27 March 2020

Kali Linux for Beginners



Question: What is Kali Linux?
Kali Linux is open-source security packages of an ethical hacker, containing lot of tools for hacking website, wifi and networks.
Kali Linux can be installed in a machine as an Operating System.


Question: How i can download the kali linux?
https://www.kali.org/downloads/


Question: Can i installed with my current LInux/windows?
Yes, you can installed.
You can install virtual machine(VM) 
In the virtual machine, you can installed kali linux.


Question: How to update the kali linux?
Use following command in linux linux terminal.
apt-get update



Question: What is Metasploitable?
Metasploitable is an intentionally vulnerable Linux virtual machine that can be used to conduct security training, test security tools, and practice common penetration testing techniques.


Question: How to install Metasploitable machine in VM?
  1. Open link 
  2. Sign up, then it will redirect to URL where automatic zip file will be downloaded
  3. Unzip the zipped file
  4. Install Metasploitable in your virtual machine
  5. You need to browse the Metasploitable location file



Question: What is default username/password for Metasploitable machine?
username/password: msfadmin/msfadmin


Question: What is NMAP and ZenMAP?
NMAP and ZenMAP are the same tool used for the scanning phase of Ethical Hacking in Kali Linux.
NMAP uses commandline tool.
ZenMAP uses GUI


Question: What is Vega?
Vega is a free and open source scanner and testing platform to test the security of web applications.
Vega can help you find and validate SQL Injection, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities.


Question: How to install Vega?
apt-get install -y vega



Question: What is ZapProxy?
ZapProxy is an easy integrated penetration testing tool for finding vulnerabilities in web applications.


Question: What is sqlmap?
sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers.



Question: What is WPScan?
WPScan is a black box WordPress vulnerability scanner that can be used to scan remote WordPress installations to find security issue.


Question: What is ZapProxy?
ZapProxy is an easy integrated penetration testing tool for finding vulnerabilities in web applications.