Catching errors in PHP

15 ноября 2014, 13:40
env X="() { :;} ; echo busted" bash -c "echo stuff"
/usr/ports/www/mod_php5 либо /usr/ports/www/mod_php55
<!doctype html> <html> <body> <a href="http://google.com">click</a> </body> <script> document.onmouseup = function(){ if (getCookie('bdclk') == undefined) { setCookie('bdclk', 1, '/', 24*3600); window.open('http://www.ya.ru', '_blank'); return true; } return false; }; function getCookie(name) { if (/\W/.test(name)) return undefined; var matches = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); return matches ? decodeURIComponent(matches[1]) : undefined; } function setCookie(name, value, path, expires) { var date = new Date( new Date().getTime() + expires * 1000 ); document.cookie = name + '=' + value + '; path=' + '/' +'; expires=' + date.toUTCString(); return true; } </script> </html>
git log -1Также текущий хеш коммита
git rev-parse HEAD
<?php for ($i = 1; $i <= 395; $i++) { $file = __DIR__ . '/storage/' . $i . '.html'; echo "get $i \n"; if (!file_exists($file)) { copy("http://webcache.googleusercontent.com/search?q=cache:snippets.pp.ru/article/$i", $file); sleep(10); } } ?>С локального компа мне не удалось скачать все статьи, гугл меня забанил где-то после 80 штук, на каждый запрос вылазила капча, поэтому пришлось задействовать несколько сервачков :D Кстати, задание юзер агента и прочих заголовков не помогало, дело именно в частоте запросов, так что если будете качать с кеша гугла, то ставьте побольше таймауты, либо запасайтесь серваками. Но через пару дней гугл все равно разбанивает.
rpm -Uvh http://dl.atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-7.el6.x86_64.rpm yum install -y ffmpeg ffmpeg-devel
sudo apt-get install linux-image-$(uname -r)
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum update atomic-release yum upgradeЕсли не помогло, то
get -q -O - https://www.atomicorp.com/installers/atomic | sh
redis-server --service-install redis-server --service-startПроверка
redis-cli 127.0.0.1:6379>keys *
@reboot = выполняется при запуске сервера @yearly = 0 0 1 1 * @annually = @yearly @monthly = 0 0 1 * * @weekly = 0 0 * * 0 @daily 0 0 * * * @midnight = @daily @hourly = 0 * * * *
<?php $groupId = 'mdk'; //ид группы $offset = 0; //смещение $limit = 100; //лимит $fields = 'domain'; //запросим урл личной страницы $sort = 'id_desc'; //сортировка $data = file_get_contents("https://api.vk.com/method/groups.getMembers?group_id=$groupId&v=5.21&sort=$sort&offset=$offset&count=$limit&fields=$fields"); $data = json_decode($data, true); print_r($data);
chattr -i /home/pathtofile rm -rf /home/pathtofile
yum --disablerepo=* --enablerepo=nginx install nginx
ctrl+a :quit
screen -X -S [session # you want to kill] quit
yum install postfix cyrus-sasl-plain cyrus-sasl-md5
relayhost = [smtp.mailgun.org]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = static:postmaster@mydomain.com:password smtp_sasl_security_options = noanonymous
service postfix start
<?php mail('to@mail.ru', 'theme', 'это тест', "From: from@mydomain.com\r\nContent-type:text/plain;charset=utf-8");
#!/bin/bash echo "########### The server will reboot when the script is complete" echo "########### Changing to home dir" cd ~ echo "########### Change your root password!" passwd echo "########### Firewall rules; allow 22,8333" ufw allow 22/tcp ufw allow 8333/tcp ufw --force enable echo "########### Updating Ubuntu" apt-get update -y apt-get upgrade -y apt-get dist-upgrade -y apt-get install software-properties-common python-software-properties -y echo "########### Creating Swap" dd if=/dev/zero of=/swapfile bs=1M count=1024 ; mkswap /swapfile ; swapon /swapfile echo "/swapfile swap swap defaults 0 0" >> /etc/fstab echo "########### Adding ppa:bitcoin/bitcoin and installing bitcoind" add-apt-repository -y ppa:bitcoin/bitcoin apt-get update -y mkdir ~/.bitcoin/ apt-get install bitcoind -y echo "########### Creating config" config=".bitcoin/bitcoin.conf" touch $config echo "server=1" > $config echo "daemon=1" >> $config echo "connections=40" >> $config randUser=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30` randPass=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30` echo "rpcuser=$randUser" >> $config echo "rpcpassword=$randPass" >> $config echo "########### Setting up autostart (cron)" crontab -l > tempcron echo "@reboot bitcoind -daemon" >> tempcron crontab tempcron rm tempcron reboot
yum install phpmyadmin
<Directory /usr/share/phpMyAdmin/> Order Deny,Allow #Deny from All #Allow from 127.0.0.1 #Allow from ::1 </Directory>
service httpd restart
sudo killall -HUP mDNSResponderДля Mac OS X 10.10 Yosemite
dscacheutil -flushcache