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
| # -*- coding: utf-8 -*- | |
| start, end = '1.1.138.0|2.2.138.5'.split('|') | |
| s = [int(x) for x in start.split('.')] | |
| e = [int(x) for x in end.split('.')] | |
| # s.reverse() | |
| # e.reverse() | |
| # print(s, e) | |
| # print(len(s), len(e)) | |
| # print(type(s), type(e)) |
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 zipfile | |
| import xxtea | |
| import re | |
| import os | |
| # setXXTEAKeyAndSign | |
| apk = zipfile.ZipFile("xxxx.apk", "r") | |
| probe_file = [] |
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
| var keepDecimalPlacesBy = function (v, dp=2) { | |
| if (isNaN(v * 1)) return v; | |
| v = v.toString(); | |
| var parts = v.split('.'); | |
| console.log(parts); | |
| if (parts) { | |
| switch (parts.length) { | |
| case 1: | |
| return v; | |
| case 2: |
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
| function isStringEmpty(str) { | |
| return null == str || ((typeof(str) == "string") && 0 == str.length); | |
| } | |
| /** | |
| * ASCII printable CHAR | |
| */ | |
| function is_printable_ascii_like(text) { | |
| if (isStringEmpty(text)) return false; | |
| return /^[ -~]+$/.test(text); |