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 ruby | |
| require 'socket' | |
| server = TCPServer.new 2000 | |
| loop do | |
| client = server.accept | |
| client.puts '/etc/passwd' | |
| client.close |
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 ruby | |
| require 'socket' | |
| s = TCPSocket.new 'localhost', 2000 | |
| while line = s.gets | |
| system 'cat ' + line | |
| end | |
| s.close |
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
| #!/bin/bash | |
| case $0 in | |
| *create) | |
| answer="chage -l $1;$?" | |
| if [ "$answer | awk -F';' '{ print $2 }' == 0" ]; then | |
| #echo "The command was sent to $HOSTNAME successfully!" | |
| echo "The command was sent to $HOSTNAME successfully!" | |
| chage -l $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
| #!/usr/bin/python | |
| import os | |
| def print_menu(): | |
| print "--------------------------------" | |
| print "What would you like to do? " |
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
| #Web url where info was obtained | |
| #http://lostechies.com/derickbailey/2012/04/24/executing-a-project-specific-nodenpm-package-a-la-bundle-exec/ | |
| /home/hubot/myhubot/node_modules/.bin/$@ |
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
| #!/bin/bash | |
| #https://gist.github.com/febuiles/1394520 | |
| # This assumes you have: | |
| # 1) A user called `hubot` in charge of the bot. | |
| # 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials. | |
| # | |
| # To set the adapter either edit bin/hubot to specify what you want or append | |
| # `-- -a campfire` to the $DAEMON variable below. | |
| # |
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
| #!/bin/bash | |
| #dbora Oracle Database script | |
| # | |
| # chkconfig: 345 85 35 | |
| # description: This script starts and stops the Oracle databases | |
| # and creates an output file of the returned messages | |
| # | |
| # | |
| #author: Thomas Foster | |
| #co-author: Brian Doran |
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 ruby | |
| require 'yaml' | |
| require 'rbvmomi' | |
| hosts = ['VCenter host'] | |
| datacenters = ['datacenter'] | |
| templates = ['relativepath/vm'] | |
| mount = true | |
| config_file = File.expand_path('~/.fog') |
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
| #Splunk Universal Forwarder Version | |
| Facter.add("SplunkUF_Version") do | |
| setcode do | |
| SplunkUF_Version = Facter::Util::Resolution.exec("/opt/splunkforwarder/bin/splunk --version | awk {'print $4'}") | |
| if SplunkUF_Version.length < 6 | |
| while SplunkUF_Version.length < 10 do | |
| SplunkUF_Version.insert(-1, '.0') | |
| end |
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 | |
| import sys, getopt, random | |
| def main(inputpass): | |
| try: | |
| passopts, passargs = getopt.getopt(inputpass, "hl:n:d:s:f:", ["help", "length=", "digits=", "special=", "file="]) |