Skip to content

Instantly share code, notes, and snippets.

View Isuru-Nanayakkara's full-sized avatar

Isuru Nanayakkara Isuru-Nanayakkara

  • Colombo, Sri Lanka
View GitHub Profile
@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

@MelbourneDeveloper
MelbourneDeveloper / flutterhealthcheck.md
Last active March 29, 2023 04:04
Flutter App Health Check

✔️ Widget Tests

Widget tests should cover the main use cases in your app. They test the UI and logic, but don't need to be granular unit tests. The important things are

  • You have good code coverage. 90% + is usually a good indicator the main use cases are covered
  • The tests cover the full app - not isolated components
  • Tests run as integration tests on the target platforms

✔️ State Management

Most state management approaches are fine. The important thing are:

  • The codebase chooses one and uses it consistently
  • There is a separation of concerns (presentation, business, and infrastructure).
import UIKit
import Combine
public extension Task {
/// Keep a reference to a task that can be cancelled.
func store(in set: inout Set<AnyCancellable>) {
set.insert(AnyCancellable {
self.cancel()
})
}
import UIKit
extension UITextField {
/// Add a trailing placeholder label that tracks the text as it changes
func addTrailingPlaceholder(_ placeholder: String) {
let label = UILabel()
label.text = placeholder
label.alpha = 0.3
label.isHidden = true
let container = UIView()
@rohan20
rohan20 / main.dart
Created December 31, 2021 13:35
Flutter close iOS number keyboard (has no "Done" button)
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@MelbourneDeveloper
MelbourneDeveloper / Stuff That Software Developers Do.md
Last active April 15, 2024 12:30
Stuff That Software Developers Do

Stuff That Software Developers Do

This is a list of stuff that the average software developer does from week to week

Coding

  • Code design
  • Refactoring
  • Algorithms
  • Profiling
  • Code reviews
  • Building frameworks
@simonnickel
simonnickel / UIView+Embed.swift
Last active July 13, 2021 05:41
Simple UIView extension to embed a view in a container.
extension UIView {
struct EmbedInsets {
let top: CGFloat?
let left: CGFloat?
let right: CGFloat?
let bottom: CGFloat?
init(top: CGFloat? = nil, bottom: CGFloat? = nil, left: CGFloat? = nil, right: CGFloat? = nil) {
self.top = top
@IsaacXen
IsaacXen / README.md
Last active May 2, 2024 09:57
(Almost) Every WWDC videos download links for aria2c.
@HarshilShah
HarshilShah / UserDefault.swift
Created October 18, 2019 15:23
An observable property wrapper for UserDefaults
import Foundation
import Combine
@propertyWrapper
final class UserDefault<Wrapped>: NSObject, ObservableObject {
typealias Validator = (Wrapped) -> (Wrapped)
private let suite: UserDefaults
private let key: String
@davedelong
davedelong / build_script.sh
Created November 22, 2018 18:12
Auto-increment build numbers in release mode
# Automatically increment the CFBundleVersion in release builds
config=${CONFIGURATION}
if [ "${config}" = "Release" ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
else
echo "info: Skipping build number incrementation in ${config} mode"