Skip to content

Instantly share code, notes, and snippets.

ip -all netns delete
ip link |grep LINK|awk '{print $2}'|sed s/\@.\*//g > /tmp/links.txt
while read line
do
echo "Deleting link $line"
ip link delete $line
done < /tmp/links.txt
runsc list 2>/dev/null|grep ht_|awk '{print $1}' > /tmp/containers.txt
@nl5887
nl5887 / as.pl
Last active May 12, 2020 19:28
Perl IRC bot
#!/usr/bin/perl
my @mast3rs = ("z","w","x");
my @hostauth = ("localhost");
my @admchan=("#ssh");
my @server = ("91.191.19.112");
$servidor= $server[rand scalar @server] unless $servidor;
@nl5887
nl5887 / go-wrapper.sh
Last active May 22, 2018 21:30
Codesigning wrapper for Go
#!/bin/bash
if [ "$#" -eq 0 ]; then
$GOROOT/bin/go $@
exit
fi
LDFLAGS=""
if [ -e scripts/gen-ldflags.go ]; then
LDFLAGS="$(go run -exec ~/.gopath/bin/sign-wrapper.sh scripts/gen-ldflags.go) $LDFLAGS"
fi
@nl5887
nl5887 / go-wrapper.sh
Created May 22, 2018 21:28
Codesigning wrapper for Go
#!/bin/bash
if [ "$#" -eq 0 ]; then
$GOROOT/bin/go $@
exit
fi
LDFLAGS=""
if [ -e scripts/gen-ldflags.go ]; then
LDFLAGS="$(go run -exec ~/.gopath/bin/sign-wrapper.sh scripts/gen-ldflags.go) $LDFLAGS"
fi
@nl5887
nl5887 / gist:f9bc00f1c827a004d90c9bb06d95e3c3
Last active February 14, 2019 19:43
reroute replica shard
curl -XPOST '127.0.0.1:9200/_cluster/reroute?pretty&retry_failed' -d '{
"commands" : [ {
"allocate_replica" :
{
"index" : "index_name", "shard" : 1,
"node" : "ES3"
}
}
]
}'
###DutchCoders Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by DutchCoders or its affiliates (“DutchCoders”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to DutchCoders in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to DutchCoders a non-exclus
@nl5887
nl5887 / DutchSec CLA
Last active April 4, 2019 09:55 — forked from CLAassistant/SAP_CLA
DutchSec Individual Contributor License Agreement
###DutchSec Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by DutchSec or
its affiliates (“DutchSec”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing
any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials,
feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to
DutchSec in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this
Agreement, please contact opensource@dutchsec.com.
@nl5887
nl5887 / config.toml
Created February 26, 2018 21:42
cowrie
[listener]
type="agent"
[service.ipp]
type="ipp"
port="tcp/631"
storage-dir="/data/"
[service.smtp]
type="smtp"
@nl5887
nl5887 / fabfile.py
Last active January 23, 2018 20:26
#!/usr/bin/env python
from fabric.api import *
from fabric.contrib import files
env.hosts = [
]
env.user = "root"
@nl5887
nl5887 / honeytrap-agent.service
Created January 17, 2018 11:54
honeytrap systemd
[Unit]
Description=Honeytrap Agent
Documentation=https://honeytrap.io
Wants=network-online.target
After=network-online.target
[Service]
WorkingDirectory=/opt/honeytrap-agent
User=root