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 | |
if($i == 2){ | |
?> | |
<div> | |
<p>this is a div</p> | |
<ul> | |
<?php | |
while($t == 1){ | |
?> | |
<li>this is a list item</li> |
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 | |
$name_evil = "'; DELETE FROM customers WHERE 1 or username = '"; | |
$name_evil = mysql_real_escape_string($name_evil); | |
$query_evil = "SELECT * FROM customers WHERE username = '$name_evil'"; | |
echo "Escaped Evil Injection: <br />" . $query_evil; |
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 | |
foreach($arrayVariable as $variable){ | |
echo $variable; | |
} |
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 | |
//define and initiate variable | |
$arrayVariable = array(1,2,3,3); | |
foreach($arrayVariable as $variable){ | |
//make sure there is something to output | |
if($variable != ""){ | |
echo $variable; | |
} | |
} |
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 | |
//this is a variable | |
$variable; | |
/* this variable will do some awsome stuff that | |
could go on for quite | |
a few lines of awsomeness */ | |
$variable = 1; |
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
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "modification plus 10 days" | |
</IfModule> |
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
git pull | |
git push | |
git branch | |
git commit | |
git checkout | |
git status | |
git log |
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
Port 2345 | |
HostKey /etc/ssh/ssh_host_rsa_key | |
KeyRegenerationInterval 1h | |
ServerKeyBits 1024 | |
PermitRootLogin no | |
RSAAuthentication yes | |
PermitEmptyPasswords no | |
IgnoreRhosts yes | |
RhostsRSAAuthentication no | |
MaxStartups 10 |
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
## Securecentos.com system.conf for Monit (Updated 12082009) | |
check system CHANGEHOSTNAME | |
if loadavg (1min) > 4 then alert | |
if loadavg (5min) > 2 then alert | |
if memory usage > 75% then alert | |
if cpu usage (user) > 70% then alert | |
if cpu usage (system) > 30% then alert | |
if cpu usage (wait) > 20% then alert |
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
## SSHD monit config , http://www.securecentos.com | |
## Modified 25/7-2008 | |
check process sshd with pidfile /var/run/sshd.pid | |
start program "/etc/init.d/sshd start" | |
stop program "/etc/init.d/sshd stop" | |
if failed port 2345 protocol ssh then restart | |
if 5 restarts within 5 cycles then timeout |
OlderNewer