Skip to content

Instantly share code, notes, and snippets.

@forensicmike
Created July 12, 2021 14:06
Show Gist options
  • Save forensicmike/3f9886feaea1a23568b250b3cec80200 to your computer and use it in GitHub Desktop.
Save forensicmike/3f9886feaea1a23568b250b3cec80200 to your computer and use it in GitHub Desktop.
Add colors to your frida script
const colors = {
colorize: (str, cc) => `\x1b${cc}${str}\x1b[0m`,
red: str => colors.colorize(str, '[31m'),
green: str => colors.colorize(str, '[32m'),
yellow: str => colors.colorize(str, '[33m'),
blue: str => colors.colorize(str, '[34m'),
cyan: str => colors.colorize(str, '[36m'),
white: str => colors.colorize(str, '[37m'),
};
// Usage:
// console.log(colors.yellow('This is a test'));
@forensicmike
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment