Skip to content

Instantly share code, notes, and snippets.

View hvisage's full-sized avatar
💭
I may be slow to respond.

hvisage

💭
I may be slow to respond.
View GitHub Profile
@hvisage
hvisage / hosts
Last active August 28, 2015 01:54 — forked from fclairamb/hosts
TINC setup ansible playbook It generates a private/public key pair on each host, get each public key and push them back to each server
# sample config file
[do]
198.199.74.236 tinc_ip=10.1.1.1 hostname=ca_1_1 tinc_connectto=ca_2_2
192.34.60.13 tinc_ip=10.1.1.2 hostname=ca_1_2 tinc_connectto=ca_1_1
198.199.70.163 tinc_ip=10.1.1.3 hostname=ca_1_3 tinc_connectto=ca_1_2
198.199.71.204 tinc_ip=10.1.2.1 hostname=ca_2_1 tinc_connectto=ca_1_3
198.199.70.208 tinc_ip=10.1.2.2 hostname=ca_2_2 tinc_connectto=ca_2_1
%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR} %{NUMBER:xferTime} %{IP:remoteHost} %{NUMBER:fileSize} %{PATH:fileName} %{WORD:transferType} %{WORD: specialActionFlag} %{WORD:direction} %{WORD:accessmode} %{WORD:username} %{WORD:serviceName} %{WORD:authenticationMethod} %{DATA:aut} %{WORD:completionStatus}
https://grokdebug.herokuapp.com/
Fri Aug 29 16:53:15 2014 4 173.220.95.58 873550 /u01/clients/globeph/source/live-feed/140828_Ariana_Grande-JBB/IMG_7240.jpg b _ i r globeph ftp 0 * c
@hvisage
hvisage / git-submodule
Created August 15, 2015 01:15
git submodule example
git submodule add https://github.com/auraltension/ansible-role-docker-debian.git roles/docker-debian
@hvisage
hvisage / looping-items-roles
Created September 20, 2015 19:32
looping over items for roles
Yes, pass the array in via the role arguments and then loop over them inside the role itself. For example:
roles:
- { role: ruby, versions: [ "1.9.3-p448", "2.0.0-p247"]}
Then use "with_items: versions" inside the role.
@hvisage
hvisage / dms-list-csv.sh
Last active July 4, 2017 13:16
Take dead man snitches list into csv for reports
#!/bin/bash
TAG=aquacheck
API=$1
curl -su ${APIKEY}: https://api.deadmanssnitch.com/v1/snitches \
| jq -r 'sort_by(.status)|.[] | select(.tags[] | contains("${TAG}")) |[.name, .interval, .checked_in_at, .status]|@csv'
@hvisage
hvisage / getting jq to output ansible facts
Last active December 25, 2017 21:22
ansible & jq output of facts
for i in setup/*; do echo $if; jq '[.ansible_facts.ansible_hostname,.ansible_facts.ansible_devices.sda.size , .ansible_facts.ansible_all_ipv4_addresses[0]]' -c $i;done >list
and then, note the | @csv
for i in setup/*; do echo $if; jq '[.ansible_facts.ansible_hostname,.ansible_facts.ansible_devices.sda.size , .ansible_facts.ansible_all_ipv4_addresses[0]] | @csv' -r $i;done
"qa-pgdb01","120.00 GB","10.100.13.70"
for i in setup/*; do jq '[ .ansible_facts.ansible_hostname, .ansible_facts.ansible_all_ipv4_addresses[0] ] | join(", ")' -j $i;echo;done
qa-pgdb01, 10.100.13.70

Keybase proof

I hereby claim:

  • I am hvisage on github.
  • I am hvisage (https://keybase.io/hvisage) on keybase.
  • I have a public key whose fingerprint is 1465 2C66 7427 E67B E886 CB40 9C13 84B1 168F D423

To claim this, I am signing this object:

@hvisage
hvisage / SAResources.md
Created January 21, 2019 09:00 — forked from dalenunns/SAResources.md
List of SA Resources
@hvisage
hvisage / hacker_howto.md
Created January 21, 2019 09:00 — forked from dalenunns/hacker_howto.md
A list of resources on how to be a hacker/pentester/security person - from #infosec on zatech.slack.com

Howto be a Hacker/Pentester/Security person - List of resources

I've just stolen HypnZA list of suggested links and added a few others by various people. (Please feel free to send me other links/info you think might be useful to add.)

HypnZA's commonly shared list (in the correct order):

  1. https://www.hacksplaining.com
  2. https://pentesterlab.com/exercises/web_for_pentester and https://pentesterlab.com/exercises/web_for_pentester_II
  3. Watch Ippsec's HackTheBox videos from oldest to newest, but attempt the box in the video before watching the video (requires a paid hackthebox account to access the machines in the videos)
@hvisage
hvisage / ovs-cheat.md
Created March 9, 2020 20:45 — forked from djoreilly/ovs-cheat.md
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port