Skip to content

Instantly share code, notes, and snippets.

View mmalchuk's full-sized avatar

Maksim Malchuk mmalchuk

View GitHub Profile
@mmalchuk
mmalchuk / getAndroidLocation.sh
Created November 10, 2019 09:30 — forked from furusiyya/getAndroidLocation.sh
Get location of android user on basis of MAC address
sudo curl -i -s -k -X 'POST' -H 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 5 Build/LRX22C)' -H 'Content-Type: application/x-www-form-urlencoded' \
'http://mobile.maps.yandex.net/cellid_location/?clid=1866854&lac=-1&cellid=-1&operatorid=null&countrycode=null&signalstrength=-1&wifinetworks=000000000000:-65&app=ymetro'
@mmalchuk
mmalchuk / keybase.md
Created January 24, 2019 10:29
keybase.md

Keybase proof

I hereby claim:

  • I am mmalchuk on github.
  • I am mmalchuk (https://keybase.io/mmalchuk) on keybase.
  • I have a public key ASCp06_UHD8KPw-SbGFtp3BcKVxy_TK2ocjImnLXQMXAQQo

To claim this, I am signing this object:

The below instructions describe the process for MITM'ing a target device over HTTPS using nginx. It tries to go over every aspect of intercepting traffic, including hosting a Wifi access point.

Overview

The goal is to get a target device (such as an iPhone, Wii U, or another computer) to trust our local nginx server instead of the remote trusted server. This is going to be done by importing a custom CA root certificate on the target that corresponds with the nginx server's certificate.

Client (Trusted Device) <--> MITM Server (nginx) <--> Remote (Trusted) Server

Requirements

These instructions are being performed on a PureOS machine, which is Debian based. They should also work in other environments with slight modifications

@mmalchuk
mmalchuk / compute1
Last active March 21, 2018 11:48
OSA configs
# Loopback
auto lo
iface lo inet loopback
# Physical interface
auto ens3
iface ens3 inet manual
# Container/Host management VLAN interface
auto ens3.10
@mmalchuk
mmalchuk / CentOS RPi.md
Created January 16, 2018 19:28
CentOS on the Raspberry Pi 3

CentOS on the Raspberry Pi 3

Installation

  • Download the official image from mirror.centos.org:
    • e.g. curl http://mirror.centos.org/altarch/7/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1708-RaspberryPi3.img.xz > CentOS.img.xz
  • Write the image you downloaded above:
    • e.g. xzcat CentOS.img.xz | dd of=/path/to/sd/card status=progress bs=4M; sync

Configuration

  • Boot your Raspberry Pi:
@mmalchuk
mmalchuk / ansible-summary.md
Created January 12, 2018 07:49 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@mmalchuk
mmalchuk / curl_rest_api.md
Created December 15, 2017 12:08 — forked from richardjortega/curl_rest_api.md
cURL REST API for Azure Resource Manager (ARM)

Using cURL and Azure REST API to access Azure Resource Manager (non-interactive)

Note: This guide assumes Azure CLI 2.0 is installed and familiarity with Azure concepts.

Register Client App and Obtain Service Principal (via CLI)

The APP_ID_URI needs to match what is expected in client request calls.

$ az ad sp create-for-rbac --name [APP_ID_URI] --password [PASSWORD]
@mmalchuk
mmalchuk / gist:8665149b7f08fdef5191c66b5c7fc60b
Created November 18, 2017 11:13
Android 6.0.1 (Build M4B30Z) Root for Nexus 5
# Download latest Android image, "hammerhead" for Nexus 5 (GSM/LTE)
https://developers.google.com/android/nexus/images#hammerhead
# Download latest TWRP
https://dl.twrp.me/hammerhead/
# Download latest SuperSu
https://download.chainfire.eu/supersu
Enable USB debugging.
(defn mul [num-str m]
(let [[acc v] (reduce (fn [[acc v] ch]
(let [n (+ v (* m (Integer/parseInt (str ch))))]
[(conj acc (rem n 10))
(quot n 10)]))
[[] 0]
(reverse num-str))]
(apply str (reverse (if (zero? v) acc (conj acc v))))))
(mul "9876545679" 7)