Skip to content

Instantly share code, notes, and snippets.

View wparad's full-sized avatar
🇨🇭
I solve security in SaaS.

Warren Parad wparad

🇨🇭
I solve security in SaaS.
View GitHub Profile
@wparad
wparad / ssh_into_android.md
Last active November 29, 2024 14:44 — forked from raveenb/ssh_into_android.md
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@wparad
wparad / aws_vpn.tf
Last active January 10, 2022 17:23
Creates an AWS Client VPN with security groups given a VPC
locals {
environment = "dev",
vpc = {
vpc_id = "VPC_ID",
private_subnets = ["SUBNET_ID_1"]
}
}
resource "aws_cloudwatch_log_group" "vpn_cloudwatch_log_group" {
@wparad
wparad / findDanglingElasticIpAddresses.js
Last active October 3, 2021 17:32
Find Route53 records pointing to unowned IP Addresses
// This is also a config rule: https://eu-west-2.console.aws.amazon.com/lambda/home?region=eu-west-2#/create/app?applicationId=arn:aws:serverlessrepo:eu-west-1:922723803004:applications/Elastic-IP-Config-Rule
const { Route53, EC2, config } = require('aws-sdk');
config.region = 'eu-west-1';
async function findDanglingElasticIpAddresses(dryRun = true) {
const route53 = new Route53();
let hostedZoneIds;
try {
console.log('Looking up hosted zones:');
@rhosys-service-account
rhosys-service-account / cloud-formation.js
Last active November 21, 2020 10:35
Step Function execution example including error handling
/** Example used to support creating custom domains with https://authress.io */
const stepFunctionResource = {
"Type": "AWS::StepFunctions::StateMachine",
"Properties": {
"StateMachineName": {
"Fn::Sub": "${AWS::StackName}-CustomDomain"
},
"LoggingConfiguration": {
"Destinations": [{
"CloudWatchLogsLogGroup": {
@rhosys-service-account
rhosys-service-account / auth-manager-routes.js
Last active November 21, 2020 10:35
Google Oauth identity provider quick start guide
const loginClient = new LoginClient({
// Both of these properties an be found and configured at:
// https://authress.io/app/#/manage?focus=applications
authenticationServiceUrl: 'https://login.application.com',
applicationId: 'YOUR_APPLICATION_ID'
});
// This will redirect the user to Google, track their session with Authress,
// and then redirect back to your specified redirectUrl. By default we redirect them back
// to where they started, however usually you’ll want to specify the next location
@raveenb
raveenb / ssh_into_android.md
Last active April 23, 2025 13:25
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@jarbro
jarbro / symantec-vip-access-totp.md
Last active April 2, 2025 07:13
Generate Symantec VIP Access Token as TOTP

Generate Symantec VIP Access Token as OTP

Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.

There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...

hello

Instructions

Here we install python3-pip and qrencode so we can generate our secret, I

@incyclum
incyclum / AWS IAM Policy - ForceMFA.json
Last active April 2, 2020 20:02
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA -- *EDIT*: I forgot where I found it in the 1st place. In fact this policy is explained statement by statement in AWS docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-man…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@dashohoxha
dashohoxha / install_wifi_access_point.sh
Last active June 7, 2024 18:03
How to setup a Wifi Access Point on Ubuntu 12.04 (or its derivatives).
#!/bin/bash
### Setup a wifi Access Point on Ubuntu 12.04 (or its derivatives).
### make sure that this script is executed from root
if [ $(whoami) != 'root' ]
then
echo "
This script should be executed as root or with sudo:
sudo $0
"