Skip to content

Instantly share code, notes, and snippets.

View wesinator's full-sized avatar

Wes wesinator

View GitHub Profile
@williballenthin
williballenthin / .gdbinit
Last active March 14, 2024 19:20
yet another gdb cheatsheet
set disassembly-flavor intel
set disassemble-next-line on
set history save on
set print pretty on
set pagination off
set confirm off
define xxd
dump binary memory dump.bin $arg0 $arg0+$arg1
#!/bin/sh -e
vmname=$1
#VBoxManage modifyvm $vmname --biossystemtimeoffset $(( 1000 * 60 * 60 * 3 ))
VBoxManage modifyvm $vmname --biossystemtimeoffset 0

The configure file is /etc/sudoers.

For all the group of admin:

%admin ALL=(ALL) NOPASSWD: NOPASSWD ALL

For the user of liuxd:

liuxd ALL=(ALL) NOPASSWD: ALL
@gonghao
gonghao / install_pycurl.sh
Created September 27, 2017 06:49
pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
export PYCURL_SSL_LIBRARY=openssl
pip install pycurl --compile pycurl --no-cache
@tom-ficke
tom-ficke / ReadAndForward.py
Last active January 4, 2019 18:58
Script to Read Messages in IMAP Inbox & Forward to Another Email Address
#!/usr/bin/env python
#
# Script to Read Messages in IMAP Inbox & Forward to Another Email Address
#
# Script Created from :
# http://codehandbook.org/how-to-read-email-from-gmail-using-python/
# https://stackoverflow.com/questions/2717196/forwarding-an-email-with-python-smtplib
import smtplib
import imaplib
@Silvenga
Silvenga / Disable Malicious Software Removal Tool From Installing.reg
Created November 2, 2017 23:35
Disable Malicious Software Removal Tool From Installing
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MRT]
"DontOfferThroughWUAU"=dword:00000001
for b in $(git fsck --lost-found | grep blob | awk '{print $3}'); do git cat-file -p $b | grep -q ${UNIQUE_CODE} && echo $b; done
@Aerijo
Aerijo / making_language_grammar.md
Last active February 8, 2025 02:42
Guide to writing an Atom language grammar

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

@ilansmith
ilansmith / time_limit.bat
Last active June 15, 2019 04:35
Set Windows 10 local user time restrictions
@echo off
set MORNING=6:00am-8:00am
set SCHOOL=8:00am-1:00pm
set AFTERNOON=1:00pm-6:00pm
set EVENING=6:00pm-12:00am
set NIGHT=12:00am-6:00am
set LIMIT=SU-SA,%AFTERNOON%;F,%EVENING%;SA,%MORNING%,%SCHOOL%
rem echo MORNING:%MORNING%
@chrisdoman
chrisdoman / families.csv
Created March 8, 2018 17:11
Malware families in OTX
We can't make this file beautiful and searchable because it's too large.
#Trojan:Win32/AgentBypass,92bc9fe6a053916317d1ea78aa342265e32c0c8e70f51e9af0028e6fcc7f917a|,Trojan.Win32.Demp.cxoswz|TrojanDropper.Demp.aao|Trojan[Dropper]/Win32.Injector|
:FileSizeLE10000,34575189df0d1e5a1c7f1d505cc6eb0c41ac9e8a7edcb72eae2298d25cb4e6f2|,Android.Shedun.E|Android.Trojan-Dropper.Shedun.b|Other:Android.Reputation.2|A.L.Rog.SexVideo.EI|Trojan.Android.MLW.ebzlbe|Android.DownLoader.329.origin|Trojan[Dropper]/Android.Shedun.v|Android-PUP/SmsPay.72a8b|a.gray.tatic|Trojan-Dropper.AndroidOS.Shedun|Android/Piom.JO!tr|Win32/Trojan.ecf|
Backdoor:MSIL/Lizarbot,fb3a52e70eedcc6cab0ddde2fe47b5729a6c96f83fecf0b06b3b8ee9942eef2f|40c95b2afb8d7e4e4252968d5234f24c71181c0252819d850694b4489a43ca28|c80d3e483e423b271a2fd7dc89ffa7612409f13ed66dc3faa5b40d0bcf725f72|177cd95dcc500338d433455461d8ce0a2c159657a287baae01de8ffc77155291|,Backdoor.Lizarbot.FC.2716|Backdoor.IRCBot|BKDR_LIZARBOT.SMVJ18|Win32.Trojan.WisdomEyes.16070401.9500.9998|W32/Trojan.QJOG-5659|Backdoor.IRC.Bot|BKDR_LIZARBOT.SMVJ18|Win.Trojan.Lizarbot-1|MSIL.T