Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d872604855 | ||
|
|
2b6fb933a4 | ||
|
|
1da892e863 | ||
|
|
19bfedd1a3 | ||
|
|
cb87392d9d | ||
|
|
7cd5bc9ec3 | ||
|
|
edcc1a30ab | ||
|
|
6f93f6ab06 | ||
|
|
9de1f44288 | ||
|
|
3d360b0881 | ||
|
|
cf1c415846 | ||
|
|
90133e2444 | ||
|
|
81246046b8 | ||
|
|
20e037ab9e | ||
|
|
bc27036ba7 | ||
|
|
1cd470b90b | ||
|
|
64471e34bc | ||
|
|
f4c5d3de09 | ||
|
|
0dc59405e3 | ||
|
|
7c775bdc9b | ||
|
|
61400ff4d4 | ||
|
|
e119e34ebe | ||
|
|
6f059747bf | ||
|
|
24d72641fa | ||
|
|
b91fca3aa6 | ||
|
|
a6f1947837 | ||
|
|
6919131cef | ||
|
|
9186d801fc | ||
|
|
76e2f200bd | ||
|
|
1400bbd9ce | ||
|
|
fd37628ac2 | ||
|
|
4396d5afc4 | ||
|
|
f5faf80883 | ||
|
|
ba32da97c8 | ||
|
|
ec2de73d3a | ||
|
|
f4d032e5c7 | ||
|
|
4114aac6c3 | ||
|
|
0c43c6bb5f | ||
|
|
7b3c965b88 | ||
|
|
d1035268f6 | ||
|
|
8968f30bf9 | ||
|
|
84c2c29600 | ||
|
|
b2a59f261c | ||
|
|
363a330f8e | ||
|
|
1d2aa059ee | ||
|
|
f2bfa908a1 | ||
|
|
02a8de4696 | ||
|
|
22fa3eff71 | ||
|
|
69361209c3 | ||
|
|
ff0aeaa4ef | ||
|
|
3c461dfd4b | ||
|
|
c6beda383e | ||
|
|
3d59f3befd | ||
|
|
e54f0db239 | ||
|
|
0f877f2749 | ||
|
|
b69ba165d9 | ||
|
|
965076fe52 | ||
|
|
f4d6cb0430 | ||
|
|
19d412188c | ||
|
|
798d85978a | ||
|
|
819742d753 | ||
|
|
9b32fa6219 | ||
|
|
2c93661726 | ||
|
|
bddaca2a1e | ||
|
|
2f06f2e051 | ||
|
|
1d26e46bd9 | ||
|
|
fa0ff826a3 | ||
|
|
e1b3114c83 | ||
|
|
a655f075db | ||
|
|
13d4ebbf6b | ||
|
|
913d10b1ee | ||
|
|
eb541a0104 | ||
|
|
2063186994 | ||
|
|
860d571039 | ||
|
|
c6d79adf9a | ||
|
|
5453900ba1 | ||
|
|
5029ff1e37 | ||
|
|
47fb691339 | ||
|
|
dff9dd17bf | ||
|
|
5bc4a16b90 | ||
|
|
b1918953b0 | ||
|
|
6e89ed7007 | ||
|
|
744e8bc941 | ||
|
|
0b98ce7ffd | ||
|
|
ca8b293b06 | ||
|
|
e28d99a257 | ||
|
|
488feb6108 | ||
|
|
6cdb106f07 | ||
|
|
a7c5ccd27a | ||
|
|
136f9dbf0a | ||
|
|
16b45c3450 | ||
|
|
68330fad52 | ||
|
|
dca167518d | ||
|
|
bcc44422ef | ||
|
|
e080e03466 | ||
|
|
b6e75490de | ||
|
|
196c014576 | ||
|
|
236110df5e | ||
|
|
b2ae192056 | ||
|
|
f080969a62 | ||
|
|
69d969898d | ||
|
|
a21a766926 | ||
|
|
f11fdb6b96 | ||
|
|
c7445df4c6 | ||
|
|
2c45c9bc5b | ||
|
|
ae5ed27cb6 | ||
|
|
11f9fe3c8b | ||
|
|
e93ad3bd33 | ||
|
|
20c26ea0a8 | ||
|
|
5925a80d3b | ||
|
|
56cb95e523 | ||
|
|
a6e101cc5d | ||
|
|
e8292b6f81 | ||
|
|
37a4392c94 | ||
|
|
a897f75ecf | ||
|
|
79055d3779 | ||
|
|
3d39aa7f97 | ||
|
|
2c1d09affc | ||
|
|
4775358a79 | ||
|
|
cb5f8e8191 | ||
|
|
8209b4ff01 | ||
|
|
e110134d24 | ||
|
|
c2248fdd49 | ||
|
|
58fea5b0ca | ||
|
|
7a36946545 | ||
|
|
563d9a8a36 | ||
|
|
bdbd0617b5 | ||
|
|
67006d88cb | ||
|
|
ded2083462 | ||
|
|
87b7d044f8 | ||
|
|
9781cef29b | ||
|
|
52c393148b | ||
|
|
b98d617d6f | ||
|
|
b475573e0e | ||
|
|
ba3c85d5b2 | ||
|
|
410777efb3 | ||
|
|
0b3fb452b4 | ||
|
|
aaff565172 | ||
|
|
dd0786648e | ||
|
|
e145ffa111 | ||
|
|
b322468c1c | ||
|
|
992d8b909c | ||
|
|
d5327c6370 | ||
|
|
0d13bb5f8f | ||
|
|
3ad08a33a9 | ||
|
|
533e0ed736 | ||
|
|
e7ba77b600 | ||
|
|
f3b84b04f7 | ||
|
|
f4c948aca9 | ||
|
|
1507f5df5a | ||
|
|
0562d11a71 | ||
|
|
b3a9f5cce0 | ||
|
|
5974a3c85a | ||
|
|
78c732d2b8 | ||
|
|
d087b2dc16 | ||
|
|
16c5d014aa | ||
|
|
e661ff400f | ||
|
|
b8c8e2d04d | ||
|
|
8fc36f2b20 | ||
|
|
4b73a09a09 | ||
|
|
65c4d5d5b7 | ||
|
|
19d0702aee | ||
|
|
b74e8330de | ||
|
|
334b837d43 | ||
|
|
169cb37f08 | ||
|
|
8f29c3f0da | ||
|
|
bec5cc4a04 | ||
|
|
af627ee202 | ||
|
|
1e091a3e7c | ||
|
|
8840da91d7 | ||
|
|
1f4ff04ed3 | ||
|
|
60974e8f72 | ||
|
|
86f68994c2 | ||
|
|
21c4918486 | ||
|
|
c6a426ec25 | ||
|
|
db75a22c1c | ||
|
|
7e85d22ecd | ||
|
|
67adadc0a4 | ||
|
|
6b78562454 | ||
|
|
4f13afc867 | ||
|
|
c34e8f193f | ||
|
|
4bcb507eae | ||
|
|
a50d457d75 | ||
|
|
9f119265a9 | ||
|
|
0b121a624b | ||
|
|
0f47f5ec8f | ||
|
|
f89896d041 | ||
|
|
5e335fd5e8 | ||
|
|
fd245dec14 | ||
|
|
774cdc5de3 | ||
|
|
633cfad1a8 | ||
|
|
cb7875c320 | ||
|
|
7960a57fc0 | ||
|
|
a23f693921 | ||
|
|
c49cb8bc4a | ||
|
|
02c425cfc0 | ||
|
|
be96ba0a0e | ||
|
|
df5e00977a | ||
|
|
f055650365 | ||
|
|
b0baddda3b | ||
|
|
69359cba05 | ||
|
|
8b0b29e39b | ||
|
|
21ac50667d | ||
|
|
b843a438ba | ||
|
|
441cc30c0b | ||
|
|
85adf5dc80 | ||
|
|
0c48f0981d | ||
|
|
88b646e41c | ||
|
|
dc4c3e0a99 | ||
|
|
262f6d55a0 | ||
|
|
2d68400670 | ||
|
|
8acaae3f0d | ||
|
|
a5cb26528f | ||
|
|
ac2520a03f | ||
|
|
9c15cc7b33 | ||
|
|
c38f460163 | ||
|
|
9bda8c9e77 | ||
|
|
558be68bad | ||
|
|
6b9d27ce9b | ||
|
|
412745eede | ||
|
|
91ea771af1 | ||
|
|
238ab03db3 | ||
|
|
2d63da193d | ||
|
|
fa4c20a241 | ||
|
|
6294fc33d1 | ||
|
|
c4cf48a94b | ||
|
|
2934c7eb57 | ||
|
|
46ce454105 | ||
|
|
9ab06a0ea9 | ||
|
|
e6f742380a | ||
|
|
2686812470 | ||
|
|
cd11b5b7b2 | ||
|
|
aae35dc640 | ||
|
|
f0b669ff85 | ||
|
|
237605bb9f | ||
|
|
1778046581 | ||
|
|
ff10adfabb | ||
|
|
1cb0f8d7ba | ||
|
|
5813bbdcd1 | ||
|
|
b38e5b177e | ||
|
|
9d66cf248c | ||
|
|
ebcf90d426 | ||
|
|
51904db187 | ||
|
|
4fc8755b8d | ||
|
|
7afcbfaa26 | ||
|
|
55cb96d978 | ||
|
|
a1de099974 | ||
|
|
a0238732fe | ||
|
|
6c100b0679 | ||
|
|
e4d159840f | ||
|
|
0375b3ff02 | ||
|
|
746bae5103 | ||
|
|
70eb2c4500 | ||
|
|
69175f3ae1 | ||
|
|
ed5fab2c54 | ||
|
|
1425ff8e6c | ||
|
|
832ab549a1 | ||
|
|
4ec1661c26 | ||
|
|
ea27712b62 | ||
|
|
6f65efe2d8 | ||
|
|
8edcf60baf | ||
|
|
74f6aec367 | ||
|
|
62c65a766a | ||
|
|
acbcaa337e | ||
|
|
f4dbe57244 | ||
|
|
b494c64a2f | ||
|
|
321e086b95 | ||
|
|
fb60d6b867 | ||
|
|
8ff2e2074a | ||
|
|
1151a1c43f | ||
|
|
13bc6cecc4 | ||
|
|
a4ea572458 | ||
|
|
880df4dee9 | ||
|
|
b75e86dd11 | ||
|
|
75c84092ae | ||
|
|
c69db97da8 | ||
|
|
9c2a8892ae | ||
|
|
f92111563c | ||
|
|
0abb3e78cb | ||
|
|
fb83071419 | ||
|
|
f593c6df8b | ||
|
|
9b452b25c2 | ||
|
|
c835fcf99a | ||
|
|
e4373edc54 | ||
|
|
686c05785f | ||
|
|
994358a793 | ||
|
|
b02ca3757c | ||
|
|
164ec25415 | ||
|
|
8ee85cd9ca | ||
|
|
c07bf05754 | ||
|
|
2e2a08a765 | ||
|
|
10be5f442f | ||
|
|
0fcd8565d8 | ||
|
|
e07eee86dd | ||
|
|
f25d5d73c6 | ||
|
|
28b4d00d3c | ||
|
|
c75cf8a539 | ||
|
|
ff7199b857 | ||
|
|
5613fd81b7 | ||
|
|
c1458502f7 | ||
|
|
b2f620bd3d | ||
|
|
0e1030f186 | ||
|
|
ff4ffb8ec5 | ||
|
|
941458a381 | ||
|
|
560eb924b8 | ||
|
|
c3fab9e48b | ||
|
|
fc4dc74f9e | ||
|
|
35f0362910 | ||
|
|
27dfaa5f06 | ||
|
|
cf1866710a | ||
|
|
b3a5d06c4a | ||
|
|
7c904ff331 | ||
|
|
c7855a9dd1 | ||
|
|
5faee6a05f | ||
|
|
9213f9f54f | ||
|
|
c5e8351d76 | ||
|
|
e8e245ac0b | ||
|
|
2d8d6851d1 | ||
|
|
54f3e2ceda | ||
|
|
81d98917c3 | ||
|
|
8651f1e5d6 | ||
|
|
db1a26424d | ||
|
|
16405810dd | ||
|
|
f4f7fc1b0c | ||
|
|
e1145a743a | ||
|
|
6e5b54bbfe | ||
|
|
a948219e1a | ||
|
|
5675e926d5 | ||
|
|
cb7f8bbaab | ||
|
|
61e7fd8f40 | ||
|
|
76fab2671a | ||
|
|
dbc2bd2d62 | ||
|
|
73e62935ff | ||
|
|
c9e28b5482 | ||
|
|
6bf58eae4a | ||
|
|
3e09574b3c | ||
|
|
a7a00b9ca6 | ||
|
|
7a62e2df27 | ||
|
|
317f1ccae7 | ||
|
|
884631409a | ||
|
|
14dca5e2cb | ||
|
|
3a0b856d47 | ||
|
|
e66f8af022 | ||
|
|
13e4560d86 | ||
|
|
5ea789df7f | ||
|
|
debda9ec11 | ||
|
|
b3f126181b | ||
|
|
6bd110cae7 | ||
|
|
635f4ccde3 | ||
|
|
01da2685a5 | ||
|
|
b040aad8d1 | ||
|
|
84a0f08618 | ||
|
|
1f64c0d672 | ||
|
|
5bfff87e21 | ||
|
|
47db0e1c46 | ||
|
|
9a9fdc418f | ||
|
|
c30c89ed40 | ||
|
|
d7bb89968f | ||
|
|
f9b431d158 | ||
|
|
a1364896af | ||
|
|
2870a999a2 | ||
|
|
98646a6bd9 | ||
|
|
8ec894f576 | ||
|
|
254a67b9a8 | ||
|
|
eebfb79c27 | ||
|
|
1a1d7ec783 | ||
|
|
4482144b4d | ||
|
|
827279c9a8 | ||
|
|
b1d3488842 | ||
|
|
90112ae1ae | ||
|
|
1f4b9390b9 | ||
|
|
cc142aca40 | ||
|
|
89513b2c0d | ||
|
|
bfcd00acec | ||
|
|
9833b28a50 | ||
|
|
d0404dd29c | ||
|
|
9d3761e7f6 | ||
|
|
03515acc68 | ||
|
|
f8413f4cfb | ||
|
|
24f7f67e63 | ||
|
|
85129cdfe1 | ||
|
|
6d4f8b2731 | ||
|
|
24a0efcce1 | ||
|
|
ce6be1b4d5 | ||
|
|
723ac47c48 | ||
|
|
720d163bdb | ||
|
|
a74047d4e5 | ||
|
|
f6538f93c7 | ||
|
|
49cb0b3ef5 | ||
|
|
c81845ba3a | ||
|
|
053ae64008 | ||
|
|
48989840b8 | ||
|
|
36c7bcd87f | ||
|
|
a50eca1600 | ||
|
|
f70dc8eb46 | ||
|
|
f13d816c5b | ||
|
|
3429e658b6 | ||
|
|
0c6f9d6041 | ||
|
|
4a668499b0 | ||
|
|
f1057252b3 | ||
|
|
4e3c866536 | ||
|
|
c585cb370c | ||
|
|
2211a2b1d4 | ||
|
|
42069e2aac | ||
|
|
fd499a17fe | ||
|
|
0cc56d3da7 | ||
|
|
2096f55ce8 | ||
|
|
a4afe0ac10 | ||
|
|
d523b66970 | ||
|
|
192335249c | ||
|
|
e02879b3d7 | ||
|
|
bf7157fb3e | ||
|
|
7c2ae87c73 | ||
|
|
c1357bb2e1 | ||
|
|
c298c3773e | ||
|
|
7d09c6501c | ||
|
|
1a051d42af | ||
|
|
22bbcc5217 | ||
|
|
017f153002 | ||
|
|
cf4762ad04 | ||
|
|
6ba920e26a | ||
|
|
a66acf0ef9 | ||
|
|
8ab982ac38 | ||
|
|
0c32a126a9 | ||
|
|
fd47881f88 | ||
|
|
61298235fd | ||
|
|
4a38277c3e | ||
|
|
fd7912f631 | ||
|
|
4f1b0e99e4 | ||
|
|
086e375cea | ||
|
|
f90b132ccb | ||
|
|
f4bd217445 | ||
|
|
5524e2f689 | ||
|
|
42b8201f37 | ||
|
|
f71c821128 | ||
|
|
28330d3ad6 | ||
|
|
5afd576a3c | ||
|
|
edcf82d139 | ||
|
|
69e5143a27 | ||
|
|
215d0faa53 | ||
|
|
470142a640 | ||
|
|
8e67a8d679 | ||
|
|
be5baf9c87 | ||
|
|
7a05e42f3f | ||
|
|
34240ec01f | ||
|
|
0bf6eccb8b | ||
|
|
1f3b694231 | ||
|
|
470358585d | ||
|
|
4c69b555ae | ||
|
|
aef60afcd8 | ||
|
|
ec753c50a5 | ||
|
|
cbebe878aa | ||
|
|
e9d930507e | ||
|
|
3eba768d06 | ||
|
|
76a5732997 | ||
|
|
32987c1274 | ||
|
|
8990b97a32 | ||
|
|
65b427121f | ||
|
|
81dd259672 | ||
|
|
05c2031d47 | ||
|
|
2b2de7550f | ||
|
|
f9a8244086 | ||
|
|
86f3904b8a | ||
|
|
017aab4b0a | ||
|
|
e33777c961 | ||
|
|
ac14acd042 | ||
|
|
e9f07df010 | ||
|
|
5d3855cdfa | ||
|
|
938e76fb4a | ||
|
|
c0f6722c18 | ||
|
|
54e8922bc3 | ||
|
|
81b47dbf45 | ||
|
|
312401d80f | ||
|
|
8927ab7e36 | ||
|
|
6d99576e36 | ||
|
|
5618cd19cb | ||
|
|
da11c6f5b6 | ||
|
|
6e370e776a | ||
|
|
ab6b319738 | ||
|
|
aca03cacf9 | ||
|
|
01b5e7ced0 | ||
|
|
6d8ef1d4a4 | ||
|
|
f029636757 | ||
|
|
168b396daa | ||
|
|
0873a59392 | ||
|
|
3c646f57e6 | ||
|
|
940db64678 | ||
|
|
da1c980743 | ||
|
|
e3a4b636f7 | ||
|
|
9434898efa | ||
|
|
5d1c17e6ff | ||
|
|
4f736b352a | ||
|
|
037e2fbab1 | ||
|
|
4b24858631 | ||
|
|
81904a3a7b | ||
|
|
6e63a789cb | ||
|
|
4b977ec4df | ||
|
|
fa692caaa8 | ||
|
|
7082003e4a | ||
|
|
dec35d9b8a | ||
|
|
90711465ba | ||
|
|
1bb74f20b4 | ||
|
|
b2cce37490 | ||
|
|
22e41eeacc | ||
|
|
600f2543a6 | ||
|
|
9e7185ae6d | ||
|
|
11725afa5a | ||
|
|
3bb94d05be | ||
|
|
7290db72e8 | ||
|
|
4dc92b081e | ||
|
|
68c614d9dd | ||
|
|
efca8d0161 | ||
|
|
6d86b15800 | ||
|
|
f43b2df6fc | ||
|
|
9f3eb593f8 | ||
|
|
9ca7c41fe7 | ||
|
|
f39746c116 | ||
|
|
88f1dc2c01 | ||
|
|
ee3daae665 | ||
|
|
9a47f06c2a | ||
|
|
6df173d30a | ||
|
|
f992394f6f | ||
|
|
98c19fcd7e | ||
|
|
12cc2439af | ||
|
|
2341100397 | ||
|
|
b15c9e4e39 | ||
|
|
dbf860ca7a | ||
|
|
aa481f415d | ||
|
|
59eeae791a | ||
|
|
0691a4420c | ||
|
|
66e744dd57 | ||
|
|
9f5eb72cec | ||
|
|
a021ab6e42 | ||
|
|
6a316e850c | ||
|
|
69413c1bed | ||
|
|
c152cd944e | ||
|
|
a055864676 | ||
|
|
cb64da2d5f | ||
|
|
5633e70a11 | ||
|
|
c1f6d0692b | ||
|
|
fe527f1668 | ||
|
|
774a2313fb | ||
|
|
a5f07706f5 | ||
|
|
2b6b8accf1 | ||
|
|
e6aca5533b | ||
|
|
dc60cc3ccb | ||
|
|
5613993019 | ||
|
|
1613101bd6 | ||
|
|
cb3440494e | ||
|
|
78b979f397 | ||
|
|
6742b71208 | ||
|
|
e0178ac2b5 | ||
|
|
e2141decaa | ||
|
|
4a68c62e72 | ||
|
|
bc7d5704f9 | ||
|
|
a984be2535 | ||
|
|
026f96d473 | ||
|
|
0dbca7895e | ||
|
|
0f390668f7 | ||
|
|
f4ced70d8e | ||
|
|
7b805df433 | ||
|
|
4b66171388 | ||
|
|
0cf80753ae | ||
|
|
6f3d315851 | ||
|
|
475d4b4a80 | ||
|
|
bd8633de0d | ||
|
|
5d2937c896 | ||
|
|
eb89284834 | ||
|
|
f5777b2a68 | ||
|
|
9431a4dd6c | ||
|
|
82a4dfdfd5 | ||
|
|
9bd63d15e9 | ||
|
|
f6e5c8e0b1 | ||
|
|
3b56f6dc6f | ||
|
|
2c24079552 | ||
|
|
f58a846826 | ||
|
|
8bc74a8833 | ||
|
|
5bd0033ff0 | ||
|
|
e45758be80 | ||
|
|
5033348eed | ||
|
|
2327fd099c | ||
|
|
6afa02ea71 | ||
|
|
9cf1b38e56 | ||
|
|
241a9ffea5 | ||
|
|
3e0749ad60 | ||
|
|
0f55ff4295 | ||
|
|
d8f8c34991 | ||
|
|
7ddd323b65 | ||
|
|
36bbb6e708 | ||
|
|
06638a8cdc | ||
|
|
42d8a8fde0 | ||
|
|
e2997fbbce | ||
|
|
5dd671eb4a | ||
|
|
59aff0f196 | ||
|
|
548def29b3 | ||
|
|
84d59eb7d4 | ||
|
|
1cc3b599a9 |
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020-2023 87owo (PYAS Security)
|
||||
Copyright (c) 2020-2024 87owo (PYAS Security)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"language": "en_US",
|
||||
"high_sensitivity": 0,
|
||||
"cloud_services": 1
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
import time, json, hashlib, numpy
|
||||
from collections import Counter
|
||||
|
||||
class ListSimHash:
|
||||
def __init__(self):
|
||||
self.model = {}
|
||||
|
||||
def save_model(self, file_name):
|
||||
with open(file_name, 'w') as f:
|
||||
json.dump(self.model, f)
|
||||
print(f"\nModel Is Saved In {file_name}")
|
||||
|
||||
def load_model(self, model_data):
|
||||
if isinstance(model_data, str):
|
||||
with open(model_data, 'r') as f:
|
||||
model_data = json.load(f)
|
||||
self.model = model_data
|
||||
|
||||
def get_model(self, label):
|
||||
return self.model[label]
|
||||
|
||||
def train_model(self, label, data):
|
||||
start = time.time()
|
||||
print(f"Convert {label}")
|
||||
if label not in self.model:
|
||||
self.model[label] = []
|
||||
for i, x in enumerate(data, 1):
|
||||
self.model[label].append(self.build_text(x))
|
||||
used = "{0:.2f}".format(time.time()-start)
|
||||
prefix, suffix = f'{i}/{len(data)}:', f'{used}s'
|
||||
self.progress_bar(i, len(data), prefix, suffix)
|
||||
|
||||
def build_text(self, content):
|
||||
sums, batch, count = [], [], 0
|
||||
features = dict(Counter(sorted(content)))
|
||||
for f, w in features.items():
|
||||
count += w
|
||||
batch.append(hashlib.md5(json.dumps(f).encode('utf-8')).digest() * w)
|
||||
if len(batch) >= 10000:
|
||||
sums.append(self.sum_hashes(batch))
|
||||
batch = []
|
||||
if batch:
|
||||
sums.append(self.sum_hashes(batch))
|
||||
combined_sums = numpy.sum(sums, 0)
|
||||
v = numpy.packbits(combined_sums > count / 2).tobytes()
|
||||
return int.from_bytes(v, 'big')
|
||||
|
||||
def sum_hashes(self, digests):
|
||||
bitarray = numpy.unpackbits(numpy.frombuffer(b''.join(digests), dtype='>B'))
|
||||
return numpy.sum(numpy.reshape(bitarray, (-1, 128)), 0)
|
||||
|
||||
def progress_bar(self, iteration, total, prefix='', suffix='', length=50, fill='█'):
|
||||
percent = min(100.0, max(0.0, 100 * (iteration / float(total))))
|
||||
end_char = '\n' if percent >= 100 else '\r'
|
||||
percent_string = "{0:.2f}".format(percent)
|
||||
filled_length = int(length * iteration // total)
|
||||
bar = fill * filled_length + ' ' * (length - filled_length)
|
||||
print(f'\r {prefix: <10} |{bar}| {percent_string}% {suffix}', end=end_char)
|
||||
|
||||
def predict_all(self, query):
|
||||
label_similarities = {}
|
||||
query_hash = self.build_text(query)
|
||||
for label in self.model:
|
||||
max_similarity = 0
|
||||
for data_point in self.model[label]:
|
||||
similarity = self.similar(data_point, query_hash)
|
||||
if similarity > max_similarity:
|
||||
max_similarity = similarity
|
||||
label_similarities[label] = max_similarity
|
||||
return label_similarities
|
||||
|
||||
def predict(self, query):
|
||||
max_similarity, max_label = 0, None
|
||||
query_hash = self.build_text(query)
|
||||
for label in self.model:
|
||||
for data_point in self.model[label]:
|
||||
similarity = self.similar(data_point, query_hash)
|
||||
if similarity > max_similarity:
|
||||
max_similarity, max_label = similarity, label
|
||||
return max_label, max_similarity
|
||||
|
||||
def similar(self, x, y):
|
||||
hamming_distance = bin(x ^ y).count('1')
|
||||
return 1 - hamming_distance / 128
|
||||
@@ -0,0 +1,8 @@
|
||||
slist = [".exe",".dll",".com",".msi",".scr",
|
||||
".js",".bat",".cmd",".ps1",".vbs"]
|
||||
|
||||
alist = [".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv"]
|
||||
+459
-388
File diff suppressed because it is too large.
Load diff
+54
-47
@@ -1,47 +1,54 @@
|
||||
translations = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"已開啟","Off":"已關閉"},
|
||||
"zh_CN": {"已開啟":"已开启","已關閉":"已关闭","On":"已开启","Off":"已关闭",
|
||||
"軟體":"软件","檔案":"文件","確定":"确认","設定":"设置","關於":"关于",
|
||||
"錯誤":"错误","實時":"实时","發現":"发现","關閉":"关闭","裝置":"设备",
|
||||
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
|
||||
"位元":"字节","增":"增","單":"单","簽":"签","無":"无","關":"关",
|
||||
"項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保","鑰":"钥",
|
||||
"當":"当","後":"后","護":"护","導":"导","區":"区","復":"复","攔":"拦",
|
||||
"請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选","啟":"启",
|
||||
"監":"监","並":"并","徑":"径","盤":"盘","隱":"隐","動":"动","狀":"状",
|
||||
"誌":"志","靈":"灵","這":"这","會":"会","題":"题","擇":"择","語":"语",
|
||||
"顯":"显","變":"变","戶":"户","碼":"码","雲":"云","訂":"订","稱":"称",
|
||||
"類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网","詢":"询",
|
||||
"製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红","綠":"绿",
|
||||
"態":"态","務":"务","連":"连","檢":"检","測":"测","強":"强"},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website",
|
||||
"許可條款":"License Terms","可疑":"Suspicious ","惡意軟體":"Malware ",
|
||||
"啟用":"Enable ","禁用":"Disable ","正在初始化中":"Initializing ",
|
||||
"正在掃描":"Scanning ","正在刪除":"Deleting ","最小化到":"Minimize To ",
|
||||
"確定要":"Sure Want To ","靈敏度":"Sensitivity ","更新":"Update",
|
||||
"白色主題":"White","黑色主題":"Black","黃色主題":"Yellow","紅色主題":"Red",
|
||||
"藍色主題":"Blue","綠色主題":"Green","語言":"Language ","製作":"Make",
|
||||
"測試人員":"Testers","版本資訊":"Information","無效簽名":"Unsign ",
|
||||
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
|
||||
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
|
||||
"失敗":"Failed ","請":"Please ","路徑":"Path ","方式":"Method ",
|
||||
"需要":"Need ","病毒":"Virus ","選擇":"Select ","返回":"Back",
|
||||
"受到":"Been ","錯誤":"Error","完成":"Complete ","引擎":"Engine ",
|
||||
"托盤":"Tray ","圖標":"Icon ","不安全":"Unsafe","增強":"Enhanced ",
|
||||
"系統":"System ","雲端":"Cloud ","重啟":"Reboot ","修復":"Repair ",
|
||||
"裝置":"Device ","發現":"Found ","成功":"Success ","清理":"Cleanup ",
|
||||
"確定":"OK","執行":"Execute ","警告":"Warning ","使用":"Use ",
|
||||
"網路":"Network ","變更":"Change ","總數":"Total","結束":"End ",
|
||||
"選項":"Options ","監控":"Monitor ","連接":"Connect ","可以":"To ",
|
||||
"進程":"Process ","攔截":"Block ","引導":"Boot ","刪除":"Delete ",
|
||||
"分區":"Partition ","設定":"Settings","關於":"About","模式":"Mode ",
|
||||
"提高":"Improve ","安全":"Security ","顯色":"Color ","主題":"Themes ",
|
||||
"風險":"Risk ","介面":"GUI ","核心":"Core ","服務":"Services ",
|
||||
"管理":"Manage","所有":"All ","全盤":"Full ","日誌":"Log",
|
||||
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
|
||||
"增加到":"Add File To ","白名單":"White List ","軟體":"Software ",
|
||||
"增加":"Add","移除":"Delete","項目":"Items ","生成":"Create ",
|
||||
"開啟":"Open ","您":"You ","此":"This ","並":"And ","未":"Not ",
|
||||
"高":"High ","新":"New ","和":"And ","會":"Can ","密鑰":"Key ",
|
||||
"已":"Has ","立即":"","顯示":"","個":"","的":"","嗎":"","中":"",
|
||||
"了":"","行":"","稱":""," ":" "}}
|
||||
translate_dict = {
|
||||
"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"已開啟","Off":"已關閉"},
|
||||
"zh_CN": {"已開啟":"已开启","已關閉":"已关闭","On":"已开启","Off":"已关闭",
|
||||
"軟體":"软件","檔案":"文件","確定":"确认","設定":"设置","關於":"关于",
|
||||
"錯誤":"错误","實時":"实时","發現":"发现","關閉":"关闭","裝置":"设备",
|
||||
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","誤報":"误报","複製":"复制",
|
||||
"訊":"讯","項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保",
|
||||
"鑰":"钥","當":"当","後":"后","護":"护","導":"导","區":"区","復":"复",
|
||||
"攔":"拦","請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选",
|
||||
"啟":"启","監":"监","並":"并","徑":"径","盤":"盘","隱":"隐","動":"动",
|
||||
"狀":"状","誌":"志","這":"这","會":"会","題":"题","擇":"择","語":"语",
|
||||
"無":"无","顯":"显","變":"变","戶":"户","碼":"码","雲":"云","介":"界",
|
||||
"稱":"称","類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网",
|
||||
"詢":"询","製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红",
|
||||
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","增":"增","單":"单","開":"开",
|
||||
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败"},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website",
|
||||
"惡意檔案":"Virus ","惡意軟體":"Malware ","勒索行為":"Ransom ",
|
||||
"惡意腳本":"Script ","惡意行為":"Behavior ","可疑軟體":"Suspicious ",
|
||||
"許可條款":"License Terms","惡意":"Malicious","可疑":"Suspicious",
|
||||
"啟用":"Enable ","禁用":"Disable ","正在初始化中":"Initializing ",
|
||||
"正在掃描":"Scanning ","正在刪除":"Deleting ","最小化到":"Minimize To ",
|
||||
"確定要":"Sure Want To ","靈敏度":"Sensitivity ","更新":"Update ",
|
||||
"白色主題":"White","黃色主題":"Yellow","紅色主題":"Red","語言":"Language ",
|
||||
"藍色主題":"Blue","綠色主題":"Green","自定主題":"Custom","最新":"Latest ",
|
||||
"測試人員":"Testers","版本資訊":"Information","通訊":"Communication ",
|
||||
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
|
||||
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
|
||||
"失敗":"Failed ","請":"Please ","路徑":"Path ","方式":"Method ",
|
||||
"需要":"Need ","病毒":"Virus ","選擇":"Select ","返回":"Back",
|
||||
"受到":"Been ","錯誤":"Error","完成":"Complete ","引擎":"Engine ",
|
||||
"托盤":"Tray ","圖標":"Icon ","不安全":"Unsafe","增強":"Enhanced ",
|
||||
"系統":"System ","雲端":"Cloud ","重啟":"Reboot ","修復":"Repair ",
|
||||
"裝置":"Device ","發現":"Found ","成功":"Success ","清理":"Cleanup ",
|
||||
"確定":"OK","執行":"Execute ","警告":"Warning ","使用":"Use ",
|
||||
"網路":"Network ","變更":"Change ","總數":"Total","結束":"End ",
|
||||
"選項":"Options ","監控":"Monitor ","連接":"Connect ","可以":"To ",
|
||||
"進程":"Process ","攔截":"Block ","引導":"Boot ","刪除":"Delete ",
|
||||
"分區":"Partition ","設定":"Settings","關於":"About","模式":"Mode ",
|
||||
"提高":"Improve ","安全":"Security ","顯色":"Color ","主題":"Themes ",
|
||||
"風險":"Risk ","介面":"GUI ","核心":"Core ","服務":"Services ",
|
||||
"管理":"Manage","所有":"All ","您":"You ","取消":"Cancel ","未":"Not ",
|
||||
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
|
||||
"增加到":"Add File To ","白名單":"White List ","軟體":"Software ",
|
||||
"增加":"Add","移除":"Delete","項目":"Items ","生成":"Create ","稱":"",
|
||||
"複製":"Copy ","開啟":"Open ","此":"This ","並":"And ","全盤":"Full ",
|
||||
"已經是":"Already ","數據庫":"Database ","誤報":"False Positive ",
|
||||
"高":"High ","新":"New ","和":"And ","可能會":"Possible ","會":"Can ",
|
||||
"日誌":"Log","已":"Has ","彈窗":"Window ","要":"To ","驅動":"Drive ",
|
||||
"的":"","顯示":"","個":"","嗎":"","中":"","了":"","行":"","立即":"",
|
||||
"密鑰":"Key ","檢測":"Detect ","製作":"Make"," ":" "}}
|
||||
@@ -0,0 +1 @@
|
||||
{"Unknown": [10199010580531108378153827424457992432, 20965212707052912989658218281213053170, 20963924773736013955013492889397430514, 20965222847950647661922877313293420786, 20963924773736089512877253988092938483, 10533913729454048551192748670221101302, 10497567570978277785165438149536581872, 230418814927598623996991522865620895293], "White": [126672244860282820431531292152154892541, 126555244512863767515621062938772454385, 78206639303253050193082960917406129821, 180439547362931620767428561827016696106, 96103515196312870469979178835907426963, 106202738889863580199047548478556282224, 260681472954591486442301293972682570259, 334352372173892944739362819086050576826, 270698534086324527574602815275595168743, 52278935817957542072232518657580445973, 99964490807793194121661552779445205157, 114471449979609419026325537602253303510, 170288120086869810213050150585452458992, 20129952829430162432875533418501193427, 266141180604311766657329911262256522695, 194231769680954789184967343915738715269, 137555894938392968938334822886799145665, 32033385634193095265531812355001705364, 110412723075988544148987035520371252041, 95564371670156926573557604030875376880, 95235309747885939408380636606625811569, 272762168699147334321583996672002378255, 95234011064914281942190040816173653105, 94471327154819245031506476509638106704, 95313696146069105288568328992515893493, 93984468150284189415663958982282127605, 191147052097100843670989027331488156725, 103210672664238242772979731817227685237, 56724333007221946388761990730009660128, 101562244577076015330628724737265682909, 97287175069805646577858533189449166301, 137063300177336245346774014048969161649, 316391968656924997605188916362257077459, 264287352948858755174876745019957203391, 127136776672701393662717729226704358773, 9912885994425979960261799249926495473, 214498205255495472884061693173662060219, 105039659248652423950583866198328679776, 106486519388821918892958052791862913681, 81533898116464931264738244322343722087, 127128973031678141900306064284785253496, 257976287344519798598519417614968543943, 95234579695571071996043856278635879538, 307531936139217865648235621101964847809, 205524205305644077365818951604097443015, 10082933643349790779259596715866791152, 105863211359421133420308580490619723120, 105536091507504387016141979202387910000, 115256152418524974755063297364983094641, 258226055192645594643924661804242821079, 184879672381654838626194080314169453584, 105909917863928976433791749005432917096, 34668429459089199253155684394504639701, 9333342038490638804353570140444499409, 49992947087053905927423189110869930637, 114390951894751980367497997972138956045, 40525380716593540848111929430426386129, 92531564279929657078344831661770634033, 137845158706024438551516917025209916775, 82711778578996712205456007623860083392, 142895363148849470268902285117702200512, 176210598858636561054489191954962668740, 133988075388031745460051108783604183680, 127463789261350104996635356465169505635, 98401956749501984262112138828559240544, 105619903475864025251671385889627380849, 194216192765620392180514937530431948487, 178730848644410936934440792379530771324, 258767967557372966404648755263173813716, 95568909833307793735851930883495894385, 105203216600314032187918420804040465776, 10160172324731669179270431009861737585, 95562338257159239457022778648277753201, 125705675445940363792857463789011840389, 105782103246308081595321955114562886777, 34490061240648476397849656073168201108, 337793686977585440073129666111702532467, 278253338747731733314329375842609871921, 204788843742030229839080201679229506773, 106117654063199359331238217293466812006, 123266687541636144245366511635599982231, 113845713591553304589832425329269218672, 102400300404095555238772811174816483363, 115752031916027952368786798048662461543, 205193551069866139019248248605938239445, 101437234347196055762008445071888009636, 148030553843923537774182040572301348817, 95562399131158503793285318098946563443, 144743835053038288880188325484490464627, 329456512868359962875761871381429648792, 214132526311861388081693372283346711315, 212807863125887894065170197859985748755, 90639505994802779364701320439314232445, 109312881611100283088661575235655027037, 268695571549372555579983860480753996530, 276556254823007156956265006607247855228, 158532724662396204460585683955318721251, 190236918274156159301867868769173894064, 115505281197039501762156314342977388146, 181151739907962908273686170106830254275, 103040304820632656358846714092274654455, 283839353929015376840553872262568182165, 126305356110326106528653817459839286387, 232772214119775911616044955505922667440, 267224571901232164108563912343781345315, 248870611769713486967773923305072182805, 94401261442397178213607895041941511616, 126697942675733486251713755064939650169, 52680527483000227468312744969526057584, 100468409853345213529992161170862574067, 195546595259106600444307572967932415185, 121396668310321681197001161772784753777, 102772203717048361679815565428970429489, 118636962645139146202043096156604144755, 130735009156835Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
function_list = [['_CorExeMain'], ['GetProcessHeap', 'RtlUnwind', 'RaiseException', 'HeapSize', 'TerminateProcess', 'UnhandledExceptionFilter', 'SetUnhandledExceptionFilter', 'IsDebuggerPresent', 'HeapDestroy', 'HeapCreate', 'VirtualFree', 'Sleep', 'GetStdHandle', 'GetTimeZoneInformation', 'GetACP', 'SetHandleCount', 'GetFileType', 'GetStartupInfoA', 'GetCommandLineA', 'GetEnvironmentStrings', 'FreeEnvironmentStringsW', 'GetEnvironmentStringsW', 'QueryPerformanceCounter', 'GetSystemTimeAsFileTime', 'LCMapStringA', 'LCMapStringW', 'GetConsoleCP', 'GetConsoleMode', 'GetStringTypeA', 'GetStringTypeW', 'SetStdHandle', 'WriteConsoleA', 'GetConsoleOutputCP', 'WriteConsoleW', 'GetDateFormatA', 'GetTimeFormatA', 'GetDriveTypeA', 'SetEnvironmentVariableA', 'HeapReAlloc', 'VirtualAlloc', 'SetCurrentDirectoryA', 'HeapAlloc', 'HeapFree', 'GetTickCount', 'GetCurrentDirectoryA', 'LocalFileTimeToFileTime', 'CreateFileA', 'GetShortPathNameA', 'GetVolumeInformationA', 'GetCurrentProcess', 'DuplicateHandle', 'GetFileSize', 'SetEndOfFile', 'UnlockFile', 'LockFile', 'FlushFileBuffers', 'SetFilePointer', 'WriteFile', 'ReadFile', 'DeleteFileA', 'MoveFileA', 'GetOEMCP', 'GetCPInfo', 'InterlockedIncrement', 'SystemTimeToFileTime', 'GetThreadLocale', 'GlobalFlags', 'TlsFree', 'DeleteCriticalSection', 'LocalReAlloc', 'TlsSetValue', 'TlsAlloc', 'InitializeCriticalSection', 'GlobalHandle', 'GlobalReAlloc', 'EnterCriticalSection', 'TlsGetValue', 'LeaveCriticalSection', 'LocalAlloc', 'CloseHandle', 'GetPrivateProfileStringA', 'WritePrivateProfileStringA', 'GetPrivateProfileIntA', 'GetCurrentProcessId', 'GetCurrentThread', 'ConvertDefaultLocale', 'GetModuleFileNameA', 'EnumResourceLanguagesA', 'GetLocaleInfoA', 'lstrcmpA', 'GetDiskFreeSpaceA', 'GetFullPathNameA', 'GetTempFileNameA', 'GetFileTime', 'SetFileTime', 'GetFileAttributesA', 'FreeResource', 'GetCurrentThreadId', 'GlobalGetAtomNameA', 'GlobalAddAtomA', 'GlobalFindAtomA', 'GlobalDeleteAtom', 'lstrcmpW', 'GetVersionExA', 'GlobalFree', 'GlobalAlloc', 'FormatMessageA', 'LocalFree', 'GlobalLock', 'GlobalUnlock', 'MulDiv', 'FindFirstFileA', 'FileTimeToLocalFileTime', 'FileTimeToSystemTime', 'FindNextFileA', 'FindClose', 'FreeLibrary', 'InterlockedDecrement', 'LockResource', 'SizeofResource', 'LoadResource', 'FindResourceA', 'ExitProcess', 'GetVersion', 'CompareStringA', 'GetModuleHandleA', 'LoadLibraryA', 'GetProcAddress', 'lstrcmpiA', 'SetLastError', 'GetLastError', 'InterlockedExchange', 'GetStringTypeExA', 'MultiByteToWideChar', 'CompareStringW', 'WideCharToMultiByte', 'lstrlenA', 'FreeEnvironmentStringsA', 'GetComputerNameA', 'CopyAcceleratorTableA', 'CreateMenu', 'PostThreadMessageA', 'GetTabbedTextExtentA', 'RegisterClipboardFormatA', 'GetSysColorBrush', 'UnregisterClassA', 'LoadCursorA', 'DestroyCursor', 'SetCursorPos', 'SetCapture', 'RedrawWindow', 'InflateRect', 'UnpackDDElParam', 'ReuseDDElParam', 'LoadMenuA', 'DestroyMenu', 'ReleaseCapture', 'LoadAcceleratorsA', 'InsertMenuItemA', 'CreatePopupMenu', 'BringWindowToTop', 'SetMenu', 'TranslateAcceleratorA', 'IsZoomed', 'WindowFromPoint', 'KillTimer', 'SetTimer', 'SetRect', 'SetParent', 'GetSystemMenu', 'DeleteMenu', 'SetRectEmpty', 'IsRectEmpty', 'GetDesktopWindow', 'CreateDialogIndirectParamA', 'GetNextDlgTabItem', 'EndDialog', 'GetMessageA', 'TranslateMessage', 'GetActiveWindow', 'GetCursorPos', 'ValidateRect', 'GetWindowThreadProcessId', 'ShowOwnedPopups', 'SetCursor', 'PostQuitMessage', 'IsWindowEnabled', 'SetWindowTextA', 'IsDialogMessageA', 'SetDlgItemTextA', 'RegisterWindowMessageA', 'LoadIconA', 'SendDlgItemMessageA', 'WinHelpA', 'GetCapture', 'SetWindowsHookExA', 'CallNextHookEx', 'GetClassNameA', 'SetPropA', 'GetPropA', 'RemovePropA', 'SetFocus', 'GetWindowTextLengthA', 'GetWindowTextA', 'GetLastActivePopup', 'SetActiveWindow', 'DispatchMessageA', 'BeginDeferWindowPos', 'EndDeferWindowPos', 'GetDlgItem', 'GetTopWindow', 'DestroyWindow', 'GetMessageTime', 'GetMessagePos', 'PeekMessageA', 'MapWindowPoints', 'ScrollWindow', 'TrackPopupMenu', 'GetKeyState', 'SetScrollRange', 'GetScrollRange', 'SetScrollPos', 'GetScrollPos', 'SetForegroundWindow', 'ShowScrollBar', 'IsWindowVisible', 'GetMenu', 'PostMessageA', 'MessageBoxA', 'CreateWindowExA', 'GetClassInfoExA', 'GetClassInfoA', 'RegisterClassA', 'EqualRect', 'DeferWindowPos', 'GetScrollInfo', 'SetScrollInfo', 'PtInRect', 'DefWindowProcA', 'CallWindowProcA', 'SetWindowPos', 'OffsetRect', 'IntersectRect', 'SystemParametersInfoA', 'GetWindowPlacement', 'GetWindowRect', 'GetSystemMetrics', 'GetWindow', 'GetMenuStringA', 'AppendMenuA', 'GetMenuItemID', 'InsertMenuA', 'GetMenuItemCount', 'GetSubMenu', 'RemoveMenu', 'GetSysColor', 'EndPaint', 'BeginPaint', 'GetWindowDC', 'ClientToScreen', 'ScreenToClient', 'GrayStringA', 'DrawTextExA', 'DrawTextA', 'TabbedTextOutA', 'FillRect', 'SetWindowRgn', 'DrawIcon', 'FindWindowA', 'LockWindowUpdate', 'GetDCEx', 'DestroyIcon', 'GetClassLongA', 'GetMenuItemInfoA', 'GetDlgCtrlID', 'IsChild', 'InvalidateRect', 'IsIconic', 'AdjustWindowRectEx',Line truncated
|
||||
+9936
File diff suppressed because it is too large.
Load diff
-4109
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1,11 @@
|
||||
import pyinstaller_versionfile
|
||||
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='2.7.3',
|
||||
version='3.0.8',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
legal_copyright="© PYAS Security",
|
||||
legal_copyright="PYAS Security",
|
||||
original_filename="PYAS.exe",
|
||||
product_name="PYAS")
|
||||
@@ -1,20 +1,176 @@
|
||||
# PYAS (Python Antivirus Software)
|
||||

|
||||
|
||||

|
||||
|
||||
## Readme Language
|
||||
|
||||
[繁體中文](https://github.com/zackzheng1121/PYAS/blob/main/README_zh.md)
|
||||
|
||||
## File Information
|
||||
|
||||
PYAS.py -> Main PYAS Program (including animation, scanning, protection functions, etc.)
|
||||
|
||||
PYAS_Engine.py -> Conversion Database (used to convert database dict and list to and from each other)
|
||||
|
||||
PYAS_Extension.py -> File Extension (including scanned file extensions and common file extensions)
|
||||
|
||||
PYAS_Model.* -> Virus Database (the virus database must be placed in the same directory)
|
||||
|
||||
PYAS_Interface.py -> PyQt5 Interface (designed by QT designer, must be matched with the main program)
|
||||
|
||||
PYAS_Resource.py -> PyQt5 Resource (status pictures, icon packages, button icons, etc.)
|
||||
|
||||
PYAS_Language.py -> Translate Dict (Traditional Chinese, Simplified Chinese, English)
|
||||
|
||||
PYAS_Version.py -> Pyinstaller Info (file information, version information, original name, etc.)
|
||||
|
||||
## Requirements
|
||||
|
||||
Use pip install requirements to install import module
|
||||
|
||||
```
|
||||
psutil==5.9.5
|
||||
pefile==2023.2.7
|
||||
requests==2.31.0
|
||||
pyperclip==1.8.2
|
||||
pywin32==306
|
||||
PyQt5==5.15.9
|
||||
```
|
||||
|
||||
## Hash Scanning
|
||||
|
||||
Use Qihoo 360 cloud service to scan known malicious files
|
||||
|
||||
```
|
||||
import hashlib, requests
|
||||
import xml.etree.ElementTree as xmlet
|
||||
|
||||
def hash_scan(file):
|
||||
try:
|
||||
with open(file, "rb") as f:
|
||||
text = str(hashlib.md5(f.read()).hexdigest())
|
||||
strBody = f'-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="md5s"\r\n\r\n{text}\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="format"\r\n\r\nXML\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="product"\r\n\r\n360zip\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="combo"\r\n\r\n360zip_main\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="v"\r\n\r\n2\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="osver"\r\n\r\n5.1\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="vk"\r\n\r\na03bc211\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="mid"\r\n\r\n8a40d9eff408a78fe9ec10a0e7e60f62\r\n-------------------------------7d83e2d7a141e--'
|
||||
response = requests.post('http://qup.f.360.cn/file_health_info.php', data=strBody, timeout=3)
|
||||
if response.status_code == 200:
|
||||
level = float(xmlet.fromstring(response.text).find('.//e_level').text)
|
||||
if level > 50:
|
||||
return "Virus"
|
||||
elif level <= 10:
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
return f"Error: {response.status_code}"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = hash_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## Pefile Scanning
|
||||
|
||||
Get the pefile file function import table for scanning
|
||||
|
||||
```
|
||||
import pefile
|
||||
|
||||
def pe_scan(file):
|
||||
try:
|
||||
fn = []
|
||||
with pefile.PE(file) as pe:
|
||||
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
||||
for func in entry.imports:
|
||||
try:
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
if fn in known_malicious_list:
|
||||
return "Virus"
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = pe_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## Process Detect
|
||||
|
||||
Show the new process name, file path, cmd line, pid
|
||||
|
||||
```
|
||||
import psutil, time
|
||||
|
||||
def proc_detect():
|
||||
existing_processes = set()
|
||||
for p in psutil.process_iter():
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
for p in psutil.process_iter():
|
||||
try:
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
name, file, cmd = p.name(), p.exe(), p.cmdline()
|
||||
print(f"Name: {name}")
|
||||
print(f"File: {file}")
|
||||
print(f"Pid: {p.pid}")
|
||||
print(f"Cmd: {cmd}")
|
||||
elif not psutil.pid_exists(p.pid):
|
||||
existing_processes.remove(p.pid)
|
||||
except:
|
||||
pass
|
||||
|
||||
proc_detect()
|
||||
```
|
||||
|
||||
## File Detect
|
||||
|
||||
Monitor file changes under the specified path
|
||||
|
||||
```
|
||||
import os, win32file, win32con
|
||||
|
||||
def file_detect(path):
|
||||
hDir = win32file.CreateFile(path,win32con.GENERIC_READ,win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE|win32con.FILE_SHARE_DELETE,None,win32con.OPEN_EXISTING,win32con.FILE_FLAG_BACKUP_SEMANTICS,None)
|
||||
while True:
|
||||
for action, file in win32file.ReadDirectoryChangesW(hDir,10485760,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
|
||||
try:
|
||||
fpath = os.path.join(path, file)
|
||||
if action == 1:
|
||||
print(f"File Create: {fpath}")
|
||||
elif action == 2:
|
||||
print(f"File Delete: {fpath}")
|
||||
elif action == 3:
|
||||
print(f"File Modify: {fpath}")
|
||||
elif action == 4:
|
||||
print(f"File Rename: {fpath}")
|
||||
elif action == 5:
|
||||
print(f"File Rename: {fpath}")
|
||||
except:
|
||||
pass
|
||||
|
||||
file_detect("path")
|
||||
```
|
||||
|
||||
## Official Website
|
||||
https://pyantivirus.wixsite.com/pyas ,
|
||||
|
||||
https://pyantivirus.wixsite.com/pyas
|
||||
|
||||
https://github.com/87owo/PYAS
|
||||
|
||||
## MIT License
|
||||
## MIT license
|
||||
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
|
||||
## Support System
|
||||
|
||||
Windows 8.1, 10, 11 (64-bit), Ram 1GB, Rom 1GB or higher
|
||||
|
||||
## Import Module
|
||||
os, sys, time, json, psutil, ctypes, requests, subprocess, win32file, win32api, win32con, elementpath, hashlib, pefile, threading, PyQt5, PYAS_Language, PYAS_Model, PYAS_UI
|
||||
Other systems may experience software malfunctions or crash
|
||||
|
||||
## Special Thanks
|
||||
360, Wix, VirusShare, mtkiao129, LenStevens
|
||||
360, Wix, VirusShare, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2023 PYAS Security By 87owo
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
# PYAS (Python 防毒軟體)
|
||||
|
||||

|
||||
|
||||
## 文件訊息
|
||||
|
||||
PYAS.py -> PYAS主程式(包括動畫、掃描、保護功能等)
|
||||
|
||||
PYAS_Engine.py -> 轉換資料庫(用於相互轉換資料庫字典和清單)
|
||||
|
||||
PYAS_Extension.py -> 檔案副檔名(包括掃描檔案副檔名和常用檔案副檔名)
|
||||
|
||||
PYAS_Model.* -> 病毒庫(病毒庫必須放在同一目錄下)
|
||||
|
||||
PYAS_Interface.py -> PyQt5 Interface(由QT設計師設計,必須與主程式相符)
|
||||
|
||||
PYAS_Resource.py -> PyQt5資源(狀態圖片、圖示包、按鈕圖示等)
|
||||
|
||||
PYAS_Language.py -> 翻譯字典(繁體中文、簡體中文、英文)
|
||||
|
||||
PYAS_Version.py -> Pyinstaller Info(檔案資訊、版本資訊、原名等)
|
||||
|
||||
## 要求
|
||||
|
||||
使用 pip install requirements 來安裝需要的模組
|
||||
|
||||
```
|
||||
psutil==5.9.5
|
||||
pefile==2023.2.7
|
||||
requests==2.31.0
|
||||
pyperclip==1.8.2
|
||||
pywin32==306
|
||||
PyQt5==5.15.9
|
||||
```
|
||||
|
||||
## 哈希掃描
|
||||
|
||||
使用奇虎360雲端服務掃描已知惡意文件
|
||||
|
||||
```
|
||||
import hashlib, requests
|
||||
import xml.etree.ElementTree as xmlet
|
||||
|
||||
def hash_scan(file):
|
||||
try:
|
||||
with open(file, "rb") as f:
|
||||
text = str(hashlib.md5(f.read()).hexdigest())
|
||||
strBody = f'-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="md5s"\r\n\r\n{text}\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="format"\r\n\r\nXML\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="product"\r\n\r\n360zip\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="combo"\r\n\r\n360zip_main\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="v"\r\n\r\n2\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="osver"\r\n\r\n5.1\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="vk"\r\n\r\na03bc211\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="mid"\r\n\r\n8a40d9eff408a78fe9ec10a0e7e60f62\r\n-------------------------------7d83e2d7a141e--'
|
||||
response = requests.post('http://qup.f.360.cn/file_health_info.php', data=strBody, timeout=3)
|
||||
if response.status_code == 200:
|
||||
level = float(xmlet.fromstring(response.text).find('.//e_level').text)
|
||||
if level > 50:
|
||||
return "Virus"
|
||||
elif level <= 10:
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
return f"Error: {response.status_code}"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = hash_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## 文件掃描
|
||||
|
||||
取得pefile檔案函數導入表進行掃描
|
||||
|
||||
```
|
||||
import pefile
|
||||
|
||||
def pe_scan(file):
|
||||
try:
|
||||
fn = []
|
||||
with pefile.PE(file) as pe:
|
||||
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
||||
for func in entry.imports:
|
||||
try:
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
if fn in known_malicious_list:
|
||||
return "Virus"
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = pe_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## 進程偵測
|
||||
|
||||
顯示新進程名稱、檔案路徑、cmd 行、pid
|
||||
```
|
||||
import psutil, time
|
||||
|
||||
def proc_detect():
|
||||
existing_processes = set()
|
||||
for p in psutil.process_iter():
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
for p in psutil.process_iter():
|
||||
try:
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
name, file, cmd = p.name(), p.exe(), p.cmdline()
|
||||
print(f"Name: {name}")
|
||||
print(f"File: {file}")
|
||||
print(f"Pid: {p.pid}")
|
||||
print(f"Cmd: {cmd}")
|
||||
except:
|
||||
pass
|
||||
|
||||
proc_detect()
|
||||
```
|
||||
|
||||
## 檔案偵測
|
||||
|
||||
監控指定路徑下的檔案變化
|
||||
```
|
||||
import os, win32file, win32con
|
||||
|
||||
def file_detect(path):
|
||||
hDir = win32file.CreateFile(path,win32con.GENERIC_READ,win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE|win32con.FILE_SHARE_DELETE,None,win32con.OPEN_EXISTING,win32con.FILE_FLAG_BACKUP_SEMANTICS,None)
|
||||
while True:
|
||||
for action, file in win32file.ReadDirectoryChangesW(hDir,10485760,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
|
||||
try:
|
||||
fpath = os.path.join(path, file)
|
||||
if action == 1:
|
||||
print(f"File Create: {fpath}")
|
||||
elif action == 2:
|
||||
print(f"File Delete: {fpath}")
|
||||
elif action == 3:
|
||||
print(f"File Modify: {fpath}")
|
||||
elif action == 4:
|
||||
print(f"File Rename: {fpath}")
|
||||
elif action == 5:
|
||||
print(f"File Rename: {fpath}")
|
||||
except:
|
||||
pass
|
||||
|
||||
file_detect("path")
|
||||
```
|
||||
|
||||
## 官方網頁
|
||||
|
||||
https://pyantivirus.wixsite.com/pyas
|
||||
|
||||
https://github.com/87owo/PYAS
|
||||
|
||||
## 開源許可證
|
||||
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
|
||||
## 支援的系統
|
||||
|
||||
Windows 8.1, 10, 11 (64-bit),記憶體 1GB, 磁碟容量 1GB 或更高
|
||||
Other systems may experience software malfunctions or crash
|
||||
|
||||
## Special Thanks
|
||||
360, Wix, VirusShare, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Reference in new issue
Block a user