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
| from binaryninja import * | |
| from time import sleep | |
| class iBootView(BinaryView): | |
| long_name = 'iBoot' | |
| name = 'iBoot' | |
| PROLOGUES = [b'\x7F\x23\x03\xD5', b'\xBD\xA9', b'\xBF\xA9'] | |
| def log(self, msg, error=False): | |
| msg = f'[iBoot-Loader] {msg}' |
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 sys | |
| import struct | |
| def read32(stream): | |
| retVal, = struct.unpack_from('<I', stream.read(4), 0) | |
| return retVal | |
| if len(sys.argv) != 3: | |
| print(f"{sys.argv[0]} nandPath outDir") |
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
| //Paste this function in DevTools console inside Discord | |
| /** | |
| * Delete all messages in a Discord channel or DM | |
| * @param {string} authToken Your authorization token | |
| * @param {string} authorId Author of the messages you want to delete | |
| * @param {string} channelId Channel were the messages are located | |
| * @param {string} afterMessageId Only delete messages after this, leave blank do delete all | |
| * @author Victornpb <https://www.github.com/victornpb> | |
| * @see https://gist.github.com/victornpb/135f5b346dea4decfc8f63ad7d9cc182 |
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
| #config | |
| devicecfg = {"ip": "192.168.1.101", "port": 9999} | |
| import socket | |
| from struct import pack | |
| state = False #true for turning on, false for turning off | |
| on = "{\"system\":{\"set_relay_state\":{\"state\":1}}}" |
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
| def get_tweak(self, sector): | |
| '''Gets tweak for use in XEX.''' | |
| tweak = 0 | |
| for i in xrange(0x10): # 0x10 = block_size | |
| tweak |= (sector & 0xFF) << ((0x10 - i - 1) * 8) | |
| sector >>= 8 | |
| return tweak | |
| def get_nintendo_tweak(self, sector): | |
| '''Gets Nintendo tweak for use in XEX.''' |