Skip to content

Instantly share code, notes, and snippets.

@kellyvaughn
kellyvaughn / noodles.js
Created June 5, 2023 01:38
Accept LinkedIn Requests
const btns = document.querySelectorAll('button[aria-label*="Accept"]')
for(const btn of btns){
setTimeout(() => { btn.click() }, 300)
}
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@dayne
dayne / 0-ssh-agent_checker_launcher.md
Last active July 4, 2023 11:09
ssh-agent checker/launcher

ssh-agent checker/launcher

about

A bash script for managing ssh-agent that I use for Ubuntu and OSX.

Started as a variation from this classic on Stack Overflow How to check if ssh-agent is already running and then adapted it to align with behaivor I want.

This version does the following:

  • checks for ssh agent forward (remote login) and if so does not setup ssh-agent or any keys
@shortjared
shortjared / list.txt
Last active May 10, 2024 19:49
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@pierreozoux
pierreozoux / stale_security_groups.py
Last active September 30, 2021 01:31 — forked from astrikos/stale_security_groups.py
Script to detect stale AWS security groups
#!/usr/bin/env python3
import boto3
import argparse
class StaleSGDetector(object):
"""
Class to hold the logic for detecting AWS security groups that are stale.
"""
def __init__(self):
super(StaleSGDetector, self).__init__()
@astrikos
astrikos / stale_security_groups.py
Created November 9, 2017 15:52
Script to detect stale AWS security groups
#!/usr/bin/env python
import boto3
import argparse
class StaleSGDetector(object):
"""
Class to hold the logic for detecting AWS security groups that are stale.
"""
def __init__(self, **kwargs):
@dgulinobw
dgulinobw / show_limits.sh
Last active August 13, 2021 12:05
Show percentage used of 1) per-process ulimit open files, and 2) system-wide open files limit.
#!/bin/bash
printf "%-20s %10s %10s %14s\n" "Process" "Ulimit" "Used" "% Ulimit Used"
length=62
printf -v line '%*s' "$length"
echo ${line// /-}
# gather proceses to list from all of /var/run/
for f in $(find /var/run/ -type f -name "*.pid" | sort)
# gather processes to list from monit
#for f in $(grep pidfile /etc/monit.d/* | awk '{print $6}' | sort)
@jheller
jheller / Ansible CloudFormation Macros.md
Last active January 4, 2023 19:37
Using Ansible/Jinja macros to generate CloudFormation templates

Generating CloudFormation Templates from YAML Dictionaries

The security group and Network ACLs parts of CloudFormation templates can be difficult to read. This template containing Jinja macros converts easier-to-read YAML dictionaries of security group and NACL rules into JSON.

Here ais a generic macro template and some example files showing how to use it.

  • cloudformation.macros.j2 - the macros
  • cf_vars.yml - YAML dictionaly of security groups and NACLs, including some complex rules for both
  • test.template.j2 - a simple CloudFormation template that uses the macro file
  • cf_test.yml - a simple Ansible playbook that generates CloudFormation JSON from thr previous file.
#!/usr/bin/python
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions.
# Michael Davis (mike.philip.davis@gmail.com)
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import select
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser