Skip to content

Instantly share code, notes, and snippets.

@matandobr
matandobr / PrivatePypiWindows.md
Last active July 11, 2021 11:06
Configuring private PyPi/PIP server Windows 10

How to configure Windows PIP to install packages from alternative PyPi

Configuring PIP

First, Figure out where is the 'global' setting is taken from -

C:> pip -v config list

It will print something like -

@matandobr
matandobr / aes_decrypt.py
Last active February 16, 2021 07:53
pycryptodome python 3.6.8 AES decryption
# Tested on Windows 10 with Python 3.6.8
# pycryptodome==3.10.1
# Tested with AES 128 but should work with others
# Based on https://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256 thread
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
IV_ASCII = 'ffaaffaaffaaffaaffaaffaaffaaffaa' # example of 16 bytes len of ascii-represented hex string IV
AES_KEY = '\xaa' * 16 # example of 16 bytes len binary key
@matandobr
matandobr / merger.py
Last active November 7, 2023 06:55 — forked from ericmjl/merger.py
A Python script for merging PDF files together into a single PDF.
"""
Author: Eric J. Ma
Updated: Matan Dobrushin
Purpose: Merge all PDFs in the current directory together.
Install: pip install PyPDF2==3.0.1
"""
import os
#!/bin/sh
#
# @0xGr00t, 2018
# This is a simple shell script that does exactly what SuperSU guided in their code.
# Tested on AVD android 7 arm64 emulator (sdk25) with macOS host
# Before you run this, make sure you have downloaded SuperSu flashable zip from their site, and cd into it
# To this to work properly, run the emulator with -no-snapshot -writable-system flags
# For example: MacBook-Pro-2:tools matandobr$ ./emulator -no-snapshot -writable-system @Nexus5API25
# There is one issue I faced - when starting the emulator it won't boot until you disable SELinux (adb shell setenforce 0)
# After the boot completes you can turn it back on.
@matandobr
matandobr / XposedFlash.sh
Created January 18, 2018 16:32
Manual flashing Xposed framework (v89) on AVD armv7 android 6 - SDK23 emulator
#!/bin/sh
#
# @0xGr00t, 2018
# This is a simple shell script that is based on Xposed's update-binary script
# Tested on AVD android 6 armv7 emulator (sdk23) with macOS host
# Before you run this, make sure you have downloaded Xposed flashable zip from their site, and cd into it
# To this to work properly, run the emulator with -no-snapshot -writable-system flags
# For example: MacBook-Pro-2:tools matandobr$ ./emulator -no-snapshot -writable-system @Nexus5API23
# You should flash SuperSU before flashing Xposed - https://gist.github.com/matandobr/48665a60adb4ae5d7a3b956819aa42d9
# GoodLuck <3
@matandobr
matandobr / SuperSUFlash.sh
Last active August 1, 2020 14:33
Manual flashing SuperSU (2.82) on AVD armv7 android 6 - SDK23 emulator
#!/bin/sh
#
# @0xGr00t, 2018
# This is a simple shell script that does exactly what SuperSU guided in their code.
# Tested on AVD android 6 armv7 emulator (sdk23) with macOS host
# Before you run this, make sure you have downloaded SuperSu flashable zip from their site, and cd into it
# To this to work properly, run the emulator with -no-snapshot -writable-system flags
# For example: MacBook-Pro-2:tools matandobr$ ./emulator -no-snapshot -writable-system @Nexus5API23
# cd into the extracted SuperSU-v2.82 folder, and run it from there.
# There is one issue I faced - when starting the emulator it won't boot until you disable SELinux (adb shell setenforce 0)

Keybase proof

I hereby claim:

  • I am matandobr on github.
  • I am matandobr (https://keybase.io/matandobr) on keybase.
  • I have a public key ASDyUEY4EKpqJNohaci5bTL5uUlB_tnIWb0CJ9iTDGI81wo

To claim this, I am signing this object: