This file contains hidden or 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
function Get-SaltedHash($password, $salt) { | |
$combined = [System.Text.Encoding]::UTF8.GetBytes($password + $salt) | |
$hash = [System.Security.Cryptography.SHA256]::Create().ComputeHash($combined) | |
return [System.BitConverter]::ToString($hash).Replace("-", "") | |
} | |
function Get-Salt($length) { | |
$saltBytes = new-object byte[] $length | |
(new-object System.Security.Cryptography.RNGCryptoServiceProvider).GetBytes($saltBytes) | |
return [System.BitConverter]::ToString($saltBytes).Replace("-", "") |
This file contains hidden or 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 | |
$username = "admin"; | |
$password = "admin123"; | |
$hostname = "db-test.cor3jwxwqzct.us-west-1.rds.amazonaws.com"; | |
$dbname = "test"; | |
//Connect to database | |
$conn = new mysqli($hostname, $username, $password) | |
or die("Unable to connect to MySQL"); |
This file contains hidden or 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
#!/bin/bash | |
## Auto webserver config for Amazon EC2 | |
## External Database | |
yum update -y | |
yum install -y httpd php mysql php-mysql | |
rm -f /var/www/html/index.html | |
service httpd start | |
echo 'Index page created successfully' > /var/www/html/index.php |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", |
This file contains hidden or 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
1 aspmx.l.google.com | |
5 alt1.aspmx.l.google.com | |
5 alt2.aspmx.l.google.com | |
10 alt3.aspmx.l.google.com | |
10 alt4.aspmx.l.google.com |