Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Brian Teller bateller

🎯
Focusing
Block or report user

Report or block bateller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am bateller on github.
  • I am bateller (https://keybase.io/bateller) on keybase.
  • I have a public key ASD_CZiSpt7scDRrzMAofzVKz3yvOcOh9zEDUlg4e26Efgo

To claim this, I am signing this object:

@bateller
bateller / FizzBuzz.php
Created Aug 11, 2017
FizzBuzz solution in PHP
View FizzBuzz.php
for ($i = 1; $i <= 100; $i++)
{
if($i % 3 == 0 && $i % 5 ==0){
echo "FizzBuzz<br />";
}
else if($i % 3 == 0){
echo "Fizz<br />";
}
else if($i % 5 == 0){
echo "Buzz<br />";
View Wannacrypt0r-FACTSHEET.md

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@bateller
bateller / README.md
Created Apr 15, 2017 — forked from oodavid/README.md
Deploy your site with git
View README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
    • apache's home directory is /var/www/
@bateller
bateller / transform-html5.php
Created Aug 12, 2016 — forked from bzerangue/transform-html5.php
PHP: XSLT Transformation to build HTML5 html output (use xhtml 1.0 strict as your settings in your XSLT stylesheet)
View transform-html5.php
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('XML_SOURCE_LINK_HERE');
// Load XSLT stylesheet
$xsl = new DOMDocument;
$xsl->load('XSL_STYLESHEET_PAGE_LINK_HERE');
@bateller
bateller / sms-for-free.md
Created Jul 28, 2016 — forked from solderjs/sms-for-free.md
Send text messages for free via email via xminder cell phone carrier lookup
View sms-for-free.md
@bateller
bateller / crontab
Created May 11, 2016 — forked from tovbinm/crontab
Logrotate & upload nginx logfiles to s3://bucket/dt=..../hostname.log...gz
View crontab
# Nginx - logrotate & upload to S3
0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/nginx
15 0 * * * s3cmd put /var/log/nginx/access.log-`date +"\%Y\%m\%d"`.gz s3://$LOGS_BUCKET_NAME/nginx-access/`date +"dt=\%Y\%m\%d"`/`hostname -s`.access.log-`date +"\%Y\%m\%d"`.gz
@bateller
bateller / index.html
Created Jan 12, 2016 — forked from 1forh/index.html
Prevent map zoom on scroll
View index.html
<div id="map_wrapper">
<iframe id="map_canvas"></iframe>
</div>
View Mirror-Tor-Nodes.php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.dan.me.uk/tornodes');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$html = curl_exec($ch);
@bateller
bateller / New osTicket nginx settings...
Last active Aug 29, 2015
New/Old osTicket nginx settings
View New osTicket nginx settings...
# Requests to /users/tickets/api/* need their PATH_INFO set, this does that
if ($request_uri ~ "^/users/tickets/api(/[^\?]+)") {
set $path_info $1;
}
# /api/*.* should be handled by /api/http.php if the requested file does not exist
location ~ ^/users/tickets/api/(tickets|tasks)(.*)$ {
try_files $uri $uri/ /users/tickets/api/http.php;
}
You can’t perform that action at this time.