Skip to content

Instantly share code, notes, and snippets.

cf3> CFEngine - autonomous configuration engine - commence self-diagnostic prelude
cf3> ------------------------------------------------------------------------
cf3> Work directory is /var/cfengine
cf3> Looking for a source of entropy in /var/cfengine/randseed
cf3> Making sure that locks are private...
cf3> Checking integrity of the state database
cf3> Checking integrity of the module directory
cf3> Checking integrity of the PKI directory
cf3> -> Loaded private key /var/cfengine/ppkeys/localhost.priv
cf3> -> Loaded public key /var/cfengine/ppkeys/localhost.pub
@zined
zined / gist:5130435
Created March 10, 2013 21:11
cfengine3 user "management"
#
# adds users to the system
#
bundle agent add_users
{
vars:
"pw[user1]"
string => "user1:x:10001:100:User1Name:/home/user1:/bin/sh";
"shadow[user1]"
[some_logfile]
type = "LogfileInput"
logfiles = [ "/tmp/some_logfile" ]
[some_logfile_counter_filter]
type = "CounterFilter"
message_matcher = "Type == 'logfile' && Logger == '/tmp/some_logfile'"
[counter_output]
type = "LogOutput"
@zined
zined / gist:5881186
Created June 27, 2013 23:06
hekad.toml
##### INPUT
[var_log_kern_log]
type = "LogfileInput"
logfile = "/var/log/kern.log"
seekjournal = "./var/run/hekad/seekjournals"
##### DECODER
[var_log_kern_log_decoder]
type = "LoglineDecoder"
matchRegex = '/^(?P<Timestamp>\w+ \d+ \d+\:\d+\:\d+) (?P<Hostname>[^\ ]+) (?P<Event>[^\ ]+) (?P<Message>.*)$/'
@zined
zined / gist:6616881
Last active December 23, 2015 09:49
from hetzner to hetzner... they seem to have a pretty large... solid... complex... AAAAALL THE INTERWEBZ!
fatbaby.de (0.0.0.0) Thu Sep 19 00:53:47 2013
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. static.65.54.9.176.clients.your-server.de 0.0% 697 0.7 1.4 0.5 7.0 0.9
2. hos-bb3.juniper1.rz15.hetzner.de 0.0% 697 0.2 2.3 0.1 163.6 10.0
3. core21.hetzner.de 0.0% 697 0.3 0.3 0.2 12.1 0.7
4. juniper1.rz13.hetzner.de 80.2% 697 0.3 2.1 0.2 49.0 7.4
5. hos-tr2.ex3k4.rz13.hetzner.de 80.3% 697 0.8 1.8 0.7 4.5 0.9
6. ???
@zined
zined / gist:6807740
Created October 3, 2013 10:03
#statParty
[zined@wurstbrot testing]$ mkdir -p 0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16
[zined@wurstbrot testing]$ touch 0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/foo
[zined@wurstbrot testing]$ strace php -r 'file_exists("./0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/foo");' 2>&1 | grep lstat
lstat("/home/zined/go/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/home/zined/go/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/local/sbin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/local/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8419512, ...}) = 0
@zined
zined / gist:7155543
Created October 25, 2013 14:28
puppet / hiera env
# dpkg -l | grep puppet
ii hiera 1.2.1-1puppetlabs1 A simple pluggable Hierarchical Database.
ii hiera-puppet 1.0.0-1puppetlabs1 A simple pluggable Hierarchical Database.
ii puppet 2.7.19-1puppetlabs2.1 Centralized configuration management - agent startup and compatibility scripts
ii puppet-common 2.7.19-1puppetlabs2.1 Centralized configuration management
ii puppetdb-terminus 0.9.0-1puppetlabs1 Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
ii puppetmaster-common 2.7.19-1puppetlabs2.1 Puppet master common scripts
ii puppetmaster-passenger 2.7.19-1puppetlabs2.1 Centralised configuration management - master setup to run under mod passenger
@zined
zined / gist:7155664
Last active December 26, 2015 12:59
puppetmaster hiera lookup debug log
Oct 25 15:52:59 puppet01 puppet-master[11205]: Automatically imported nagios::cloudwatch::params from nagios/cloudwatch/params into production
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Hiera YAML backend starting
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Looking up nagios_cloudwatchplugin_aws_secret_access_key in YAML backend
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Looking for data source common
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Looking up nagios_cloudwatchplugin_aws_access_key_id in YAML backend
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Looking for data source common
Oct 25 15:52:59 puppet01 puppet-master[11205]: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
root@cashcow ~/src/bitcrack # jruby -S gem install bitcoin
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:65535:in `call'
@zined
zined / gist:8162295
Last active January 1, 2016 15:09
from 2011: "PoC: Call of PROTECTED functions from unsecure LUA execution path"
-----------------------------------------------------------------------------------------
-- small proof of concept which hooks into MAIL_SUCCESS, and sends the total amount of
-- money on the char to some other char.
--
-- with a little social engineering in some big guilds and some "not so aggressive" style
-- of "how much money do we want to send" algorithm :) like "always send 1% of the
-- char's total money, with a cap of 100g or something like that" this could be heavily
-- abused...
--
-- functions used: