Skip to content

Instantly share code, notes, and snippets.

View alfintechcomputer's full-sized avatar
🎯
Focusing

AlfinTech Computer alfintechcomputer

🎯
Focusing
View GitHub Profile
@alfintechcomputer
alfintechcomputer / sudo.upgrade
Created November 29, 2020 15:08
Vega Vulnerability Scanner
~$ 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
@alfintechcomputer
alfintechcomputer / wslpowershell
Created November 19, 2020 12:02
Windows Subsystem for Linux Distributions
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
@alfintechcomputer
alfintechcomputer / wsl-lcommand
Created November 19, 2020 11:06
Windows Subsystem for Linux Distributions
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
@alfintechcomputer
alfintechcomputer / function2.php
Created November 15, 2020 21:04
HTTP request with PHP
<?php
function redirect($new_page) {
header('Location: ' . $new_page);
exit;
}
redirect('https://www.alfintechcomputer.com');
?>
@alfintechcomputer
alfintechcomputer / function1.php
Created November 15, 2020 20:56
HTTP request with PHP
<?php
function redirect($new_page) {
header('Location: ' . $new_page);
exit;
}
?>
@alfintechcomputer
alfintechcomputer / login2.php
Created November 15, 2020 20:47
HTTP request with PHP
<?php
header('Location: login.php');
exit;
?>
@alfintechcomputer
alfintechcomputer / login1.php
Created November 15, 2020 20:38
HTTP request with PHP
header('Location: login.php');
@alfintechcomputer
alfintechcomputer / header_function.php
Created November 15, 2020 18:17
HTTP request with PHP
<?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"')
@alfintechcomputer
alfintechcomputer / form_page.php
Created November 15, 2020 16:35
HTML Forms using PHP
<?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?
@alfintechcomputer
alfintechcomputer / validation_functions.php
Created November 15, 2020 16:24
HTML Forms using PHP
<?php
function has_presence($value) {
return isset($value) and $value !== '';
}
function max_length($value, $max) {
return strlen($value) <= $max;
}