Skip to content

Instantly share code, notes, and snippets.

Peter Lodri szepnapot

Block or report user

Report or block szepnapot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@szepnapot
szepnapot / install-apktool.sh
Last active May 20, 2019 — forked from bmaupin/install-apktool.sh
Install apktool in Linux
View install-apktool.sh
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads
export apktool_version=2.4.0
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$apktool_version.jar -O /usr/local/bin/apktool.jar'
sudo chmod +r /usr/local/bin/apktool.jar
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool'
sudo chmod +x /usr/local/bin/apktool
# To use:
# apktool d TelephonyProvider.apk -o TelephonyProvider
@szepnapot
szepnapot / ubuntu_hardening.sh
Created May 10, 2019
[Uubntu hardening] #security #harden #ubuntu
View ubuntu_hardening.sh
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
```
------------ auto update
```
@szepnapot
szepnapot / build_android_roms.sh
Created May 10, 2019
[How to build Androdi ROMs on Ubuntu 16.04] #aosp #build #ubuntu
View build_android_roms.sh
# setup repo tool
mkdir -p ~/bin
wget 'https://storage.googleapis.com/git-repo-downloads/repo' -P ~/bin
r
# install dependencies
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev
mkdir -p ~/aosp/pie
@szepnapot
szepnapot / ubuntu_unattended_upgrades_gmail.markdown
Created Mar 22, 2019 — forked from roybotnik/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications
View ubuntu_unattended_upgrades_gmail.markdown

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

View How to leave a message for a github.com user
<input id=username type="text" placeholder="github username or repo link">
<button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO</button>
<div id=results></div>
@szepnapot
szepnapot / update_root_urls.sh
Last active Feb 25, 2019
Downloads alexa top 1 million site csv and load the urls into noisy's config.json
View update_root_urls.sh
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
curl -sSL "http://s3.amazonaws.com/alexa-static/top-1m.csv.zip" | tar xvfz - -C .
python - <<EOF
import json
@szepnapot
szepnapot / recover.py
Last active Feb 18, 2019
Recover a secret string from random triplets
View recover.py
from itertools import chain
def get_behind_chars(c, pool):
behind = []
for item in pool:
if c in item:
chars = item[item.index(c):]
[behind.append(_) for _ in chars if _ != c]
return list(set(behind))
@szepnapot
szepnapot / docker.md
Last active Feb 18, 2019
Docker stuffs
View docker.md

E: Unable to locate package [xxx]

apt-get update
apt-get install apt-file
apt-file update
View aws.md

Install the CLI

sudo apt-get install python-pip
sudo pip install awscli

# upgrade
sudo pip install --upgrade awscli
@szepnapot
szepnapot / archive_multi_into_flatzip
Created Feb 6, 2019
[create flat zip from multi dir] create a zip with multiple files without sub-folders #bash #unix #shortcut
View archive_multi_into_flatzip
zip myfiles d0
(cd f1; zip -u ../myfiles.zip d1)
(cd f2/f3; zip -u ../../myfiles.zip d4)
# example
# zip project3.zip -j a/*.hdl
# (cd b; zip -u ../project3.zip *.hdl)
# The parentheses create subshells, and the effect of the cd only lasts in the subshell,
# so you don't have to cd back to the original directory.
You can’t perform that action at this time.