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 ida_typeinf | |
| import ida_funcs | |
| import ida_xref | |
| import idautils | |
| enum_name = "_FILE_INFORMATION_CLASS" | |
| til = ida_typeinf.get_idati() | |
| tif = til.get_named_type(enum_name) |
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 os | |
| import sys | |
| if sys.version_info < (3, 11): | |
| raise RuntimeError("Python 3.11 or higher is required for the MCP plugin") | |
| import json | |
| import struct | |
| import threading | |
| import http.server |
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
| /** | |
| * @brief Enumeration of options for curl_easy_setopt() based on libcurl. | |
| * | |
| * Note: The explicit integer values match those used by libcurl. | |
| * Options without explicit values increment from the previous one. | |
| */ | |
| typedef enum { | |
| /* Options expecting a long */ | |
| CURLOPT_PORT = 3, | |
| CURLOPT_TIMEOUT = 13, |
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
| eval (ssh-agent -c) | |
| set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK | |
| set -Ux SSH_AGENT_PID $SSH_AGENT_PID |
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 "dotnet" | |
| rule DotnetStartupHook { | |
| meta: | |
| description = "might be a .NET startup hook module" | |
| author = "William Ballenthin <[email protected]>" | |
| strings: | |
| $a1 = "StartupHook" | |
| $a2 = "Initialize" | |
| condition: |
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
| # decoding_routines.py | |
| # | |
| # An example of using FLOSS as a library to identify potential decoding routines. | |
| # It will print an ordered list of function addresses and their "score", | |
| # ranked from most likely to least likely to be a decoding routine. | |
| # | |
| # Usage: | |
| # | |
| # $ python decoding_routines.py /path/to/input.exe | |
| # 0x401000: 0.99 |
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 | |
| ''' | |
| compare vivisect analysis comparison across versions. | |
| pip install devtools[pygments] pydantic viv-utils termcolor | |
| ''' | |
| import sys | |
| import time | |
| import os.path | |
| import logging |
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
| #NoEnv | |
| #Warn | |
| SendMode Input | |
| SetWorkingDir %A_ScriptDir% | |
| SetCapsLockState AlwaysOff | |
| CapsLock::Send {esc} | |
| CapsLock & j::Send {Down} | |
| CapsLock & k::Send {Up} | |
| CapsLock & h::Send {Left} |
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 mmap | |
| def lines(m): | |
| line = m.readline() | |
| while line: | |
| yield line.decode("utf-8").rstrip("\n") | |
| line = m.readline() | |
| def filelines(path): | |
| with open(path, "rb") as f: |
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
| """ | |
| sort the given jsonl document (distinct json documents separated by newline) | |
| by the given key, writing the output to STDOUT. | |
| example: | |
| python sort-jsonl-by-key.py log.jsonl "timestamp" | |
| this does require reading the entire document into memory, first. | |
| a future revision could maybe use a mmap to avoid keeping things in memory. |
NewerOlder