Skip to content

Instantly share code, notes, and snippets.

View tarhan's full-sized avatar

Dmitriy Lekomtsev tarhan

  • Moscow, Russian Federation
View GitHub Profile
@tarhan
tarhan / socat-tty.sh
Created January 30, 2023 10:08 — forked from mathieue/socat-tty.sh
socat read tty serial and provide a server to read serial output
socat -d -d tcp-l:1234,reuseaddr,fork file:/dev/ttyUSB0,nonblock,raw,echo=0,waitlock=/var/run/tty,min=0,b38400
@tarhan
tarhan / install_ffmpeg_libfdkaac.sh
Created May 8, 2022 19:03 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@tarhan
tarhan / leaflet_numbered_markers.css
Created January 26, 2022 09:00 — forked from steflef/leaflet_numbered_markers.css
Numbered Markers in Leaflet (JS Mapping)
.leaflet-div-icon {
background: transparent;
border: none;
}
.leaflet-marker-icon .number{
position: relative;
top: -37px;
font-size: 12px;
width: 25px;
@tarhan
tarhan / capture_raw_frames.c
Created January 11, 2022 13:29 — forked from maxlapshin/capture_raw_frames.c
v4l2 capture example
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>

How to intercept all SSL connections from an Android x86 VM

This guide shows how to setup an Android VM in order to intercept all HTTPS requests. This was originally intended to reverse PlayServices but should work with any app that does not use certificate pinning (i.e. every app that relies on the system certificate authorities).

Inspired by this guide how to install Android x86 in VirtualBox, this guide how to install a system certificate on Android and this guide how to use mitmproxy with VirtualBox.

  1. Download a recent Android x86 ISO from here.

  2. Download a recent Kali Linux VirtualBox Image from here. (You can also use an

@tarhan
tarhan / cp11-async-curl.cpp
Created August 10, 2020 07:58 — forked from owickstrom/cp11-async-curl.cpp
C++11 Async cURL
#include <iostream>
#include <curl/curl.h>
#include <math.h>
#include <vector>
#include <future>
#include <boost/format.hpp>
#define logbase(a, b) (log(a)/log(b))
using namespace std;
@tarhan
tarhan / curl_request.py
Created June 6, 2020 18:37 — forked from kaka19ace/curl_request.py
using pycurl request (support multi request)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @file curl_request.py
# @author kaka_ace <xiang.ace@gmail.com>
# @date Jan 10 2015
# @breif learn from human_curl
# @refrences:
# http://pycurl.sourceforge.net/doc/curlmultiobject.html
# http://curl.haxx.se/libcurl/c/curl_multi_info_read.html
@tarhan
tarhan / patch_apk_for_sniffing.md
Created April 16, 2020 10:29 — forked from unoexperto/patch_apk_for_sniffing.md
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>
@tarhan
tarhan / ComponentIndex.js
Created February 26, 2020 18:51 — forked from davidgljay/ComponentIndex.js
Pattern for dynamically loading React components based on a config json object.
import config from '../config'
let components = {}
//For each component in the config fiel into an object
for (var i = config.length - 1; i >= 0; i--) {
components[config[i].name] = require(config[i].path).default
}
export default components
@tarhan
tarhan / grpc_asyncio.py
Created June 1, 2019 15:47 — forked from mmellison/grpc_asyncio.py
gRPC Servicer with Asyncio (Python 3.6+)
import asyncio
from concurrent import futures
import functools
import inspect
import threading
from grpc import _server
def _loop_mgr(loop: asyncio.AbstractEventLoop):