Skip to content

Instantly share code, notes, and snippets.

@lu-chi
lu-chi / yara_performance_guidelines.md
Created April 25, 2020 04:48 — forked from Neo23x0/yara_performance_guidelines.md
YARA Performance Guidelines

YARA Performance Guidelines

When creating your rules for YARA keep in mind the following guidelines in order to get the best performance from them. This guide is based on ideas and recommendations by Victor M. Alvarez and WXS.

  • Revision 1.3, October 2019, applies to all YARA versions higher than 3.7

Faster / Resource Friendly Statements

  • Bad: Regular Expressions
@lu-chi
lu-chi / kali_osx_persistence_wifi.md
Created March 8, 2019 00:26 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with persistence and wireless on Macbook Pro

Kali Linux Bootable USB with Persistence and Wireless on OSX

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.

Download the SHA256SUMS and SHA256SUMS.gpg files from the same location.

@lu-chi
lu-chi / vpn.md
Created February 22, 2018 14:27 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

# issue with python2,3 installations on osx
$ sudo easy_install pip
$ sudo pip install --upgrade virtualenvwrapper
$ sudo ln -s /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/virtualenv /usr/local/bin/virtualenv
@lu-chi
lu-chi / ex01
Created December 2, 2016 19:20
ptyhon exercises
class Lunch:
def get_menu_price(self, menu):
menus = {"menu_1": 15.00, "menu_2":30.00}
return menus[menu]
class Lunch2:
def get_menu_price(self, menu):
menus = {"menu_1": 15.00, "menu_2":30.00}
@lu-chi
lu-chi / gdbinit
Created August 27, 2016 00:36 — forked from CocoaBeans/gdbinit
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@lu-chi
lu-chi / 32.asm
Created August 23, 2016 23:54 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@lu-chi
lu-chi / harryPotterAliases
Created June 14, 2016 08:21 — forked from graceavery/harryPotterAliases
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
@lu-chi
lu-chi / vagrant-hostname.sh
Created December 28, 2015 21:21
Vagrant Guest Hostname: put guest machine IP in our hosts file
#!/bin/sh
# Pulls guest machine IP address and updates our host file
# so we can access it from our browser.
#
# Usage: ./vagrant-hostname.sh [list-of-hosts]
# if no [list-of-hosts] is set, it will use the contents of `default_domains` variable below.
#
# Examples: ./vagrant-hostname.sh
# ./vagrant-hostname.sh myguestmachine.com local.mydevenv.com
#
@lu-chi
lu-chi / raspberry-pi-vpn-router.md
Created October 24, 2015 09:46 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2015-09-24-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: