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
# files modified within 30 days. | |
find /home/mywebsite -type f -name "*.php" -ctime -30 | |
# find for suspicious strings | |
find ./ -name "*.php" -type f | xargs sed -i 's#<?php /\*\*/ eval(base64_decode("aWY.*?>##g' 2>&1 | |
find ./ -name "*.php" -type f | xargs sed -i '/./,$!d' 2>&1 | |
# grep for suspicious and very long strings | |
grep -R "document.write(unescape" * | |
grep -iR --include "*.js" "[a-zA-Z0-9\/\+]\{255,\}" * |
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
123456789 | |
12345678 | |
11111111 | |
dearbook | |
00000000 | |
123123123 | |
1234567890 | |
88888888 | |
111111111 | |
147258369 |
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
# Agregar esto a .bashrc o a .bash_aliases | |
# Uso: add_ssh [email protected] | |
function add_ssh { | |
cat ~/.ssh/id_rsa.pub | ssh $1 'cat >> .ssh/authorized_keys' | |
} | |
export -f add_ssh |
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
# iniciar monitor | |
sudo airmon-ng start wlan0 | |
# ver redes | |
sudo airodump-ng mon0 | |
# Obtener handshake (reemplazar canal y MAC | |
sudo airodump-ng -c 3 -w wpa --bssid 00:00:00:00:00:00 mon0 | |
# Forzar handsahake |
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
rescue_from 'Emailer::Incoming::MissingInfo', 'Emailer::Incoming::Error' do |exception| | |
logger.warn "[Emailer::Incoming] #{exception.message}" | |
EmailBounce.bounce_once_per_day(exception) unless params[:from].blank? | |
response.content_type = Mime::TEXT | |
render :text => exception.message, :status => 200 | |
end |
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
def receive_email | |
@params = params | |
#make sure request is a post | |
text = params["text"] | |
html = params["html"] | |
to = params["to"] | |
from = params["from"] | |
subject = params["subject"] | |
attachment1 = params["attachment1"] | |
lead_string = attachment1.read |
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 $output = shell_exec('git fetch --all && git reset --hard origin/prod'); ?> | |
<style> | |
body{ | |
background-color: #1A1A1A; | |
color:#fff; | |
} | |
pre{ | |
padding:20px; | |
} |
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 (is_uploaded_file($HTTP_POST_FILES['attachmentx']['tmp_name'])) { | |
copy($HTTP_POST_FILES['attachmentx']['tmp_name'], $HTTP_POST_FILES['attachmentx']['name']); | |
$subio = true; | |
} | |
if($subio) { | |
echo "El archivo subio con exito"; | |
} else { | |
echo "El archivo no cumple con las reglas establecidas"; |
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 | |
# CI Reference: http://codeigniter.com/user_guide/libraries/file_uploading.html | |
# SendGrid Reference: http://docs.sendgrid.com/documentation/api/parse-api-2/ | |
public function input(){ | |
//file upload configuration | |
$config['upload_path'] = './uploads/'; | |
$config['allowed_types'] = 'gif|jpg|png|jpeg'; | |
$config['max_size'] = '8192'; | |
$config['max_width'] = '0'; |
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 grub2-mkconfig -o /boot/grub2/grub.cfg |
OlderNewer