Skip to content

Instantly share code, notes, and snippets.

View daryltucker's full-sized avatar

Daryl Tucker daryltucker

  • Neo-Retro Group
  • Salem, Or
View GitHub Profile
@daryltucker
daryltucker / get_isos.sh
Last active December 19, 2015 14:19
Modern.ie - Virtualization Tools wget script
#!/bin/bash
#IE8 - Win7
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part1.sfx
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part2.rar
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part3.rar
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part4.rar
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part5.rar
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE8_Win7/IE8.Win7.For.LinuxVirtualBox.part6.rar
#IE9 - Win7
wget -c https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/Linux/IE9_Win7/IE9.Win7.For.LinuxVirtualBox.part1.sfx
@daryltucker
daryltucker / pastObjectId.py
Created September 4, 2013 17:33
Creating a [decent] ObjectId for a previous time in python.
import datetime
from bson import ObjectId
pastDate = datetime.datetime(2013, 9, 4, 0, 57, 12, 35683)
ob = ObjectId()
obx = ObjectId().from_datetime(pastDate)
# Here it is:
pastId = ObjectId(str(obx)[:8] + str(ob)[8:])
@daryltucker
daryltucker / db.collectionCopy()
Created September 7, 2013 02:01
Copy Collection from one Database to another, local Database. [MONGO]
db.<collection_name>.find().forEach(function(d){ db.getSiblingDB('<new_database>')['<collection_name>'].insert(d); });
@daryltucker
daryltucker / nginx-BEAST-ssl.txt
Created October 2, 2013 19:00
nginx: SSL BEAST Protection. This opens up RC4 passive vulnerability in exchange of preventing BEAST active vulnerability.
ssl_prefer_server_ciphers On;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA;
@daryltucker
daryltucker / objectid_to_epoch.py
Created February 7, 2014 01:03
Convert ObjectId into Epoch
import datetime
import calendar
import time
def objectid_to_epoch(_id)
epoch = datetime.datetime.fromtimestamp(int(str(_id)[0:8], 16))
return calendar.timegm(datetime.datetime(epoch.year, epoch.month, epoch.day, epoch.hour, epoch.minute).utctimetuple())
@daryltucker
daryltucker / pp.py
Created February 13, 2014 20:08
Python Pretty Print Helper Function
import pprint
def pp(data, ro=False):
"""Format for pretty print."""
if not ro:
pprint.pprint(data, indent=4, width=10)
return pprint.pformat(data, indent=4, width=10)
@daryltucker
daryltucker / 2014-Security_and_Trust_on_the_Web.mkd
Last active August 29, 2015 13:56
Security and Trust on the Web

Security and Trust on the Web

Daryl Tucker

Cryptography

Encryption


Decryption

@daryltucker
daryltucker / nginx_server
Last active August 29, 2015 13:57
Skeleton NGINX Configuraton (Forces SSL)
server{
server_name domain.tld;
rewrite ^ https://domain.tld$request_uri? permanent;
}
server{
ssi on;
listen 443;
server_name domain.tld;
@daryltucker
daryltucker / wget-download.sh
Created April 14, 2014 18:36
Download a specific subdirectory of a website while preserving referenced media.
#!/bin/bash
# @daryltucker
# This will download files within a specific directory but preserve media. For example:
# www.domain.tld/subdirectory/
# index.html
# page1.html (contains an image on www.domain.tld/images)
# page2.html (contains an image on www.domain.tld/)
wget -p -r -l1 --no-parent "$@"
setInterval(function(){
var x = document.getElementsByTagName('a');
console.log(x);
for ( var i=0; i<x.length; i++) {
x[i].click();
};
}, 500);