This file contains 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 dataclasses | |
import sys | |
import zipfile | |
from pathlib import Path | |
import PIL | |
import PIL.Image | |
import apkrepotool | |
import apkrepotool.xml_icons as xml_icons |
This file contains 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 | |
import hashlib | |
import sys | |
import apkrepotool | |
from pathlib import Path | |
for apk in sys.argv[1:]: | |
certs, _ = apkrepotool.get_signing_certs(Path(apk)) |
This file contains 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 glob | |
import json | |
import sys | |
from typing import Dict | |
appid, = sys.argv[1:] | |
results: Dict[str, int] = {} | |
for json_file in sorted(glob.glob("apk_downloads/*/*.json")): | |
with open(json_file, encoding="utf-8") as fh: |
This file contains 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
#!/bin/bash | |
set -euo pipefail | |
apksigner verify -v --print-certs "$@" 2>&1 \ | |
| ( grep -av '^WARNING: META-INF/.* not protected by signature' || true ) | cat -v |
This file contains 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 java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.zip.Deflater; | |
import java.util.zip.DeflaterOutputStream; | |
public class ZlibNgTest { | |
public static void main(String[] args) { |
This file contains 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 java.util.Arrays; | |
import java.util.List; | |
class Test { | |
public static TestClassNoSuper tcns; | |
public static TestClassExtendsBar tceb; | |
public static class Foo {} | |
public static class Bar { | |
static { | |
System.out.println("Bar initialiser..."); | |
if (tcns != null) { |
This file contains 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 glob | |
import os | |
import sys | |
import tempfile | |
import zipfile | |
classname_str, *search_dirs = sys.argv[1:] | |
classname_bytes = classname_str.encode() | |
for search_dir in search_dirs: |
This file contains 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 java.io.BufferedInputStream; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.math.BigInteger; | |
import java.nio.charset.StandardCharsets; |
This file contains 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/python3 | |
import struct | |
import sys | |
import zipfile | |
zfile, entry = sys.argv[1:] | |
with zipfile.ZipFile(zfile) as zf: | |
info = zf.getinfo(entry) | |
with open(zfile, "rb") as fh: |
This file contains 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/python3 | |
import json | |
import zipfile | |
from hashlib import sha1, sha256 | |
from asn1crypto import cms # type: ignore[import-untyped] | |
from cryptography.exceptions import InvalidSignature | |
from cryptography.hazmat.primitives import serialization |
NewerOlder