This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ sudo apt update && sudo apt upgrade | |
Hit:1 http://kali.download/kali kali-rolling InRelease | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
7 packages can be upgraded. Run 'apt list --upgradable' to see them. | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\>wsl -l | |
Windows Subsystem for Linux Distributions: | |
Ubuntu (Default) (WSL 2) | |
Ubuntu-16.04 (WSL 2) | |
Fedora | |
Alpine | |
Kali-linux | |
Pengwin | |
Debian | |
Ubuntu-18.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function redirect($new_page) { | |
header('Location: ' . $new_page); | |
exit; | |
} | |
redirect('https://www.alfintechcomputer.com'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function redirect($new_page) { | |
header('Location: ' . $new_page); | |
exit; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Location: login.php'); | |
exit; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header('Location: login.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: application/pdf'); | |
header('HTTP/1.1 500 Internal Server Error'); | |
header('HTTP/1.1 404 Not Found'); | |
header('Content-Disposition: attachment; filename="awesome.docx"') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('validation_functions.php'); | |
$errors = array(); | |
// was the form submitted? | |
if(isset($_POST['submit'])) { | |
$website = htmlspecialchars($_POST['website']); | |
$category = htmlspecialchars($_POST['category']); | |
// is the website field present? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function has_presence($value) { | |
return isset($value) and $value !== ''; | |
} | |
function max_length($value, $max) { | |
return strlen($value) <= $max; | |
} | |