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
| softwareupdate --fetch-full-installer --full-installer-version 10.15.7 |
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
| cloc $(git ls-files) |
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
| upower -i `upower -e | grep 'BAT'` |
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 pluginname | |
| import importlib | |
| importlib.reload(pluginname);pluginname.callbackmethod(bv) | |
| #Push up, then enter |
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 | |
| max_mtime = 0 | |
| for dirname,subdirs,files in os.walk("."): | |
| for fname in files: | |
| full_path = os.path.join(dirname, fname) | |
| mtime = os.stat(full_path).st_mtime | |
| if mtime > max_mtime: | |
| max_mtime = mtime | |
| max_dir = dirname |
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 gdb | |
| class SimpleCommand(gdb.Command): | |
| def __init__(self): | |
| # This registers our class as "simple_command" | |
| super(SimpleCommand, self).__init__("simple_command", gdb.COMMAND_DATA) | |
| def invoke(self, arg, from_tty): | |
| # When we call "simple_command" from gdb, this is the method | |
| # that will be called. |
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 | |
| def reverse_readline(filename, buf_size=8192): | |
| """A generator that returns the lines of a file in reverse order""" | |
| with open(filename) as fh: | |
| segment = None | |
| offset = 0 | |
| fh.seek(0, os.SEEK_END) | |
| file_size = remaining_size = fh.tell() | |
| while remaining_size > 0: |
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
| apt-get install manpages-dev | |
| apt-get install manpages-posix-dev |
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
| #Qemu Usermode | |
| #Running binary with libraries and opening GDB port | |
| qemu-aarch64 -L /usr/aarch64-linux-gnu/ -g 1234 ./hello64 |
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
| sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc | |
| #For Qemu | |
| azeria@ubuntu:~$ sudo apt update -y && sudo apt upgrade -y | |
| azeria@ubuntu:~$ sudo apt install qemu-user qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu binutils-aarch64-linux-gnu-dbg build-essential | |