This file contains hidden or 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
| #!/usr/bin/env python2 | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select |
This file contains hidden or 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
| #!/usr/bin/python | |
| # All SSH libraries for Python are junk (2011-10-13). | |
| # Too low-level (libssh2), too buggy (paramiko), too complicated | |
| # (both), too poor in features (no use of the agent, for instance) | |
| # Here is the right solution today: | |
| import subprocess | |
| import sys |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # | |
| # usage: | |
| # conv2vmx-ovf.py some-vm.ovf | |
| # | |
| # ref: http://www.cnblogs.com/eshizhan/p/3332020.html | |
| # | |
| import sys | |
| fn = sys.argv[1] |
This file contains hidden or 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
| aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1 | |
| aptitude install -y mysql-server libmysqlclient-dev | |
| adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git | |
| adduser --disabled-login --gecos 'gitlab system' gitlab | |
| usermod -a -G git gitlab | |
| su - gitlab | |
| ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | |
| aptitude install gitolite | |
| cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub | |
| su - git |
This file contains hidden or 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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |