ymj-tool 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ymj_tool/__init__.py CHANGED
@@ -1,3 +1 @@
1
- # Pyarmor 9.1.2 (trial), 000000, non-profits, 2025-03-24T16:09:08.668504
2
- from pyarmor_runtime_000000 import __pyarmor__
3
- __pyarmor__(__name__, __file__, b'PY000000\x00\x03\n\x00o\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00~\x00\x00\x00\x12\t\x04\x00\x05\xeb#I\xac\x0c\x8eAD/\xd6>j\xd9]K\x00\x00\x00\x00\x00\x00\x00\x00\x94\xcd|x\xc2A\xda\x07\xa3\xb5\xa5\r\xf9\x8f\xf4\xcdD!\x08\x1aw\xc0\x95\xa4A\xbf\xb8\xec^qZE\x9ev=\x1a\x0e[\xf8\xc5\xf9|\xe5>\xec\x9f\x02q\\!\x00\x12\xbe6\xdc.\xd4@\xddI\xa4\xdcFFrG\x11\xaft~\x0b\xc3"?@\xac\x9b\x90\x19X\x11\xf2\xe8\xc7i\xbeUBi\x1cC\xbc\xb3\x9b\x15~x\x8b\x94\xa4~&\xc5\xee<e&\xa8\xf2\xd6\xb3\xff\x00(kow\xcf\xbf\x99\x97\xa1\x9a\xd7\xac\xb2')
1
+ __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x0a\x00\x6f\x0d\x0d\x0a\x09\x34\xe0\x02\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\xbc\x00\x00\x00\x00\x00\x00\x10\xea\x9a\x68\x75\x9f\x8d\x32\xaa\x5e\xf4\x02\x03\x6c\x3c\x17\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xec\x90\x7b\xd9\xb4\xb8\xcb\xaa\x85\x19\xc3\xd8\xd6\x0f\x37\xbd\x2f\x06\x84\xaf\x8f\x81\x25\x74\x2d\x44\xcb\x50\xbf\x12\xf8\xaf\x88\xda\x62\x74\xf0\xd1\x69\x24\xd3\x6d\xb8\x3c\xb4\x37\x4a\x49\x15\x4c\x3e\x0a\x51\xf0\x1b\x0f\x67\xbb\x17\x45\x35\x50\x25\x89\x2e\xa0\xd1\xf9\xf2\x1b\x2e\x11\x85\xa0\xb5\x58\xf3\x02\xb7\xb3\xc7\x46\x0d\x17\x3d\xfc\xeb\xbc\x1c\xe2\xd1\x5c\x26\x3f\x53\xf7\xc3\x81\x6d\x6c\xb3\xc9\x76\x4a\x31\x7e\x70\xf1\x9a\xab\x76\x04\xa7\x69\x2e\x99\x49\xe3\x51\x02\x2e\x4f\x6e\xfe\x3f\xdc\xb3\x27\xb4\xac\xa8\x9e\x94\x98\x08\x02\x58\x82\x14\x43\xce\x75\xc7\x8e\xea\x67\xbb\x07\x67\xbc\x18\x9a\x7c\xc3\x0e\x0d\xf9\x45\x82\xf6\x62\x6a\x32\x42\x47\xec\x9d\x99\x37\x61\x2f\xb3\xf3\x4b\x81\x18\xcd\x76\xac\x50\x15\x07\x4e\xfa\xce\x6f\xff', 2)
ymj_tool/common_utils.py CHANGED
@@ -1,3 +1 @@
1
- # Pyarmor 9.1.2 (trial), 000000, non-profits, 2025-03-24T16:09:08.666502
2
- from pyarmor_runtime_000000 import __pyarmor__
3
- __pyarmor__(__name__, __file__, b'PY000000\x00\x03\n\x00o\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00\xe2\x08\x00\x00\x12\t\x04\x00/s\x07\xcd\xfd\x9a07\x7f\xe3\xfe\x9a\xc0r\x8aR\x00\x00\x00\x00\x00\x00\x00\x00 \x8b(K\xa0\x9a"F\xac\x19\x97\xf8+\xe6\xbd\xef\x99\xb8\xa3\xfb\xcd\xd3\xa6\xec\xf2\xd6\xb6\xdda]U\xd2\x83\x7f\x87\xce\xe8\xce\x90\x05}\x1b3x;\x88\xe7\xa4\xf9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c\x03u;g8\x94S\xf6\xf8\xc6\xd0\x94t\xc1KF\x95\xea<wj\xf1P\x01\xfb\xdb\x0e\x8b\xed\xf2\xca\xddL\x851z\xbcZ\x0b\xda\xa7B\x86\x18fWE",0&\x18\xba\xccU\xb3\x08^\x82\x93\xa0Hf*\x91\xa9\x99\xbcC\xe5z\x02w|\xd0\x1e\x14\x98x]\x03\xa9\xd8\x15\xfc\xbf\xef\x94\x98P\x10M\xc9\x89\x90a-\xbd|)\xf7\x90\x8c\xe7|#\x7f\xda3\x00\x9dA\x93_\xb4\xab\xe1\xdb\xf1.\x1eB\x95\xd57a\xca\x85\xd1\xe4\x05/<\xa0\xcd\x14\xba\xea\x9e\xa8\xcc\xbc\xf3B\xa7%\xa40\xde\xca\x8f \x94^0\x87\xb2\x1fsn\x01\xd6e\x852c-\x13xT\x80-\xfd\x19s3\x88 \xff\xa7\xd4X\x0bz\xf7\xf8~\x8d\xf7^\xec\xfd\xb1\xe6mg\t\xfcq\x13\x10\x10\xad\xc3\x88\xe3\xb4D%\x94"+x \xf2a\x114\x87\xacY\xb5\xa1\xf5T\x16T\x95\xae\xce/\x83t\x99\xf4\xc6nI\x93\xeaysG\xd5\x9b%\xbd\xe8\x9b=\xc4*\xbfnt\xcd%,.\xaf=\xc2~\x8c\xa4\xd8\xcb\xa7\x8e\xec#\xa6\x8a\x08\xf1\x9cV\x03\xba\x92\xd0P\xb2\xb8aU\xd4\x8co\x9d\xbc\x05\xab\x0eJ:/;\xa7\xa9\x07\x99z\xd0\xcb4\xef\xa0\x11r8\xbf\x07^\xa6\x1e\x82\x167\xcfQ\xca\xc5H%\x87\xcf\x90\xabxg\xd9b\xc7f\xa1\xff\x82*\r\xfd\x024\xaa \xd3\xa3\x89\xc1\x89\x1d\x05\xac\\2\xd0B\x08\xb4\x91\xa4\x9e\x0cT\xcbB\x0b/\xed@\x03\x7f\x06\xc1\x11\xe9\xbf&E\x97|\xc4\x1c.HP\xca8\xeb\xa9\x85\xdb\xa7\x9c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xb4=\xb4w\xc6\x01\xbbiV\x15\x04UN\xf4\x89\x8a\x94\x04\x1d\x12\xb3\xe5kf<\x02\xe1\x924\xd1\x15Kc\x90)\x1b\xc7\xa1\xc0\x18\xdb\x8f\xaaX\xa6U\x98\xdc\x1a@\x00`\xd0\x0c\xbe\x7f\xe1\xd7\xe9\x8c\xfbx\x90A\x9e[tK\xe9P\xf3\xc8\xa0\xc5\x1e\x02\xcaF?\xd2F\xbd\xcb\x9e\xe0\xd5\x08\xfb\nn\xf7\xc8\xaf\x18=p\xd6-"_\xa1.4Yc\x9c\x18\xaa(\x03\xd8\xf1L\xfe\xff35(-\xa6\\g\xab\xb4J\x84\xcd+\'x\xbcGl+\x1b\xd1\xb5c\x80z\xe1A\xf0}\xbbAD\xb2\xed\xdfBc\'A~\xd1MK\xcc\xe1QuyV)\x19Rt\x02D\x9dD\xee\xd2\x92\xfdx-\x81x\xb9\x9eU"\x1f\xd3g\xf6\x89%\xd3\xd0=P\xf1\x83\x92\xe3\xb4\x1fo\x048\x14\x05Oj\t2zS\x85\xcf?\x146w\xdf\xd5\xa3\x9dM\x03M"q\x9e\x94\x81\xa0\x9a\xb9X\x07\x9a:\x00\x83\xa0\xb1\xba\x85\x97\xc4s\x9c\xa6\x9e\xf5E\xa9W\x83\xf5\x84\xcfV\x07\x1c,\xdej\\\xe8\xb5\xc5')
1
+ __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x0a\x00\x6f\x0d\x0d\x0a\x09\x34\xe0\x02\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\x6e\x06\x00\x00\x00\x00\x00\x10\xbb\x27\xc4\xf4\x64\x04\xd4\x40\xf4\xdd\x5b\x7b\x2d\x2c\x20\x59\x00\x00\x00\x00\x00\x00\x00\x00\x99\xc7\x99\x5e\x17\x07\x72\xfe\x55\xb9\x65\x67\x7f\x84\x22\xd7\x65\x63\x57\x23\xf3\x8a\xd7\x2b\x0b\x77\xa2\xfa\xe4\xb8\x59\x69\x3c\xdb\xa8\x15\xdb\xe1\xed\x67\x7d\x0e\xa5\xae\x9f\x49\xa7\x4a\x3f\xb7\x17\xc0\x92\x23\xcc\x2a\xd3\x95\xde\xe2\x34\x16\x76\xff\xa0\x6e\x31\xe9\x65\xf0\xb7\x38\x76\xb0\x17\x73\x8e\xd7\x4d\x92\x59\x3d\x71\x44\x83\x11\x52\xfb\xd8\xcf\x3e\x36\x20\xc4\x23\x1f\x62\x16\xcf\x38\x3e\x7b\xdb\x4c\xd1\x22\x84\xcf\x35\xdc\x36\x36\xe4\xbf\xfc\xd6\xbb\xaa\xad\xb4\xf6\x77\x9b\xc6\xe7\x20\xbf\x19\x7e\x63\xa9\xce\xdb\xae\x5e\x8d\x22\x4f\x79\x48\x11\x5b\xb9\xe7\x77\x7d\x54\x19\xd5\x7a\x5b\x70\x48\xe4\x86\x01\x12\x4e\xae\xb5\x7b\xc2\x7d\x14\x18\xb9\xc2\x4d\xc3\x27\xcb\x0e\x50\x50\x28\x1c\x4d\x63\xdd\x59\x21\x99\xa6\x6a\xac\x05\x90\x6c\x36\xe8\x54\x52\x4b\x56\x71\xf1\xd7\x31\x40\xde\xdb\x73\xe1\xf3\x87\xec\xca\xa7\x2b\x98\xfb\xa4\x3b\x6e\x0b\x62\x77\x74\xef\x75\x8e\xd8\x20\xca\xb9\x7d\x66\x39\xd4\x43\xaf\x9a\xb1\x03\x77\x8a\x31\x2c\xe3\x2c\x39\x8e\x67\xe1\x2a\x79\x3f\x86\x52\x05\x59\x06\xfd\x76\xbc\xab\x41\xdc\xd3\x32\x6c\xed\x88\x3c\x15\x3c\xc7\xcc\xad\xdd\x0d\xa4\xde\xe4\x2c\xb1\xe1\xbb\x9d\xd7\x1b\xaf\x35\xb0\x37\xbb\x32\xe5\x74\x21\xb9\x9a\x72\x48\x2f\xdc\xfb\x74\x0b\x67\x04\xa7\x3c\x25\x9d\x7b\xcb\x5d\x39\x2a\x13\xc1\x7c\x0a\x49\x41\x2c\xb3\xe4\xb8\x37\x54\x97\x2a\xf2\xb9\x9d\x8e\x05\x3a\x3d\xfa\x86\x18\x77\x90\xd9\x98\x3b\x56\xb4\x3f\x36\x17\x40\x59\x82\xbc\x14\x15\x09\xfc\xec\xc1\x29\x87\x18\x19\xd9\x87\x14\xab\xa4\x76\x3e\xaa\x46\xdb\xb1\x98\xda\x5d\xe8\x4b\x09\x07\x67\x3f\x49\x68\x3e\xf7\x78\x19\x10\x77\x72\x04\xda\x02\xcc\x5d\x1e\x17\x1e\x5c\xd5\x55\xa9\x1c\xe3\x7e\x1d\x4d\x8b\x22\x7c\x53\x30\x23\x22\xbc\xc1\xe5\xd9\x64\x3f\x55\xf0\x11\xcd\x69\xf6\x68\x1e\x0f\xde\x79\x95\x71\x5b\xe3\x78\x18\x13\xe4\x55\x8a\xff\xf7\x64\xd5\xd2\x09\xbe\xf0\xf0\x8e\xcb\x47\xae\x69\x62\xaa\x7e\x8b\x7d\x0d\x3d\x1c\xcd\x3b\xf7\x26\xf0\xe8\xe1\xf6\xe7\x38\x55\x61\xf0\x82\x72\xe0\xbb\x30\x87\x6a\x8e\xe5\xd0\x00\xc0\x44\x54\xcf\xa4\xcb\x6a\x60\x95\xff\x09\x48\xc8\xfe\xa1\x60\x8e\x03\xac\x02\xba\x0f\xb9\x8c\x36\x84\x21\xe5\xea\x18\x67\x85\x83\x57\x08\x11\x14\xd8\x68\xbe\xdf\x5b\xef\x0c\x65\x73\x87\x10\xe3\x47\xcb\xfb\x35\x85\x3f\x56\x82\x0b\x50\x72\xef\x7f\x42\x7d\x3e\xcd\xe4\x2e\xe1\x46\x3f\xba\x4f\x15\xe3\x13\x0d\x24\xe4\xd0\xf0\x1c\xf2\xf6\xdc\x34\xd5\x53\x1f\x2a\x33\x78\x0a\x16\xe6\x05\xe5\x78\x23\xab\x67\x8e\x09\xb4\xce\x4c\x0a\xd2\x55\x4f\x72\x9f\x06\xbf\xad\x43\xba\xb9\x12\x57\xf9\x65\x85\x62\xd0\x14\x41\x67\x0d\xd4\xf7\xac\xb8\x72\x45\xa4\xe7\x8d\x00\xbe\x60\x70\x56\x02\x4e\x94\x0a\xd1\xcd\x11\x67\xe4\x63\x96\x7a\xb7\xc9\xd7\x0e\xc8\x6a\x2f\x4e\xc6\x76\x14\xea\x68\x0a\x7c\xfc\x5b\x15\x26\xb4\xf8\xe6\xa2\xe0\x3f\x97\xd7\xe4\xa7\x6c\xd1\x76\x41\x44\xe1\xfc\x9a\xe2\xa4\x05\xb5\x11\xd6\x16\x9e\x31\x4e\x3f\x38\x22\x71\x61\x38\xfa\x45\x42\x00\x8d\xfc\xc2\x9c\x84\x0a\x0d\x3a\x7a\xc9\xac\x32\xf8\x44\xd3\xaf\xfc\x22\x34\xf3\xb7\xc0\x8f\xe6\xfe\x1a\x01\xe9\x58\x6a\x5f\xf9\x48\xdf\x8f\xbb\xa8\x7f\x8d\xb4\xb9\xc4\x30\x4a\xc7\xb1\x37\xf0\x2d\xfa\x00\xbb\x62\x6a\xd3\x24\x5d\x1f\xf4\x97\x4e\x46\x70\x12\x17\x58\x9b\x0e\xe5\x41\x18\xd3\x0f\x18\x55\x78\x9d\x8a\x5d\x76\x32\xe0\xef\xeb\x8b\xcc\xe4\x3d\xed\xa0\x3b\xfd\x93\xe0\x00\x97\x03\x58\x57\x7a\x40\x54\x9b\x56\xea\x35\x2d\xda\xd9\x90\x2d\x4b\xd0\xda\x3d\x9d\xad\x03\x84\x0a\x82\x56\xb7\xc4\x4e\xbb\x31\xba\xb8\xc3\xc9\x99\x44\xc0\xe1\xab\xb7\x79\x05\x49\x06\xe4\x88\x07\x35\x44\x74\x84\x7b\x73\xfe\x62\x60\x6b\xb6\x0a\x13\x48\xf3\x5b\x13\x55\xe5\xa3\x1e\xb1\xf2\x67\x2b\xed\x1d\x51\x08\xc5\x41\xc3\xa2\xe0\x20\xb7\x82\x7c\x7d\xcb\x3e\xd6\x8e\x9d\x4c\xcb\xf0\x76\x94\xaa\xf7\xb6\xf5\x65\xcf\x7f\x91\x29\xb1\x97\x6a\xd4\xd8\x1b\x3a\x49\x98\xc5\x47\x51\x60\x43\x74\x80\x8c\xe0\xf2\x14\x2f\x7e\xbc\x89\xd3\x67\xad\xbb\xa9\xc0\x41\xed\xbe\x57\xae\x1d\x83\xd6\xe1\x9d\x39\xf8\x99\x19\x8d\x3d\xca\xbc\x90\x01\x29\x0c\x35\x1e\x4b\x42\xfc\x7a\x3f\x23\x94\xd3\x98\x3e\xaf\x2e\x9a\xa1\x2e\xc4\x37\xcb\xae\xa8\xdf\x1c\x68\xca\x26\xb6\x47\xd0\xd7\x21\xe0\x09\xa0\x70\x41\x37\x4c\x39\x03\x96\x6e\x51\x30\xc3\x00\x8a\x77\x9d\xc9\xf6\x88\x77\xec\xe7\x21\xe8\xeb\x5d\xb1\x8f\xdf\x4d\xfd\x17\xc8\x8d\xcf\x4e\x17\xca\x99\x31\x61\xc9\xd5\xa0\x6f\xf9\x33\x78\xb1\x7b\xca\x05\x70\x55\xd9\x9e\xe1\x23\xd8\x6f\xf7\xb9\xc0\x56\x2a\x5f\xf3\x70\x53\x0d\xa9\x12\x86\x39\x3a\xfe\x45\xbd\x43\x05\x82\xf8\x7c\x38\x9f\x6e\xe5\xa0\x31\x0f\x81\xfc\x9b\x13\xc0\xf3\xd2\x62\x46\x18\xcf\x51\x2d\xb9\xfa\x91\x71\xcf\x33\x7f\xd5\x5e\xd0\x88\xd8\x4a\xa7\xbf\xee\x80\xba\x9b\xe2\x53\x2b\x9f\x40\xa7\xcd\x19\x61\xe7\x24\xa9\x7c\x2d\x68\x4a\x48\xfb\x29\x98\x4f\x9d\x05\xa4\x9b\x61\x26\x29\xfe\x2e\x51\xbf\xf7\xf4\x3c\xe9\xf2\xaf\xa7\xdf\x3a\xc5\x04\xf0\x52\x87\x6c\xa2\x73\x1a\x06\x22\xb4\x96\xc2\x8c\x5e\x3b\x13\x6f\x26\xa7\xe2\xf2\xe4\xb5\x8d\x5a\x60\x49\x3b\xb1\xf7\x5d\xb4\x0a\xf2\x61\xc6\xf7\x94\x25\x87\x0d\x02\x9a\xa7\x8c\x8d\xd2\xfc\x5b\x05\x45\xd9\x4c\x7f\xf8\xf9\x4b\xce\x23\x58\xd2\x1b\x18\xd5\x36\xa2\x04\xa1\x40\xf9\x71\xe6\xc4\x89\xa0\xce\x79\x70\xdb\x82\x34\x9e\xbe\x75\x0a\x4a\xf0\x5b\x90\x09\x4d\x4d\x9e\x3e\x59\x20\x4c\xd3\x51\x32\x65\x93\x8a\x88\x00\xe7\x3f\x3f\xd2\xb0\x19\x20\x57\x55\x0a\x12\x5d\x36\x7e\x66\x07\x31\x86\xbf\x75\x57\x11\x2d\x86\x37\xfe\xfb\x35\xa3\xcd\xaf\x74\x99\x5d\x82\x61\xd6\xa0\x8f\x7d\x4f\x33\x0d\xa3\xf8\xec\x55\x7d\x9a\x9c\x15\xa8\x63\x46\x36\xc0\x52\xb9\xd0\x2d\xc8\xd6\xff\xd2\xba\x9b\x6f\x18\x7e\x6a\x19\x22\x7d\x7b\x30\x6d\x4f\x24\x3a\xc4\x7d\xf8\xee\xfe\x7d\xa2\x14\x6b\x60\x44\xfb\xc1\xf6\x61\xd3\x72\x70\x0b\x0f\xbe\x0c\xc8\xf7\x63\xb4\x7b\x07\x81\xec\x85\xd4\xd6\x89\x21\x29\x30\xa0\x19\x6f\xf0\xe7\x5a\x4f\x2d\x26\x4a\x2e\x26\xba\x50\x0d\x4b\x42\x01\x04\xa5\xce\xc5\xb7\x1e\x2f\xd6\x27\x71\xc7\xe3\xa1\xa5\x13\xb4\x4c\x70\x1a\x33\x2c\x8c\x35\xab\x65\xf3\xd6\x19\x0d\xb5\xef\x78\xaa\xf6\x72\x19\x9a\x86\x3a\x60\x71\x61\x33\xb5\xf7\xd1\x95\xc2\xbc\x4f\x9c\x1a\x2f\x63\x76\xad\xa4\x33\x1f\x99\x93\x9a\x17\x24\x28\xe6\xda\xc6\x5c\xa4\xe7\x28\xbe\x0d\x71\xdf\x38\xaf\xdf\xed\x95\x35\x98\x3d\xbc\x68\x49\x94\x89\x61\xbc\xdb\x6d\x71\xcb\x0a\x0a\x40\x45\x7e\x91\x43\x7e\xa0\x13\x4d\xf8\x43\xeb\xd4\x68\x7f\xf2\x1c\x71\x75\xc4\xe0\x93\xbb\xb4\x5f\x36\x28\x17\xf9\x68\x33\x75\x2a\x1f\x47\xa1\x0c\x10\xf5\xff\x35\x37\xac\x26\x23\x7f\x99\xe2\x00\xbe\x74\x55\xaf\xee\x15\x59\x00\x3c\x90\xf0\x50\xec\x69\x56\x2c\xcb\x7a\x5b\xa5\x66\x21\xd1\x6f\xf3\x75\x37\x0a\x25\x88\x3c\xf7\x5e\x62\xec\x22\x87\x82\xda\x33\x36\xee\x80\x87\x32\xf3\x98\x3d\x67\xc2\x9b\xf6\x0a\x25\xa0\x38\x8b\x9f\x23\x71\x2c\x9a\xf4\x97\xb1\x1b\x7d\x80\x03\x49\x4c\xf4\x7d\x1d\x0b\x80\x35\x82\xcc\xbb\x23\x4d\x36\x4b\x9a\x4b\xdd\x74\xbf\x4c\xee\x85\xc9\x5e\x10\x52\xfa\xb5\x0d\xbd\x04\x04\xb7\x54\x7e\x07\xa3\x66\xae\x2b\x7f\xba', 2)
@@ -0,0 +1,483 @@
1
+ # These module alos are used by protection code, so that protection
2
+ # code needn't import anything
3
+ import os
4
+ import platform
5
+ import sys
6
+ import struct
7
+
8
+ # Because ctypes is new from Python 2.5, so pytransform doesn't work
9
+ # before Python 2.5
10
+ #
11
+ from ctypes import cdll, c_char, c_char_p, c_int, c_void_p, \
12
+ pythonapi, py_object, PYFUNCTYPE, CFUNCTYPE
13
+ from fnmatch import fnmatch
14
+
15
+ #
16
+ # Support Platforms
17
+ #
18
+ plat_path = 'platforms'
19
+
20
+ plat_table = (
21
+ ('windows', ('windows', 'cygwin*')),
22
+ ('darwin', ('darwin',)),
23
+ ('ios', ('ios',)),
24
+ ('linux', ('linux*',)),
25
+ ('freebsd', ('freebsd*', 'openbsd*', 'isilon onefs')),
26
+ ('poky', ('poky',)),
27
+ )
28
+
29
+ arch_table = (
30
+ ('x86', ('i?86', )),
31
+ ('x86_64', ('x64', 'x86_64', 'amd64', 'intel')),
32
+ ('arm', ('armv5',)),
33
+ ('armv6', ('armv6l',)),
34
+ ('armv7', ('armv7l',)),
35
+ ('ppc64', ('ppc64le',)),
36
+ ('mips32', ('mips',)),
37
+ ('aarch32', ('aarch32',)),
38
+ ('aarch64', ('aarch64', 'arm64'))
39
+ )
40
+
41
+ #
42
+ # Hardware type
43
+ #
44
+ HT_HARDDISK, HT_IFMAC, HT_IPV4, HT_IPV6, HT_DOMAIN = range(5)
45
+
46
+ #
47
+ # Global
48
+ #
49
+ _pytransform = None
50
+
51
+
52
+ class PytransformError(Exception):
53
+ pass
54
+
55
+
56
+ def dllmethod(func):
57
+ def wrap(*args, **kwargs):
58
+ return func(*args, **kwargs)
59
+ return wrap
60
+
61
+
62
+ @dllmethod
63
+ def version_info():
64
+ prototype = PYFUNCTYPE(py_object)
65
+ dlfunc = prototype(('version_info', _pytransform))
66
+ return dlfunc()
67
+
68
+
69
+ @dllmethod
70
+ def init_pytransform():
71
+ major, minor = sys.version_info[0:2]
72
+ # Python2.5 no sys.maxsize but sys.maxint
73
+ # bitness = 64 if sys.maxsize > 2**32 else 32
74
+ prototype = PYFUNCTYPE(c_int, c_int, c_int, c_void_p)
75
+ init_module = prototype(('init_module', _pytransform))
76
+ ret = init_module(major, minor, pythonapi._handle)
77
+ if (ret & 0xF000) == 0x1000:
78
+ raise PytransformError('Initialize python wrapper failed (%d)'
79
+ % (ret & 0xFFF))
80
+ return ret
81
+
82
+
83
+ @dllmethod
84
+ def init_runtime():
85
+ prototype = PYFUNCTYPE(c_int, c_int, c_int, c_int, c_int)
86
+ _init_runtime = prototype(('init_runtime', _pytransform))
87
+ return _init_runtime(0, 0, 0, 0)
88
+
89
+
90
+ @dllmethod
91
+ def encrypt_code_object(pubkey, co, flags, suffix=''):
92
+ _pytransform.set_option(6, suffix.encode())
93
+ prototype = PYFUNCTYPE(py_object, py_object, py_object, c_int)
94
+ dlfunc = prototype(('encrypt_code_object', _pytransform))
95
+ return dlfunc(pubkey, co, flags)
96
+
97
+
98
+ @dllmethod
99
+ def generate_license_key(prikey, keysize, rcode):
100
+ prototype = PYFUNCTYPE(py_object, c_char_p, c_int, c_char_p)
101
+ dlfunc = prototype(('generate_license_key', _pytransform))
102
+ return dlfunc(prikey, keysize, rcode) if sys.version_info[0] == 2 \
103
+ else dlfunc(prikey, keysize, rcode.encode())
104
+
105
+
106
+ @dllmethod
107
+ def get_registration_code():
108
+ prototype = PYFUNCTYPE(py_object)
109
+ dlfunc = prototype(('get_registration_code', _pytransform))
110
+ return dlfunc()
111
+
112
+
113
+ @dllmethod
114
+ def get_expired_days():
115
+ prototype = PYFUNCTYPE(py_object)
116
+ dlfunc = prototype(('get_expired_days', _pytransform))
117
+ return dlfunc()
118
+
119
+
120
+ @dllmethod
121
+ def clean_obj(obj, kind):
122
+ prototype = PYFUNCTYPE(c_int, py_object, c_int)
123
+ dlfunc = prototype(('clean_obj', _pytransform))
124
+ return dlfunc(obj, kind)
125
+
126
+
127
+ def clean_str(*args):
128
+ tdict = {
129
+ 'str': 0,
130
+ 'bytearray': 1,
131
+ 'unicode': 2
132
+ }
133
+ for obj in args:
134
+ k = tdict.get(type(obj).__name__)
135
+ if k is None:
136
+ raise RuntimeError('Can not clean object: %s' % obj)
137
+ clean_obj(obj, k)
138
+
139
+
140
+ def get_hd_info(hdtype, name=None):
141
+ if hdtype not in range(HT_DOMAIN + 1):
142
+ raise RuntimeError('Invalid parameter hdtype: %s' % hdtype)
143
+ size = 256
144
+ t_buf = c_char * size
145
+ buf = t_buf()
146
+ cname = c_char_p(0 if name is None
147
+ else name.encode('utf-8') if hasattr('name', 'encode')
148
+ else name)
149
+ if (_pytransform.get_hd_info(hdtype, buf, size, cname) == -1):
150
+ raise PytransformError('Get hardware information failed')
151
+ return buf.value.decode()
152
+
153
+
154
+ def show_hd_info():
155
+ return _pytransform.show_hd_info()
156
+
157
+
158
+ def assert_armored(*names):
159
+ prototype = PYFUNCTYPE(py_object, py_object)
160
+ dlfunc = prototype(('assert_armored', _pytransform))
161
+
162
+ def wrapper(func):
163
+ def wrap_execute(*args, **kwargs):
164
+ dlfunc(names)
165
+ return func(*args, **kwargs)
166
+ return wrap_execute
167
+ return wrapper
168
+
169
+
170
+ def check_armored(*names):
171
+ try:
172
+ prototype = PYFUNCTYPE(py_object, py_object)
173
+ prototype(('assert_armored', _pytransform))(names)
174
+ return True
175
+ except RuntimeError:
176
+ return False
177
+
178
+
179
+ def get_license_info():
180
+ info = {
181
+ 'ISSUER': None,
182
+ 'EXPIRED': None,
183
+ 'HARDDISK': None,
184
+ 'IFMAC': None,
185
+ 'IFIPV4': None,
186
+ 'DOMAIN': None,
187
+ 'DATA': None,
188
+ 'CODE': None,
189
+ }
190
+ rcode = get_registration_code().decode()
191
+ if rcode.startswith('*VERSION:'):
192
+ index = rcode.find('\n')
193
+ info['ISSUER'] = rcode[9:index].split('.')[0].replace('-sn-1.txt', '')
194
+ rcode = rcode[index+1:]
195
+
196
+ index = 0
197
+ if rcode.startswith('*TIME:'):
198
+ from time import ctime
199
+ index = rcode.find('\n')
200
+ info['EXPIRED'] = ctime(float(rcode[6:index]))
201
+ index += 1
202
+
203
+ if rcode[index:].startswith('*FLAGS:'):
204
+ index += len('*FLAGS:') + 1
205
+ info['FLAGS'] = ord(rcode[index - 1])
206
+
207
+ prev = None
208
+ start = index
209
+ for k in ['HARDDISK', 'IFMAC', 'IFIPV4', 'DOMAIN', 'FIXKEY', 'CODE']:
210
+ index = rcode.find('*%s:' % k)
211
+ if index > -1:
212
+ if prev is not None:
213
+ info[prev] = rcode[start:index]
214
+ prev = k
215
+ start = index + len(k) + 2
216
+ info['CODE'] = rcode[start:]
217
+ i = info['CODE'].find(';')
218
+ if i > 0:
219
+ info['DATA'] = info['CODE'][i+1:]
220
+ info['CODE'] = info['CODE'][:i]
221
+ return info
222
+
223
+
224
+ def get_license_code():
225
+ return get_license_info()['CODE']
226
+
227
+
228
+ def get_user_data():
229
+ return get_license_info()['DATA']
230
+
231
+
232
+ def _match_features(patterns, s):
233
+ for pat in patterns:
234
+ if fnmatch(s, pat):
235
+ return True
236
+
237
+
238
+ def _gnu_get_libc_version():
239
+ try:
240
+ prototype = CFUNCTYPE(c_char_p)
241
+ ver = prototype(('gnu_get_libc_version', cdll.LoadLibrary('')))()
242
+ return ver.decode().split('.')
243
+ except Exception:
244
+ pass
245
+
246
+
247
+ def format_platform(platid=None):
248
+ if platid:
249
+ return os.path.normpath(platid)
250
+
251
+ plat = platform.system().lower()
252
+ mach = platform.machine().lower()
253
+
254
+ for alias, platlist in plat_table:
255
+ if _match_features(platlist, plat):
256
+ plat = alias
257
+ break
258
+
259
+ if plat == 'linux':
260
+ cname, cver = platform.libc_ver()
261
+ if cname == 'musl':
262
+ plat = 'musl'
263
+ elif cname == 'libc':
264
+ plat = 'android'
265
+ elif cname == 'glibc':
266
+ v = _gnu_get_libc_version()
267
+ if v and len(v) >= 2 and (int(v[0]) * 100 + int(v[1])) < 214:
268
+ plat = 'centos6'
269
+
270
+ for alias, archlist in arch_table:
271
+ if _match_features(archlist, mach):
272
+ mach = alias
273
+ break
274
+
275
+ if plat == 'windows' and mach == 'x86_64':
276
+ bitness = struct.calcsize('P'.encode()) * 8
277
+ if bitness == 32:
278
+ mach = 'x86'
279
+
280
+ return os.path.join(plat, mach)
281
+
282
+
283
+ # Load _pytransform library
284
+ def _load_library(path=None, is_runtime=0, platid=None, suffix='', advanced=0):
285
+ path = os.path.dirname(__file__) if path is None \
286
+ else os.path.normpath(path)
287
+
288
+ plat = platform.system().lower()
289
+ for alias, platlist in plat_table:
290
+ if _match_features(platlist, plat):
291
+ plat = alias
292
+ break
293
+
294
+ name = '_pytransform' + suffix
295
+ if plat == 'linux':
296
+ filename = os.path.abspath(os.path.join(path, name + '.so'))
297
+ elif plat in ('darwin', 'ios'):
298
+ filename = os.path.join(path, name + '.dylib')
299
+ elif plat == 'windows':
300
+ filename = os.path.join(path, name + '.dll')
301
+ elif plat in ('freebsd', 'poky'):
302
+ filename = os.path.join(path, name + '.so')
303
+ else:
304
+ filename = None
305
+
306
+ if platid is not None and os.path.isfile(platid):
307
+ filename = platid
308
+ elif platid is not None or not os.path.exists(filename) or not is_runtime:
309
+ libpath = platid if platid is not None and os.path.isabs(platid) else \
310
+ os.path.join(path, plat_path, format_platform(platid))
311
+ filename = os.path.join(libpath, os.path.basename(filename))
312
+
313
+ if filename is None:
314
+ raise PytransformError('Platform %s not supported' % plat)
315
+
316
+ if not os.path.exists(filename):
317
+ raise PytransformError('Could not find "%s"' % filename)
318
+
319
+ try:
320
+ m = cdll.LoadLibrary(filename)
321
+ except Exception as e:
322
+ if sys.flags.debug:
323
+ print('Load %s failed:\n%s' % (filename, e))
324
+ raise
325
+
326
+ # Removed from v4.6.1
327
+ # if plat == 'linux':
328
+ # m.set_option(-1, find_library('c').encode())
329
+
330
+ if not os.path.abspath('.') == os.path.abspath(path):
331
+ m.set_option(1, path.encode() if sys.version_info[0] == 3 else path)
332
+ elif (not is_runtime) and sys.platform.startswith('cygwin'):
333
+ path = os.environ['PYARMOR_CYGHOME']
334
+ m.set_option(1, path.encode() if sys.version_info[0] == 3 else path)
335
+
336
+ # Required from Python3.6
337
+ m.set_option(2, sys.byteorder.encode())
338
+
339
+ if sys.flags.debug:
340
+ m.set_option(3, c_char_p(1))
341
+ m.set_option(4, c_char_p(not is_runtime))
342
+
343
+ # Disable advanced mode by default
344
+ m.set_option(5, c_char_p(not advanced))
345
+
346
+ # Set suffix for private package
347
+ if suffix:
348
+ m.set_option(6, suffix.encode())
349
+
350
+ return m
351
+
352
+
353
+ def pyarmor_init(path=None, is_runtime=0, platid=None, suffix='', advanced=0):
354
+ global _pytransform
355
+ _pytransform = _load_library(path, is_runtime, platid, suffix, advanced)
356
+ return init_pytransform()
357
+
358
+
359
+ def pyarmor_runtime(path=None, suffix='', advanced=0):
360
+ if _pytransform is not None:
361
+ return
362
+
363
+ try:
364
+ pyarmor_init(path, is_runtime=1, suffix=suffix, advanced=advanced)
365
+ init_runtime()
366
+ except Exception as e:
367
+ if sys.flags.debug or hasattr(sys, '_catch_pyarmor'):
368
+ raise
369
+ sys.stderr.write("%s\n" % str(e))
370
+ sys.exit(1)
371
+
372
+
373
+ # ----------------------------------------------------------
374
+ # End of pytransform
375
+ # ----------------------------------------------------------
376
+
377
+ #
378
+ # Unused
379
+ #
380
+
381
+
382
+ @dllmethod
383
+ def generate_license_file(filename, priname, rcode, start=-1, count=1):
384
+ prototype = PYFUNCTYPE(c_int, c_char_p, c_char_p, c_char_p, c_int, c_int)
385
+ dlfunc = prototype(('generate_project_license_files', _pytransform))
386
+ return dlfunc(filename.encode(), priname.encode(), rcode.encode(),
387
+ start, count) if sys.version_info[0] == 3 \
388
+ else dlfunc(filename, priname, rcode, start, count)
389
+
390
+ #
391
+ # Not available from v5.6
392
+ #
393
+
394
+
395
+ def generate_capsule(licfile):
396
+ prikey, pubkey, prolic = _generate_project_capsule()
397
+ capkey, newkey = _generate_pytransform_key(licfile, pubkey)
398
+ return prikey, pubkey, capkey, newkey, prolic
399
+
400
+
401
+ @dllmethod
402
+ def _generate_project_capsule():
403
+ prototype = PYFUNCTYPE(py_object)
404
+ dlfunc = prototype(('generate_project_capsule', _pytransform))
405
+ return dlfunc()
406
+
407
+
408
+ @dllmethod
409
+ def _generate_pytransform_key(licfile, pubkey):
410
+ prototype = PYFUNCTYPE(py_object, c_char_p, py_object)
411
+ dlfunc = prototype(('generate_pytransform_key', _pytransform))
412
+ return dlfunc(licfile.encode() if sys.version_info[0] == 3 else licfile,
413
+ pubkey)
414
+
415
+
416
+ #
417
+ # Deprecated functions from v5.1
418
+ #
419
+
420
+
421
+ @dllmethod
422
+ def encrypt_project_files(proname, filelist, mode=0):
423
+ prototype = PYFUNCTYPE(c_int, c_char_p, py_object, c_int)
424
+ dlfunc = prototype(('encrypt_project_files', _pytransform))
425
+ return dlfunc(proname.encode(), filelist, mode)
426
+
427
+
428
+ def generate_project_capsule(licfile):
429
+ prikey, pubkey, prolic = _generate_project_capsule()
430
+ capkey = _encode_capsule_key_file(licfile)
431
+ return prikey, pubkey, capkey, prolic
432
+
433
+
434
+ @dllmethod
435
+ def _encode_capsule_key_file(licfile):
436
+ prototype = PYFUNCTYPE(py_object, c_char_p, c_char_p)
437
+ dlfunc = prototype(('encode_capsule_key_file', _pytransform))
438
+ return dlfunc(licfile.encode(), None)
439
+
440
+
441
+ @dllmethod
442
+ def encrypt_files(key, filelist, mode=0):
443
+ t_key = c_char * 32
444
+ prototype = PYFUNCTYPE(c_int, t_key, py_object, c_int)
445
+ dlfunc = prototype(('encrypt_files', _pytransform))
446
+ return dlfunc(t_key(*key), filelist, mode)
447
+
448
+
449
+ @dllmethod
450
+ def generate_module_key(pubname, key):
451
+ t_key = c_char * 32
452
+ prototype = PYFUNCTYPE(py_object, c_char_p, t_key, c_char_p)
453
+ dlfunc = prototype(('generate_module_key', _pytransform))
454
+ return dlfunc(pubname.encode(), t_key(*key), None)
455
+
456
+ #
457
+ # Compatible for PyArmor v3.0
458
+ #
459
+
460
+
461
+ @dllmethod
462
+ def old_init_runtime(systrace=0, sysprofile=1, threadtrace=0, threadprofile=1):
463
+ '''Only for old version, before PyArmor 3'''
464
+ pyarmor_init(is_runtime=1)
465
+ prototype = PYFUNCTYPE(c_int, c_int, c_int, c_int, c_int)
466
+ _init_runtime = prototype(('init_runtime', _pytransform))
467
+ return _init_runtime(systrace, sysprofile, threadtrace, threadprofile)
468
+
469
+
470
+ @dllmethod
471
+ def import_module(modname, filename):
472
+ '''Only for old version, before PyArmor 3'''
473
+ prototype = PYFUNCTYPE(py_object, c_char_p, c_char_p)
474
+ _import_module = prototype(('import_module', _pytransform))
475
+ return _import_module(modname.encode(), filename.encode())
476
+
477
+
478
+ @dllmethod
479
+ def exec_file(filename):
480
+ '''Only for old version, before PyArmor 3'''
481
+ prototype = PYFUNCTYPE(c_int, c_char_p)
482
+ _exec_file = prototype(('exec_file', _pytransform))
483
+ return _exec_file(filename.encode())
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ymj-tool
3
- Version: 1.0.3
4
- Summary: ymj tool common utilities
3
+ Version: 1.0.4
4
+ Summary: A useful tool for ...
5
5
  Author: ssseVennn
6
6
  Author-email: 739369987@qq.com
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Operating System :: OS Independent
9
- Requires-Python: >=3.6
9
+ Requires-Python: >=3.9
10
10
 
@@ -0,0 +1,9 @@
1
+ ymj_tool/__init__.py,sha256=9kIbgLjbE8o_agQQjaVkXGw9qtsdEgdhxkXbq326dTg,1047
2
+ ymj_tool/common_utils.py,sha256=U725DFz8tG6SuY5ozqTGoQMLLAdMUazOUf0KjfOtd4M,6879
3
+ ymj_tool/pytransform/__init__.py,sha256=OAwIt1kGBC0Y5zsNJlTrAwQwmJhMqierRUVI_ZOjqgg,13587
4
+ ymj_tool_def/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ ymj_tool_def/common_utils.py,sha256=ZPKg-3tavFl2ImcsoNOHYP_nN937cBp4JU10T1IrFAk,927
6
+ ymj_tool-1.0.4.dist-info/METADATA,sha256=MMahxKHCQGQO66UTxZD2rk5QmBPJxfrEVHSMf61c41M,261
7
+ ymj_tool-1.0.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
8
+ ymj_tool-1.0.4.dist-info/top_level.txt,sha256=5M4swOsowRvw2tQ6vqoAQncEqBSmWN199-O-haNu-rE,22
9
+ ymj_tool-1.0.4.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ ymj_tool
2
+ ymj_tool_def
File without changes
@@ -0,0 +1,35 @@
1
+ import base64
2
+ import math
3
+ import random
4
+ import string
5
+ import time
6
+
7
+
8
+ def list_with_page(result, page_num, page_len=10):
9
+ data_sum = len(result)
10
+ page_sum = math.ceil(data_sum / page_len)
11
+
12
+ page_num = int(page_num) if page_num else 1
13
+ page_list = result[page_len * (page_num - 1): page_len * page_num]
14
+ return page_list, page_sum, data_sum
15
+
16
+
17
+ def set_login_token(expire=7200):
18
+ """token简单加密"""
19
+ token = '{}:{}'.format(get_random_str(8), str(time.time() + expire))
20
+ b64_token = base64.b64encode(token.encode())
21
+ str_token = str(b64_token, encoding='utf-8')
22
+ return str_token
23
+
24
+
25
+ def get_login_token(b64_token):
26
+ """token简单解密"""
27
+ try:
28
+ token = base64.b64decode(b64_token).decode()
29
+ except:
30
+ return ''
31
+ return token
32
+
33
+
34
+ def get_random_str(str_len):
35
+ return ''.join(random.sample(string.ascii_letters + string.digits, str_len))
@@ -1,2 +0,0 @@
1
- # Pyarmor 9.1.2 (trial), 000000, 2025-03-24T16:09:08.659500
2
- from .pyarmor_runtime import __pyarmor__
Binary file
@@ -1,8 +0,0 @@
1
- pyarmor_runtime_000000/__init__.py,sha256=jAO2mIdhHb4P5lDelolfyuiP0CMOzyHXl8hwN8GrV3M,103
2
- pyarmor_runtime_000000/pyarmor_runtime.pyd,sha256=mM-qJ9dCjI3480h-_ZxqWpsjSsZpTOHApSKY5wo2fgg,634368
3
- ymj_tool/__init__.py,sha256=rmY72dol55QHr54n2ruqkbdBFKsWSFEjqkBu2L3-wpA,702
4
- ymj_tool/common_utils.py,sha256=njpvfmVhitJKnH5HuP7K6FpJE70iBmOMev23mtt7ko4,6822
5
- ymj_tool-1.0.3.dist-info/METADATA,sha256=UQGpv-Wm9oSkFpE95Okqt2bYOxv_SQwNHUeIBjsADjQ,265
6
- ymj_tool-1.0.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
7
- ymj_tool-1.0.3.dist-info/top_level.txt,sha256=Ijrl7Rgd9-OMWDnPybxsw1qcu8mLNZWseYlWzbLTYBs,32
8
- ymj_tool-1.0.3.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- pyarmor_runtime_000000
2
- ymj_tool