Advertisement
Guest User

For IR's Eyes

a guest
Jan 21st, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.21 KB | None | 0 0
  1. The source was AIR Edited in places, as I hard coded DialogEX closes and other things so I edited it, it should work but if it don't just reply and we sort it.
  2. also feel free to comment bugs on GitHub.
  3.  
  4. GitHub (Here)
  5.  
  6. In case Github is down or deleted.
  7. [CODE]
  8. --[[
  9.  
  10. This file is created for AutoPlay Media Studio 8.x and will not work in native Lua unless you convert the AMS native functions
  11. to lua, most functions should be in Lua so should be able to be converted.
  12.  
  13.  
  14. Created By Rexzooly Kai Black, Idea from 2006 created on 9th Jan 2017
  15. ]]--
  16.  
  17. NoKey = {
  18. MinVersion = "",
  19. Version = "",
  20. -- part of the mix up and ecoding, add more, the demo I how off has over 20
  21. -- www.youtube.com/watch?v=xK1E3NxiNlQ
  22. Mix = {
  23. {"WordBefore", "WordAfter"},
  24. },
  25. -- More Mixing up and encoding
  26. Replace = {
  27. {"A", "{01000001}"},{"a", "[01100001]"},
  28. {"B", "{01000010}"},{"b", "[01100010]"},
  29. {"C", "{01000011}"},{"c", "[01100011]"},
  30. {"D", "{01000100}"},{"d", "[01000100]"},
  31. {"E", "{01000101}"},{"e", "[01100101]"},
  32. {"F", "{01000110}"},{"f", "[01100110]"},
  33. {"G", "{01000111}"},{"g", "[01100111]"},
  34. {"H", "{01001000}"},{"h", "[01101000]"},
  35. {"I", "{01001001}"},{"i", "[01101001]"},
  36. {"J", "{01001010}"},{"j", "[01101010]"},
  37. --{"K", "{01001011}"},{"k", "[01101011]"},
  38. --{"L", "{01001100}"},{"l", "[01101100]"},
  39. --{"M", "{01001101}"},{"m", "[01101101]"},
  40. --{"N", "{01001110}"},{"n", "[01101110]"},
  41. {"O", "{01001111}"},{"o", "[01101111]"},
  42. --{"P", "{01010000}"},{"p", "[01110000]"},
  43. --{"Q", "{01010001}"},{"q", "[01110001]"},
  44. --{"R", "{01010010}"},{"r", "[01110010]"},
  45. {"S", "{01010011}"},{"s", "[01110011]"},
  46. --{"T", "{01010100}"},{"t", "[01110100]"},
  47. --{"U", "{01010101}"},{"u", "[01110101]"},
  48. --{"V", "{01010110}"},{"v", "[01110110]"},
  49. --{"W", "{01010111}"},{"w", "[01110111]"},
  50. --{"X", "{01011000}"},{"x", "[01011000]"},
  51. --{"Y", "{01011001}"},{"y", "[01111001]"},
  52. --{"Z", "{01011010}"},{"z", "[01111010]"},
  53. {" ", "{00100000}"},{".", "{00101110}"},
  54. {",", "{00101100}"},{"'", "{00100111}"},
  55. {"\\", "{00000}"},{"/", "{00101111}"},
  56. {"#", "{00100011}"}, {"@", "{01000000}"},
  57. {"-", "{00101101}"},{"=", "{00111101}"},
  58. {"!", "{00100001}"},{"?", "{00111111}"},
  59. {"\"", "{00100010}"},{"£", "{11000010 10100011}"},
  60. {"$", "{00100100}"},{"%", "{00100101}"},
  61. {"*", "{00101010}"}
  62. }
  63. }
  64.  
  65. -- hide a word in the app becore packing
  66. function NoKey.Bow(_strString, _bBlock)
  67. if type(_strString) == nil then
  68. return false, 'Nothing given'
  69. end
  70. if _bBlock then
  71. bowthis = string.gsub(_strString, "enc::(.-)::", function(a) return "<span class=\"block\" style=\"display:none;\">"..Crypto.Rot13(enc(a)).."</span>" end);
  72. else
  73. bowthis = string.gsub(_strString, "enc::(.-)::", function(a) return "dec::"..Crypto.Rot13(enc(a)).."::" end);
  74. end
  75. NewString = bowthis;
  76. return NewString;
  77. end
  78.  
  79. -- unhide a word
  80. function NoKey.DeBow(_strString, _bBlock)
  81. if type(_strString) == nil then
  82. return false, 'Nothing given'
  83. end
  84. if _bBlock then
  85. bowthis = string.gsub(_strString, "<span class=\"block\" style=\"display:none;\">(.-)</span>", function(a) return "enc::"..dec(Crypto.Rot13(a)).."::" end);
  86. else
  87. bowthis = string.gsub(_strString, "dec::(.-)::", function(a) return "enc::"..dec(Crypto.Rot13(a)).."::" end);
  88. end
  89. NewString = bowthis;
  90. return NewString;
  91. end
  92.  
  93. --First part of the encoding
  94. function NoKey.AlphaChannel(_strString)
  95. if type(_strString) == nil then
  96. return false, 'Nothing given'
  97. end
  98. if type(NoKey.Mix) == nil then
  99. return false, 'No replacements found'
  100. end
  101. for x = 1, Table.Count(NoKey.Mix) do
  102. _strString = String.Replace(_strString, NoKey.Mix[x][1], enc(NoKey.Mix[x][2]), true);
  103. end
  104. for x = 1, Table.Count(NoKey.Replace) do
  105. _strString = String.Replace(_strString, NoKey.Replace[x][1], NoKey.Replace[x][2], true);
  106. end
  107. for x = 1, Table.Count(NoKey.Replace) do
  108. _strString = String.Replace(_strString, NoKey.Replace[x][2], enc(NoKey.Replace[x][2]), true);
  109. end
  110. return string.reverse(enc(string.reverse(_strString)))
  111. end
  112.  
  113. --Last part of the decoding
  114. function NoKey.BetaChannel(_strString)
  115. _strString = string.reverse(dec(string.reverse(_strString)))
  116. if type(_strString) == nil then
  117. return false, 'Nothing given'
  118. end
  119. if type(NoKey.Mix) == nil then
  120. return false, 'No replacements found'
  121. end
  122. for x = 1, Table.Count(NoKey.Replace) do
  123. _strString = String.Replace(_strString, enc(NoKey.Replace[x][2]), NoKey.Replace[x][2], true);
  124. end
  125. for x = 1, Table.Count(NoKey.Replace) do
  126. _strString = String.Replace(_strString, NoKey.Replace[x][2], NoKey.Replace[x][1], true);
  127. end
  128. for x = 1, Table.Count(NoKey.Mix) do
  129. _strString = String.Replace(_strString, enc(NoKey.Mix[x][2]), NoKey.Mix[x][1], true);
  130. end
  131. return _strString
  132. end
  133.  
  134. function NoKey.Lock(Dep, strKey)
  135. if strKey == "" then
  136. strKey = nil;
  137. end
  138. if Dep ~= "" and Dep ~= nil then
  139. The_Next = Dep;
  140. if strKey == nil then
  141. The_Auth = enc("01001110011011110100110101101111011100100110010101001011011001010111100101100010011011110110000101110010011001000101000001100101011011110111000001101100011001010011001000110000001100010011011101000101011100000110100101100011010100000110100101100101");
  142. SkyLandOverRide = 'SNBLOCK';
  143. else
  144. The_Auth = strKey;
  145. SkyLandOverRide = 'PNBLOCK';
  146. end
  147. TextFile.WriteFromString(_TempFolder.."\\open.blob", The_Next, false);
  148.  
  149. -- Start CHANGE THIS TO YOUR AESCRYPT EXE ("Tools\\handle.exe" to PATH-TO-YOUR-AESCrypt-EXE)
  150. Running = File.Run("Tools\\handle.exe", "-e -p "..The_Auth.." open.blob", _TempFolder.."\\", SW_HIDE, true);
  151. -- End CHANGE
  152. File.Delete(_TempFolder.."\\open.blob", true, true, true);
  153. The_Start = Crypto.Base64EncodeToString(_TempFolder.."\\open.blob.aes", 70);
  154. Save_Me = SkyLandOverRide..The_Start;
  155. File.Delete(_TempFolder.."\\open.blob.aes", true, true, true);
  156. return enc(Save_Me);
  157. else
  158. return 'error';
  159. end
  160. end
  161. function NoKey.UnLock(Dep, strKey)
  162. if strKey == nil then
  163. -- NoMoreKeyboardPeople2017EpicPie
  164. The_Auth = enc("01001110011011110100110101101111011100100110010101001011011001010111100101100010011011110110000101110010011001000101000001100101011011110111000001101100011001010011001000110000001100010011011101000101011100000110100101100011010100000110100101100101");
  165. SkyLandOverRide = 'SNBLOCK';
  166. else
  167. The_Auth = enc(Crypto.Rot13(strKey));
  168. SkyLandOverRide = 'PNBLOCK';
  169. end
  170. if Dep ~= "" and Dep ~= nil then
  171. Dep = dec(Dep);
  172. else
  173. return 'error';
  174. end
  175. Dep = String.Replace(Dep, SkyLandOverRide, "", true);
  176. Crypto.Base64DecodeFromString(Dep, _TempFolder.."\\open.blade.aes");
  177. if not File.DoesExist(_TempFolder.."\\open.blade.aes") then
  178. --
  179. end
  180.  
  181. -- Start CHANGE THIS TO YOUR AESCRYPT EXE ("Tools\\handle.exe" to PATH-TO-YOUR-AESCrypt-EXE)
  182. Running = File.Run("Tools\\handle.exe", "-d -p "..The_Auth.." open.blade.aes", _TempFolder.."\\", SW_HIDE, true);
  183. -- End CHANGE
  184.  
  185. Application.Sleep(600); -- Not really needed, I used it to help UI and AMS to stay inline with each other two fast makes you think its broken
  186. if not File.DoesExist(_TempFolder.."\\open.blade") then
  187. --
  188. end
  189. The_Again = TextFile.ReadToString(_TempFolder.."\\open.blade");
  190. File.Delete(_TempFolder.."\\open.blade", true, true, true);
  191. File.Delete(_TempFolder.."\\open.blade.aes", true, true, true);
  192. return The_Again;
  193. end
  194. function NoKey.Pack(m_key, __SaveText, SaveMe, __Format)
  195. if m_key == "" then
  196. IDPASS = Dialog.Message("No key provided", "You have not set the key/password, do you want to use the software key?\r\n\r\nYes - Use Software Key (Not Recommended).\r\nNo - Set own key.\r\nCancel - Stop action.", MB_YESNOCANCEL, MB_ICONNONE, MB_DEFBUTTON1);
  197. if IDPASS == IDYES then
  198. __SaveText = NoKey.Lock(NoKey.AlphaChannel(NoKey.Bow(__SaveText)));
  199. end
  200. if IDPASS == IDNO then
  201. UserKey = Dialog.PasswordInput("Key Input", "Enter your key below", MB_ICONNONE);
  202. if UserKey ~= "CANCEL" then
  203. if UserKey ~= "" then
  204. __SaveText = NoKey.Lock(NoKey.AlphaChannel(NoKey.Bow(__SaveText)), UserKey);
  205. return true
  206. else
  207. return false, "We was unable to tape up your package, reason below:\r\n\r\nThe user(you) has canceled the action";
  208. end
  209. end
  210. end
  211. if IDPASS == IDCANCEL then
  212. return false, "We was unable to tape up your package, reason below:\r\n\r\nThe user(you) has canceled the action";
  213. end
  214. else
  215. __SaveText = NoKey.Lock(NoKey.AlphaChannel(NoKey.Bow(__SaveText)), m_key);
  216. end
  217. Application.Sleep(300);
  218. if __SaveText ~= "" then
  219. enksave = {
  220. "ENK "..NoKey.Version,
  221. enc(System.GetDate(DATE_FMT_EUROPE).."-"..System.GetTime(TIME_FMT_MIL)),
  222. __SaveText
  223. }
  224. Math.RandomSeed(Math.Random(1, 4000));
  225. RanNox = Math.Random(482, 882);
  226. TextFile.WriteFromTable(SaveMe, enksave, false);
  227. error = Application.GetLastError();
  228. if (error ~= 0) then
  229. return false, _tblErrorMessages[error];
  230. end
  231. return true, "";
  232. else
  233. return false, "We lost the curtains for packing";
  234. end
  235. end
  236. function NoKey.Unpack(m_key, __SaveText)
  237. if m_key == "" then
  238. IDPASS = Dialog.Message("No key provided", "You have not set the key/password, do you want to try the software key?\r\n\r\nYes - Use Software Key.\r\nNo - Use your own key.\r\nCancel - Stop action.", MB_YESNOCANCEL, MB_ICONNONE, MB_DEFBUTTON1);
  239. if IDPASS == IDYES then
  240. __SaveText = NoKey.DeBow(NoKey.BetaChannel(NoKey.UnLock(__SaveText)));
  241. __DoAction = true;
  242. return true, __SaveText;
  243. end
  244. if IDPASS == IDNO then
  245. UserKey = Dialog.PasswordInput("Key Input", "Enter your key below", MB_ICONNONE);
  246. if UserKey ~= "CANCEL" then
  247. if UserKey ~= "" then
  248. __SaveText = NoKey.DeBow(NoKey.BetaChannel(NoKey.UnLock(__SaveText, UserKey)));
  249. __DoAction = true;
  250. return true, "";
  251. else
  252. return false, "We was unable to tape up your package, reason below:\r\n\r\nThe user(you) has canceled the action";
  253. end
  254. end
  255. end
  256. if IDPASS == IDCANCEL then
  257. return false, "We was unable to tape up your package, reason below:\r\n\r\nThe user(you) has canceled the action";
  258. end
  259. end
  260. __SaveText = NoKey.DeBow(NoKey.BetaChannel(NoKey.UnLock(__SaveText, m_key)));
  261. __DoAction = true;
  262. return true, "";
  263. end
  264.  
  265. -- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <alexthkloss@web.de>
  266. -- licensed under the terms of the LGPL2
  267.  
  268. local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  269. function enc(data)
  270. return ((data:gsub('.', function(x)
  271. local r,b='',x:byte()
  272. for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
  273. return r;
  274. end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
  275. if (#x < 6) then return '' end
  276. local c=0
  277. for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
  278. return b:sub(c+1,c+1)
  279. end)..({ '', '==', '=' })[#data%3+1])
  280. end
  281. function dec(data)
  282. data = string.gsub(data, '[^'..b..'=]', '')
  283. return (data:gsub('.', function(x)
  284. if (x == '=') then return '' end
  285. local r,f='',(b:find(x)-1)
  286. for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
  287. return r;
  288. end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
  289. if (#x ~= 8) then return '' end
  290. local c=0
  291. for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end
  292. return string.char(c)
  293. end))
  294. end
  295. [/CODE]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement