Skip to content

Instantly share code, notes, and snippets.

Wolf thonixx

Block or report user

Report or block thonixx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thonixx
thonixx / smtplogin.sh
Created Aug 25, 2013
Test SMTP login
View smtplogin.sh
# test smtp login
# scripted by github.com/thonixx
function smtplogin {
echo -n "Server: "
read server
echo ""
echo -n "Username: "
read user
@thonixx
thonixx / reverse.sh
Last active Dec 21, 2015
Do a reverse lookup easily
View reverse.sh
# ⣏⡉ ⡀⢀ ⣀⡀ ⡇ ⢀⣀ ⣀⡀ ⢀⣀ ⣰⡀ ⠄ ⢀⡀ ⣀⡀
# ⠧⠤ ⠜⠣ ⡧⠜ ⠣ ⠣⠼ ⠇⠸ ⠣⠼ ⠘⠤ ⠇ ⠣⠜ ⠇⠸
#
# Due to the complexity of parsing anothers output (and because everything
# is different on other linux versions) I decided to revamp the code.
#
# What's better:
# - multiple A record parsing (also with multiple PTR records now)
# - multiple PTR record parsing (now working w/o bugs)
# - better error handling based on empty result check
@thonixx
thonixx / test-memory-limit.php
Created Aug 25, 2013
Test PHPs memory limit
View test-memory-limit.php
<pre>
<?php
$megabyte = 1528; // define the max megabytes which should be tested
function tryAlloc($megabyte){
echo "try allocating {$megabyte} megabyte...";
$mb = $megabyte;
$dummy = str_repeat("-",1048576*$mb);
echo "pass.";
echo "Usage: " . memory_get_usage(true)/1048576;
@thonixx
thonixx / maildelivery.sh
Created Aug 25, 2013
Test mail delivery (to check if e-mail account is configured on the remote server)
View maildelivery.sh
# test mail delivery
# scripted by github.com/thonixx
function maildelivery {
domain=$(echo "$1" | awk -F@ '{print $2}')
mailserver=$(dig mx $domain +short | awk {'print $2'} | head -n 1)
# test if something is in the output
if [ -z "$mailserver" ]
then
echo "There was no mailserver or no MX record. :("
@thonixx
thonixx / mailcheck.sh
Created Aug 25, 2013
Parse and print all sent mails
View mailcheck.sh
# function
# scroll below for the bash script
mailcheck () {
# abort if no argument
if [ -z "$1" ]
then
echo "I need a SASL user name"
return
fi
@thonixx
thonixx / loop-function.sh
Last active Dec 21, 2015
Run any command in a while loop
View loop-function.sh
# loop function
# run any command in a while loop with 1 second sleep
function loop() {
if [ -z "$1" ]
then
return
fi
cmd="$1"
@thonixx
thonixx / kick.sh
Created Aug 25, 2013
kicks other users out of their sessions with a message would kick root which comes from a defined destination
View kick.sh
# kick function
# kicks other users out of their sessions with a message
# would kick root which comes from a defined destination
function kick() {
if [ -z "$1" ]
then
echo "need user"
return
fi
@thonixx
thonixx / stopwatch.sh
Created Sep 16, 2013
function stopwatch() for bash/zsh
View stopwatch.sh
# simple stopwatch function
# scripted by github.com/thonixx
function stopwatch () {
########
# config
# initialise seconds and start with second 1
sec=1
# define maximum of dots to display
maxdots=10
View keybase.md

Keybase proof

I hereby claim:

  • I am thonixx on github.
  • I am thonixx (https://keybase.io/thonixx) on keybase.
  • I have a public key whose fingerprint is 7E0E 07A0 A16E FC84 257B 9F01 ED8D 4A44 9DDD 5DA4

To claim this, I am signing this object:

@thonixx
thonixx / convert-pfx-to-pem.sh
Last active Aug 29, 2015
PFX to PEM cert and key
View convert-pfx-to-pem.sh
# crt
openssl pkcs12 -in $file -out zertifikat.crt -clcerts -nokeys
# key
openssl pkcs12 -in $file -out schluessel.key -nocerts -nodes
# ca certs
openssl pkcs12 -in $file -out chain.crt-cacerts -nokeys
You can’t perform that action at this time.