{"id":359328,"date":"2024-05-21T00:30:27","date_gmt":"2024-05-21T00:30:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359328"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359328","title":{"rendered":"<span>\u0420\u0435\u0432\u0435\u0440\u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 cocos2dx<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<ul>\n<li>\n<p>\u041a\u0430\u043a \u043d\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e &#8212; \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f apk \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0444\u0442\u0430. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0438\u0442\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e vs-code<\/p>\n<\/li>\n<li>\n<p>\u041b\u044e\u0431\u043e\u0439 16-\u0440\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f vs code<\/p>\n<\/li>\n<\/ul>\n<h2>Let`s start!<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u043c\u0435\u0435\u043c<\/p>\n<p>APK \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 zip \u0430\u0440\u0445\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u043e\u043c. \u0420\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u043a\u0443\u044e \u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u043f\u043a\u0443<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0f3\/624\/fe6\/0f3624fe62ead6461fb14a06433d48b7.png\" alt=\"\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438\" title=\"\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438\" width=\"643\" height=\"355\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f3\/624\/fe6\/0f3624fe62ead6461fb14a06433d48b7.png\"\/><\/p>\n<div><figcaption>\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0411\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0432 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 lua<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e9f\/93a\/8b5\/e9f93a8b52d213e7673a6d3f47deac4f.png\" alt=\"\u0424\u0430\u0439\u043b\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" title=\"\u0424\u0430\u0439\u043b\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" width=\"714\" height=\"431\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9f\/93a\/8b5\/e9f93a8b52d213e7673a6d3f47deac4f.png\"\/><\/p>\n<div><figcaption>\u0424\u0430\u0439\u043b\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f &#8212; \u043e\u043d\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u044b. \u041d\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u044a\u0435\u0434\u0435\u043d\u044f\u0435\u0442 \u043e\u0434\u043d\u043e &#8212; \u0441\u043b\u043e\u0432\u043e signatr \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043e\u0442\u043b\u043e\u0436\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fc5\/f31\/5de\/fc5f315de6e66c4b27f37a38dda6c60e.png\" width=\"749\" height=\"230\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc5\/f31\/5de\/fc5f315de6e66c4b27f37a38dda6c60e.png\"\/><\/figure>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 lib \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 &#8212; \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 .so \u0444\u0430\u0439\u043b <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b69\/aa1\/ed0\/b69aa1ed018fa5d07c608b4b5714aa56.png\" alt=\"\u043f\u0430\u043f\u043a\u0430 lib\" title=\"\u043f\u0430\u043f\u043a\u0430 lib\" width=\"711\" height=\"165\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b69\/aa1\/ed0\/b69aa1ed018fa5d07c608b4b5714aa56.png\"\/><\/p>\n<div><figcaption>\u043f\u0430\u043f\u043a\u0430 lib<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 hex-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/67b\/7d9\/3c0\/67b7d93c07ca499aecccb53798a6a625.png\" width=\"1224\" height=\"639\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/67b\/7d9\/3c0\/67b7d93c07ca499aecccb53798a6a625.png\"\/><\/figure>\n<p>\u041c\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0438\u0441\u0442\u0430\u0442\u044c \u043d\u0438\u0436\u0435 &#8212; \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438!<\/p>\n<p>\u0412\u0432\u0435\u0434\u0435\u043c \u0432 \u043f\u043e\u0438\u0441\u043a \u0441\u043b\u043e\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 &#8212; signatr<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/943\/1ca\/34e\/9431ca34ead14b8766d921ca65edc041.png\" width=\"1108\" height=\"359\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/943\/1ca\/34e\/9431ca34ead14b8766d921ca65edc041.png\"\/><\/figure>\n<p>\u0421\u043b\u0435\u0432\u0430 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e. \u0427\u0442\u043e\u0436, \u044d\u0442\u043e \u0441\u043b\u043e\u0432\u043e &#8212; \u044d\u0442\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435 \u0434\u043b\u044f \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c xxtea<\/p>\n<pre><code class=\"python\">import xxtea # pip install xxtea file = 'client.luac' sign = 'signatr' key = 'anyxteakey' with open(file, 'rb') as f:     filedata = f.read()      filedata = filedata[len(sign):] # \u043e\u0431\u0440\u0435\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430 \u0447\u0442\u043e\u0431 \u0443\u0431\u0440\u0430\u0442\u044c 'signatr'  data = xxtea.decrypt(filedata, key) # \u0414\u0435\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u043e\u043c  with open('test.lua', 'wb') as f:     f.write(data)          <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b test.lua<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f62\/a5d\/3bd\/f62a5d3bd9a4aa415eb8111b113c1f33.png\" width=\"571\" height=\"163\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/a5d\/3bd\/f62a5d3bd9a4aa415eb8111b113c1f33.png\"\/><\/figure>\n<p>\u0412\u0441\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e! \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b<br \/>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0430\u043f\u043a\u0430\u0445<\/p>\n<pre><code class=\"python\">import os import xxtea  sign = 'signatr' key = 'anyxteakey'  def recursive_decrypt(directory):     files = os.listdir(directory)     for f in files:         if os.path.isdir(directory + \"\/\" + f):             recursive_decrypt(directory + \"\/\" + f)         else:             if f.endswith(\".luac\"):                 print(\"Decrypting\", f)                 data = b\"\"                 with open(directory + \"\/\" + f, \"rb\") as file:                     data = file.read()[len(sign):]                 decrypted = xxtea.decrypt(data, key)                 if decrypted:                     with open(directory + \"\/\" + f[:-1], \"wb\") as file:                         file.write(decrypted)                         os.remove(directory + \"\/\" + f)                 else:                     print(\"Failed to decrypt\", f) <\/code><\/pre>\n<p>\u041e\u0442 \u0441\u0435\u0431\u044f \u044f \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u0447\u0442\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043d\u0435 lua \u0444\u0430\u0439\u043b\u044b<\/p>\n<pre><code class=\"python\">import shutil def post_clean(directory):     # delete all not lua files     ls = os.listdir(directory)     if not ls:         shutil.rmtree(directory)         print(\"Removed\", directory)         return         for file in os.listdir(directory):         if os.path.isdir(directory + \"\/\" + file):             post_clean(directory + \"\/\" + file)         elif not file.endswith(\".lua\"):             os.remove(os.path.join(directory, file))             print(\"Removed\", file)     if not os.listdir(directory):         shutil.rmtree(directory)         print(\"Removed\", directory)<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. <br \/>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/771922\/\"> https:\/\/habr.com\/ru\/articles\/771922\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<ul>\n<li>\n<p>\u041a\u0430\u043a \u043d\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e &#8212; \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f apk \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0444\u0442\u0430. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0438\u0442\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e vs-code<\/p>\n<\/li>\n<li>\n<p>\u041b\u044e\u0431\u043e\u0439 16-\u0440\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f vs code<\/p>\n<\/li>\n<\/ul>\n<h2>Let`s start!<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u043c\u0435\u0435\u043c<\/p>\n<p>APK \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 zip \u0430\u0440\u0445\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u043e\u043c. \u0420\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u043a\u0443\u044e \u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u043f\u043a\u0443<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0411\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0432 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 lua<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0424\u0430\u0439\u043b\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f &#8212; \u043e\u043d\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u044b. \u041d\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u044a\u0435\u0434\u0435\u043d\u044f\u0435\u0442 \u043e\u0434\u043d\u043e &#8212; \u0441\u043b\u043e\u0432\u043e signatr \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043e\u0442\u043b\u043e\u0436\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 lib \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 &#8212; \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 .so \u0444\u0430\u0439\u043b <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u043f\u0430\u043f\u043a\u0430 lib<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 hex-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0438\u0441\u0442\u0430\u0442\u044c \u043d\u0438\u0436\u0435 &#8212; \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438!<\/p>\n<p>\u0412\u0432\u0435\u0434\u0435\u043c \u0432 \u043f\u043e\u0438\u0441\u043a \u0441\u043b\u043e\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 &#8212; signatr<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043b\u0435\u0432\u0430 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e. \u0427\u0442\u043e\u0436, \u044d\u0442\u043e \u0441\u043b\u043e\u0432\u043e &#8212; \u044d\u0442\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435 \u0434\u043b\u044f \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c xxtea<\/p>\n<pre><code class=\"python\">import xxtea # pip install xxtea file = 'client.luac' sign = 'signatr' key = 'anyxteakey' with open(file, 'rb') as f:     filedata = f.read()      filedata = filedata[len(sign):] # \u043e\u0431\u0440\u0435\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430 \u0447\u0442\u043e\u0431 \u0443\u0431\u0440\u0430\u0442\u044c 'signatr'  data = xxtea.decrypt(filedata, key) # \u0414\u0435\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u043e\u043c  with open('test.lua', 'wb') as f:     f.write(data)          <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b test.lua<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e! \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b<br \/>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0430\u043f\u043a\u0430\u0445<\/p>\n<pre><code class=\"python\">import os import xxtea  sign = 'signatr' key = 'anyxteakey'  def recursive_decrypt(directory):     files = os.listdir(directory)     for f in files:         if os.path.isdir(directory + \"\/\" + f):             recursive_decrypt(directory + \"\/\" + f)         else:             if f.endswith(\".luac\"):                 print(\"Decrypting\", f)                 data = b\"\"                 with open(directory + \"\/\" + f, \"rb\") as file:                     data = file.read()[len(sign):]                 decrypted = xxtea.decrypt(data, key)                 if decrypted:                     with open(directory + \"\/\" + f[:-1], \"wb\") as file:                         file.write(decrypted)                         os.remove(directory + \"\/\" + f)                 else:                     print(\"Failed to decrypt\", f) <\/code><\/pre>\n<p>\u041e\u0442 \u0441\u0435\u0431\u044f \u044f \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u0447\u0442\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043d\u0435 lua \u0444\u0430\u0439\u043b\u044b<\/p>\n<pre><code class=\"python\">import shutil def post_clean(directory):     # delete all not lua files     ls = os.listdir(directory)     if not ls:         shutil.rmtree(directory)         print(\"Removed\", directory)         return         for file in os.listdir(directory):         if os.path.isdir(directory + \"\/\" + file):             post_clean(directory + \"\/\" + file)         elif not file.endswith(\".lua\"):             os.remove(os.path.join(directory, file))             print(\"Removed\", file)     if not os.listdir(directory):         shutil.rmtree(directory)         print(\"Removed\", directory)<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. <br \/>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/771922\/\"> https:\/\/habr.com\/ru\/articles\/771922\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-359328","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=359328"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359328\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}