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 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <flx@obfusk.net> | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
from elftools.elf.elffile import ELFFile # type: ignore[import-untyped] | |
from elftools.elf.sections import NoteSection # type: ignore[import-untyped] | |
class Error(Exception): |
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 sys | |
import zipfile | |
# Usage: zipdup.py ZIPFILE ENTRY_NAME ENTRY_DATA | |
zfile, zentry, data = sys.argv[1:] | |
with zipfile.ZipFile(zfile, "w") as zf: | |
info = zipfile.ZipInfo(filename=zentry) | |
zf.writestr(info, data) |
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 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <flx@obfusk.net> | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
import fnmatch | |
import os | |
import struct | |
import sys |
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.File; | |
import java.io.IOException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.cert.CertificateEncodingException; | |
import java.security.cert.X509Certificate; | |
import java.util.List; | |
import com.android.apksig.ApkVerificationIssue; | |
import com.android.apksig.ApkVerifier; | |
import com.android.apksig.apk.ApkFormatException; |
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 zipfile | |
def test(filename): | |
_orig_EndRecData = zipfile._EndRecData | |
eocd_offset = None | |
def _EndRecData(fh): | |
endrec = _orig_EndRecData(fh) | |
if endrec: |
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 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <flx@obfusk.net> | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
import hashlib | |
import os | |
import re | |
import struct | |
import zipfile |
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 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <flx@obfusk.net> | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
import argparse | |
import json | |
import os | |
from typing import Any, Dict |
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
+ git clone --recurse-submodules -b 1.0.0 -- https://github.com/FossifyOrg/File-Manager.git /build/repo | |
++ git rev-parse HEAD | |
+ test feef6998a0fc79aa859f54699d783df4f0a0c147 = feef6998a0fc79aa859f54699d783df4f0a0c147 | |
+ '[' yes = yes ']' | |
+ git clone https://github.com/obfusk/gradle-wrapper-verify /tmp/gradle-wrapper-verify | |
Cloning into '/tmp/gradle-wrapper-verify'... | |
+ shopt -s globstar | |
+ /tmp/gradle-wrapper-verify/gradle-wrapper-verify ./gradle/wrapper/gradle-wrapper.jar | |
checking ./gradle/wrapper/gradle-wrapper.jar ... | |
OK |
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 base64 | |
import hashlib | |
import sys | |
t = str.maketrans("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "ybndrfg8ejkmcpqxot1uwisza345h769") | |
print(base64.b32encode(hashlib.sha1(sys.argv[1].encode().lower()).digest()).decode().translate(t)) |
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 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <flx@obfusk.net> | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
import apksigtool | |
import dataclasses | |
import sys | |
# Usage: cat_sigblock.py [--prepend] APK_A APK_B |
NewerOlder