Skip to content

Instantly share code, notes, and snippets.

macOS domain specific nameservers:

  1. sudo mkdir /etc/resolver
  2. create file /etc/resolver/ with contents:
nameserver <IP of desired nameserver>

example:

meta:
id: exapunks_solution
file-extension: exapunks_solution
endian: le
seq:
- id: magic
contents: [0xEF, 0x03, 0x00, 0x00]
- id: file_id
type: pstr
- id: name
@fridtjof
fridtjof / wsaerrors.py
Created December 6, 2017 14:17
This script adds an enum for all WSA Error codes
# This script adds an enum for all WSA Error codes
# IDA 7 API
# Windows-Sockets Error Codes https://msdn.microsoft.com/de-de/library/windows/desktop/ms740668(v=vs.85).aspx
id = idaapi.add_enum(idaapi.get_enum_qty(), "WSAERROR", idaapi.decflag())
idaapi.add_enum_member(id, "WSA_OPERATION_ABORTED", 995)
idaapi.add_enum_member(id, "WSA_IO_INCOMPLETE", 996)
idaapi.add_enum_member(id, "WSA_IO_PENDING", 997)
idaapi.add_enum_member(id, "WSAEINTR", 10004)
@fridtjof
fridtjof / powershell_wrapper.sh
Last active January 14, 2024 22:04
This is a wrapper for launching powershell scripts using shebang on WSL. Put the name of your user's directory into the second line, save this file into /usr/bin and make it executable.
#!/bin/bash
YOUR_WINDOWS_USERDIRECTORY_NAME_HERE=""
WIN_TEMP_PATH="/mnt/c/Users/$YOUR_WINDOWS_USERDIRECTORY_NAME_HERE/AppData/Local/Temp"
CURRENT_DIR=`pwd`
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit 1

Keybase proof

I hereby claim:

  • I am fridtjof on github.
  • I am fridtjof (https://keybase.io/fridtjof) on keybase.
  • I have a public key ASCcfKPpIG4fI1STlcjYvVic4PytTKmjZG5g8io60BcZqgo

To claim this, I am signing this object:

@fridtjof
fridtjof / scriptlog
Created December 12, 2013 21:45
TTYPlay login script
#!/bin/bash
#notify users per mail and write (now wrapped through notifydelay script by Kilobyte)
notify() {
USER_TO_NOTIFY=$1
MESSAGE="$USER logged in!"
notifydelay $USER_TO_NOTIFY $MESSAGE
echo "$MESSAGE" | mail $USER_TO_NOTIFY
}
#notifydelay by kilobyte, feature gets triggered if user runs a program with a specific command