I hereby claim:
- I am NWPlayer123 on github.
- I am nwplayer123 (https://keybase.io/nwplayer123) on keybase.
- I have a public key whose fingerprint is 2544 F55A 61A7 4A80 829A 143D 2042 204A 3A9B 193D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#Only tested on Python 2.7.13 but it *might* work on 3.X | |
from struct import pack, unpack | |
from os.path import exists | |
from os import mkdir, makedirs | |
import sys | |
endian = ">" #Initial endian until we read the BOM | |
def byte(f): | |
return unpack("%sB" % endian, f.read(1))[0] | |
def half(f): |
# only dependencies are pycrypto and requests, I had to rename pycrypto's thing | |
# in C:\Python27\Lib\site-packages to Crypto from pip cause it defaulted to lowercase | |
from StringIO import StringIO | |
from Crypto.Cipher import AES | |
from struct import unpack | |
from requests import get | |
from os.path import exists | |
from os import mkdir | |
import warnings, sys | |
warnings.filterwarnings("ignore") |
#only dependency is pillow, just run "pip install pillow" | |
#tested on python 3.6 and 2.7 | |
from PIL import Image | |
mode = ["Normal", "Twitter"][1] #0 = Normal, 1 = Twitter (add clear pixel) | |
number = "0001" #change to screenshot number | |
drive = "E:" #change to SD card drive | |
path = drive + "/luma/screenshots/" | |
if mode == "Normal": #400x240 + 320x240, black background |
from PyQt5.QtWidgets import QApplication, QMenuBar, QTreeView, \ | |
QHBoxLayout, QVBoxLayout, QWidget, QStyle, qApp, QFrame, \ | |
QAction, QMenu | |
from PyQt5.QtGui import QStandardItem, QStandardItemModel, QIcon | |
from PyQt5.QtCore import QSize, Qt | |
import sys | |
def getIcon(iconType): | |
if iconType == 21: | |
return qApp.style().standardIcon(QStyle.SP_DirOpenIcon) |
from struct import pack, unpack | |
from os import mkdir, makedirs | |
from os.path import exists | |
import sys | |
def half(f, en): | |
return unpack("%sH" % en, f.read(2))[0] | |
def full(f, en): | |
return unpack("%sI" % en, f.read(4))[0] |
#very rough writeup, looks like: | |
# "RBIN" magic | |
# two tables, which link to strings, absolute | |
# table 1 data points to the location of table 2 data which points to strings | |
# the two counts *should* be the same | |
from struct import pack, unpack | |
import sys | |
def getstr(f): | |
ret = "";char = f.read(1) |
from struct import unpack | |
import sys | |
with open(sys.argv[1], "rb") as f: | |
base = ".".join(sys.argv[1].split(".")[:-1]) | |
with open(base + ".sarc", "wb+") as o: | |
assert f.read(4) == b"Yaz0" | |
unc_size = unpack(">I", f.read(4))[0] | |
o.write("\x00" * unc_size) #pre-allocate | |
o.seek(0);f.seek(16) |
from struct import pack, unpack | |
from binascii import hexlify, unhexlify | |
from os.path import exists | |
from os import mkdir | |
mode = 1 | |
filename = b"b15bad41162c48c8d5d3dbc533b0e1c8.ogg" | |
hashname = filename.split(".")[0] | |
if mode == 0: #extract |
from PIL import Image | |
from os import mkdir | |
from os.path import exists | |
if not exists("tiles"): | |
mkdir("tiles") | |
inf = Image.open("16x16Tiles.gif") | |
pos = 0 | |
for i in range(1024): |