This file contains 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
function asmbler() | |
{ | |
f=$(mktemp) | |
cat<<EOF>${f}.s | |
.globl _main | |
.intel_syntax noprefix | |
_main: | |
EOF |
This file contains 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
# Based on: slack_rtl_support_mac.sh By Oren Yomtov: https://gist.github.com/orenyomtov/3d0f2412afa1c4a9eb207d3d4310e988 | |
# Tested on Win10 | |
# Prerequisites: Node.js | |
# Node.js can be downloaded from: https://nodejs.org/en/download/ | |
# if can't run scripts, open powershell an run: | |
# cat path/to/script.ps1 | powershell | |
Write-Output "Getting Slack Directory" | |
$slackdir = Get-Process -name 'slack' | Select-Object -First 1 | Select -ExpandProperty "path" | Split-Path |
This file contains 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
UNISTD_PATH = '/usr/include/x86_64-linux-gnu/asm/unistd_64.h' | |
def get_syscall_numbers(unistd_path=UNISTD_PATH): | |
d = {} | |
with open(unistd_path, 'r') as f: | |
for line in f.readlines(): | |
if line.startswith('#define __NR_'): | |
try: | |
syscall_data = line.strip().split() | |
d[syscall_data[1].replace('__NR_', '')] = int(syscall_data[2]) |