How to have a simple debian repository to offer your packages.
You probably have them already installed
- Python (I used 2.7).
- dpkg-scanpackages:
sudo apt-get install dpkg-dev - gzip:
sudo apt-get install gzip
| #!/bin/bash | |
| # | |
| # Converts LDIF data to CSV. | |
| # Doesn't handle comments very well. Use -LLL with ldapsearch to remove them. | |
| # | |
| # 2010-03-07 | |
| # dsimmons@squiz.co.uk | |
| # | |
| # Show usage if we don't have the right params |
| #!/bin/bash | |
| # This script is used make a full roundtrip test to SimpleSAMLphp based SSO | |
| # Exit statuses indicate problem and are suitable for usage in Nagios. | |
| BASENAME=$(basename $0) | |
| if [[ $1 == '-h' || $1 == '--help' ]]; then | |
| cat <<EOF | |
| USAGE: $BASENAME [URL] [test-string] [username] [password] |
| import signal | |
| class InterruptableRegion(object): | |
| def __init__(self, sig=signal.SIGINT): | |
| self.sig = sig | |
| self.interrupted = False | |
| self.released = False | |
| self.original_handler = None | |
| def __enter__(self): |
| #!/bin/bash | |
| # | |
| # Stolen from https://stuckinadoloop.wordpress.com/2011/04/14/script-to-convert-openldap-schema-files-to-ldif-format/ | |
| SCHEMAD=/etc/openldap/schema | |
| SCHEMAS='dhcp.schema' | |
| tmpd=`mktemp -d` | |
| pushd ${tmpd} >>/dev/null |
| #!/bin/bash | |
| # | |
| # ts3server-bot.sh | |
| # | |
| # Teamspeak 3 AFK bot, move clients to the specified channel when they are muted | |
| # for more than the specified period of time and move them back when they unmute | |
| # themself. | |
| # | |
| # Copyright 2016, Malobre. | |
| # |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| #!/bin/bash | |
| # Original: | |
| # https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity | |
| echo -n Password: | |
| read -s password | |
| echo | |
| hash="$(echo -n $password | openssl dgst -sha1 -binary | xxd -p)" | |
| upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')" |
| <?php | |
| /** | |
| * Simple method to use the API from https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/ | |
| * Written by Jim Westergren and released to public domain | |
| * @return int count | |
| */ | |
| function checkPawnedPasswords(string $password) : int | |
| { | |
| $sha1 = strtoupper(sha1($password)); | |
| $data = file_get_contents('https://api.pwnedpasswords.com/range/'.substr($sha1, 0, 5)); |
| #!/usr/bin/env perl | |
| # | |
| # surveilleur de logins sasl: compte les IP's de provenance d'un meme login | |
| # | |
| # needs geoip2 perl module and GeoLite2-Country.mmdb (use geoipupdate) | |
| # | |
| # run by cron on a daily-rotated maillog: | |
| # 2 */1 * * * root /usr/local/admin/ssi/surveille-spam.pl /data/logs/serveurs/maillog | |
| # 1 0 * * * root /usr/local/admin/ssi/surveille-spam.pl /data/logs/serveurs/maillog.0 | |
| use strict; |