=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| #!/bin/bash | |
| # stdin should be integers, one per line. | |
| percentile=$1 | |
| tmp="$(tempfile)" | |
| total=$(sort -n | tee "$tmp" | wc -l) | |
| # (n + 99) / 100 with integers is effectively ceil(n/100) with floats | |
| count=$(((total * percentile + 99) / 100)) | |
| head -n $count "$tmp" | tail -n 1 | |
| rm "$tmp" |
| #!/bin/bash | |
| env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | grep vulnerable > /dev/null 2>&1 | |
| if [ $? -eq 1 ]; then | |
| echo "Not vulnerable. Machine is safe." | |
| exit 0 | |
| else | |
| echo -n "Vulnerable. Version: " | |
| /bin/bash --version | |
| echo "Installing patch." |
| # Be sure to save your config files. Optional but I do: | |
| sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
| sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
| # Package repo (for apt-get) | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
| # Also probably optional but I like to update sources and upgrade | |
| sudo apt-get update |
| function formatValue(x) { | |
| var ret; | |
| if (typeof x == "string") { | |
| return "'" + x.replace(/\n/g,"\\n") + "'"; | |
| } | |
| if (typeof x == "number" && x === 0 && (1/x === -Infinity)) { | |
| return "-0"; | |
| } | |
| if (Array.isArray(x)) { |
| Superfish uses an SDK from Komodia to do SSL MITM. That's probably known by now. | |
| Superfish isn't the only product to use that sdk. there's others too. | |
| Each product that uses the Komodia SDK to MITM, has its OWN CA cert and private | |
| key pair. Seems a lot of people think they all use the superfish cert. That is | |
| NOT the case. | |
| First thing I checked was komodia's own parental control software, | |
| Keep My Family Secure. (mentioned on komodia's own website). |
This talk is also known as ‘PostMortem Facilitation: Theory and Practice of "New View" Debriefings’ Background reading for attendees
Picking the right architecture = Picking the right battles + Managing trade-offs
| def valid_date_type(arg_date_str): | |
| """custom argparse *date* type for user dates values given from the command line""" | |
| try: | |
| return datetime.datetime.strptime(arg_date_str, "%Y-%m-%d") | |
| except ValueError: | |
| msg = "Given Date ({0}) not valid! Expected format, YYYY-MM-DD!".format(arg_date_str) | |
| raise argparse.ArgumentTypeError(msg) | |
| def valid_datetime_type(arg_datetime_str): | |
| """custom argparse type for user datetime values given from the command line""" |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys and look for sec, use the key ID for the next stepgit to use GPG -- replace the key with the one from gpg --list-secret-keys