Skip to content

Instantly share code, notes, and snippets.

@Fatimas1997
Fatimas1997 / intercept-HTTP-requests-from-Flutter-apps.md
Created October 9, 2023 21:31
How to intercept HTTP traffic from a Flutter application with Burp (Android and iOS)

Intercepting traffic on Android and iOS Flutter applications

I recently stumbled upon an application developed with Flutter, and since it was my first time seeing it, I surprisingly couldn't intercept its requests. After some digging on google, I created this tutorial with the steps that personally worked for me and I wanted to share them in hope to help someone else. Note that the applications that I tested didn't have certificate pinning implemented. I'll update this file once I get to test an application that has it (if I'll be able to bypass it 😃 ).
To simplify the explanation I refer to the machine that hosts Burp as Kali, but you can use whatever linux machine you want.

Android:

There are 2 ways to intercept HTTP connections from a Flutter application installed on an Android device (I'm sure there are more but these are the ones I know). Intercepting requests by changing the proxy settings of the device, through the classic settings of Android, doesn't work in this case, since Flutter applic

@pedrovgp
pedrovgp / upsert_df.py
Last active February 11, 2024 20:44
Allow upserting a pandas dataframe to a postgres table (equivalent to df.to_sql(..., if_exists='update')
# Upsert function for pandas to_sql with postgres
# https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/8702291#8702291
# https://www.postgresql.org/docs/devel/sql-insert.html#SQL-ON-CONFLICT
import pandas as pd
import sqlalchemy
import uuid
import os
def upsert_df(df: pd.DataFrame, table_name: str, engine: sqlalchemy.engine.Engine):
@tresni
tresni / README.md
Created September 8, 2020 17:49
Enabling Yubikey for sudo on OSX

Intro

Primarily, I use TouchID for sudo authentication on OSX, but I also tend to be connected to a CalDigit TS3 Plus dock and external monitors with my laptop lid closed. TouchID does not work in that situation.

In my quest to have another solution I found the instructions from Yubikey[1][2]. Unfortunately, the instructions are not well laid out, with formatting issues and some necessary information just missing. I hope to rectify that with this document.

Prerequisites

This has been tested on MacOS 10.14.6 and should work on MacOS 10.15. This README assumes you are using Homebrew; it should be possible to configure everything w

def train(model,
criterion,
optimizer,
train_loader,
valid_loader,
save_file_name,
max_epochs_stop=3,
n_epochs=20,
print_every=1):
"""Train a PyTorch Model
@k3muri84
k3muri84 / pre-commit
Last active May 8, 2021 14:44
ktlintFormat pre-commit hook
#!/bin/sh
# based on https://github.com/shyiko/ktlint pre-commit hook
# with further tweaks of @neugartf
set -e
CHANGED_FILES="$(git --no-pager diff --name-status --no-color --cached | awk '$1 != "D" && $2 ~ /\.kts|\.kt/ { print $2}')"
if [ -z "$CHANGED_FILES" ]; then
exit 0
fi;
@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active May 13, 2024 04:15
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@ryndel
ryndel / .float-label.md
Last active November 2, 2017 11:45
Float label css only solution

Float label

A web component that create a CSS-only floating label for input tags

Usage

The syntax for generating a float-label input is as follows: