Skip to content

Instantly share code, notes, and snippets.

@lrvick
lrvick / gov_ssh.csv
Last active June 24, 2018 00:14
Asking every public government ssh server its banner
Domain SSH Banner
ABINGDON-VA.GOV SSH-2.0-OpenSSH_5.1
ABERDEENWA.GOV SSH-2.0-OpenSSH_7.4
ABSECONNJ.GOV SSH-2.0-OpenSSH_5.3
ACCESSPRINCETONNJ.GOV SSH-2.0-OpenSSH_5.3
ADAK-AK.GOV SSH-2.0-OpenSSH_5.1
AHOSKIENC.GOV SSH-2.0-OpenSSH_7.4
ALAMEDACA.GOV SSH-2.0-OpenSSH_5.3
ALEKNAGIKAK.GOV SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
ALLENDALENJ.GOV SSH-2.0-OpenSSH_5.1
@lrvick
lrvick / raw_email.md
Last active December 17, 2020 19:55
TLDR guide to sending an email with telnet
  1. Connect to the hashbang mail server with telnet

    > ssh sf1.hashbang.sh telnet localhost 25
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.
    220 sf1.hashbang.sh ESMTP Postfix (Debian/GNU)
    
  2. Announce yourself to the mail sever

@lrvick
lrvick / aws-assume-role.sh
Last active May 31, 2018 17:47
Assume an AWS role for Organization accounts with shared IAM
#! /bin/bash
# Usage:
# source aws-assume-role 281158451634
account=$1
unset AWS_SESSION_TOKEN
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
@lrvick
lrvick / Dockerfile
Last active May 22, 2018 02:31
Openpgp.js issue 710 failing testcase
FROM node:9.11.1
RUN apt-get install gnupg
ADD . /home/node/
WORKDIR /home/node
RUN chmod +x /home/node/test.sh
@lrvick
lrvick / main.yml
Created May 9, 2018 18:04
Ansible pattern for multi-os configuration
---
- hosts: all
become: yes
become_user: "{{ lookup('env','SUDO_USER') }}"
tasks:
- name: Display OS Details
block:
- debug:
var: ansible_distribution
verbosity: 1
@lrvick
lrvick / .plan
Last active June 15, 2018 01:36
Plan
## Projects
* Win a black badge at defcon
* place in a FPV quadcopter race
* Troll router that spams endless hotspot names
* markdown to json blog engine overhaul for rant
* varnish/jsdom proxy
* auto screen locking with BLE/HID module
* migrate all personal services to terraform/kubernetes
* 3D code data wallpaper generator
reverted:
--- b/aliases
+++ a/aliases
@@ -1,2 +1,3 @@
# See man 5 aliases for format
postmaster: root
+root: [email protected]
reverted:
--- b/apparmor.d/abstractions/tor
+++ a/apparmor.d/abstractions/tor
@lrvick
lrvick / ansible_deploy.yml
Last active April 28, 2022 22:18
Bootstrap Ansible-Pull systemd automation with GPG verification
---
- hosts:
tasks:
- apt:
update_cache: true
name: ansible
state: present
- name: Install trusted author PGP keys
@lrvick
lrvick / aws_config
Last active April 22, 2018 11:27
Use AWS CLI transparently with TOTP and IAM accounts.
[default]
region = us-west-2
output = json
[profile example]
role_session_name = example
mfa_serial = arn:aws:iam::567582265868:mfa/example
credential_process = bash -c "~/.aws/aws-mfa.sh example path/to/credentials.gpg"