fork download
  1. # -*-*-*-*-*-*-*-*-*-*- install emacs to edit this file (M-x shrink) -*-*-*-*-*-*-*-*-*-*-*-
  2. # ---------------------------------------------------------------------------------------------------------------------
  3. # Date: 30.02 Author: :)
  4. # File created by AGS Elite. nikolai.msk.ru/~agrokekstroi/
  5. #
  6. # (C) Author rights protected.
  7. # TheVillage (OOO), AGS Elite (Agrokekstroy JSC).
  8. # ---------------------------------------------------------------------------------------------------------------------
  9. #
  10. # V V ii PPPP
  11. # V V ii P P
  12. # V V ii PPPP
  13. # V V ii P
  14. # V ii P
  15. #
  16. # ViP - K U P O N C H I Q U E
  17. # for entrancing
  18. # the PRIVATE club
  19. # <<THE VILLAGE PRO MAX>>
  20. #
  21. # POZDRAVL'AEM VI PRIGLASHENY NA VE4NUU VECHERINKU
  22. # NADO LISH ZAPUSTIT ETOT KUPON V VASHEM RABOCHEM PK.
  23. #
  24. # 1. ECLI HE PA6OTAET, TO OT UMENU ADMINISTRATORA.
  25. #
  26. # 2. ECLI HE PA6OTAET POTOM TO}|{E, YCTAHOBUTE XZ.
  27. #
  28. # 3. ZATEM VVEDITE PAROLCHIK NA KYPOH4IK ....
  29. #
  30. # ---------------------------------------------------------------------------------------------------------------------
  31. module VILLAGE_SMART_KUPON
  32. import Base.*
  33. # 1 2 3 4 5 6 7 8 9 10 11
  34. topics = ["en", "ru", "de", "buffer", "bound", "code", "auto", "alone", "easy", "coder", "stream"]
  35. version = [0x6c, 0x7a, 0x6d, 0x61] |> String
  36. # ---------------------------------------------------------------------------------------------------------------------
  37. # DALEE SLEDUYET TEHNICHESKAYA INFORMATSI'YA ... Ne chitat'!
  38. # ---------------------------------------------------------------------------------------------------------------------
  39. const PT = Union{Base.CodeUnits, Array{UInt8}}
  40. const CT = Union{Char, UInt8}
  41. *(x::T) where T <: PT = x |> pointer
  42. topic(r...) = map(Base.Fix1(getindex, topics), r) |> join
  43. (s, x) = "$(s[begin:x])_$(s[(x + 1):end])"
  44. *(x::Type) = Ptr{x}
  45. (x::CT, y::CT) = convert(UInt128, x) ⊻ convert(UInt128, y) |> Char
  46.  
  47. const XZ = "liblzma.so.5"
  48. const CALL_1 = version * (((topic(11, 4, 5)12)6)0)
  49. const CALL_2 = version * (((topic(9, 4, 1, 6)4)11)0)
  50. const CALL_3 = (version * ((topic(7, 3, 10)4)0))
  51. const CALL_4 = (version * (topic(6)0))
  52. const CALL_5 = (version * (topic(1, 3)[(1:end - 1)])0)
  53. const ID = [0x00, 0x00, 0xff, 0x12, 0xd9, 0x41, 0x03, 0xc0, 0x39, 0x96, 0x01,
  54. 0x21, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x17, 0x01,
  55. 0xe0, 0x00, 0x95, 0x00, 0x31, 0x5d, 0x00, 0x16, 0xe8, 0x91, 0x89,
  56. 0x25, 0x22, 0x04, 0x5b, 0x75, 0xd2, 0xd1, 0xc6, 0xb1, 0x7a, 0x08,
  57. 0x9a, 0xed, 0x93, 0x65, 0xc0, 0xa1, 0xe2, 0x4f, 0xdf, 0xc0, 0x5b,
  58. 0x92, 0x48, 0xa1, 0x58, 0x85, 0xc2, 0x7a, 0xa4, 0x73, 0x43, 0xdd,
  59. 0x16, 0x12, 0x3a, 0x3b, 0xe1, 0x7f, 0x2d, 0xf7, 0x22, 0x4b, 0x00,
  60. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x49, 0x96, 0x01, 0x00,
  61. 0x00, 0x00, 0xac, 0x3a, 0xf8, 0x0d, 0xa8, 0x00, 0x0a, 0xfc, 0x02,
  62. 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x5a]
  63. const OK = 0
  64. const RUN = 0
  65. const END = 1
  66. println("""
  67. (C) Author rights protected.
  68. TheVillage (OOO), AGS Elite (Agrokekstroy JSC).
  69.  
  70. V V ii PPPP
  71. V V ii P P
  72. V V ii PPPP
  73. V V ii P
  74. V ii P
  75.  
  76. ViP - K U P O N C H I Q U E
  77. for entrancing
  78. the PRIVATE club
  79. <<THE VILLAGE PRO MAX>>
  80.  
  81. POZDRAVL'AEM VI PRIGLASHENY NA VE4NUU VECHERINKU
  82.  
  83. N ADO LISH ZAPUSTIT ETOT KUPON V VASHEM RABOCHEM PK.
  84.  
  85. 1. ECLI HE PA6OTAET, TO OT UMENU ADMINISTRATORA.
  86. 2. ECLI HE PA6OTAET POTOM TO}|{E, YCTAHOBUTE XZ.
  87. 3. ZATEM VVEDITE PAROLCHIK NA KYPOH4IK ....
  88.  
  89. """)
  90. inpb = *(begin print("INSIDE PAROLchik u [ENTER] > "); readline() end,
  91. ['0' for _ ∈ 1:100] |> String
  92. ) |> codeunits
  93. inpl = inpb |> length
  94. outb = Vector{UInt8}(
  95. undef,
  96. :(
  97. @ccall XZ.$CALL_1(inpl::Csize_t)::Csize_t
  98. ) |> eval
  99. )
  100. outl = Ref{Csize_t}(0)
  101. check = 0
  102. clvl = 6
  103. GC.@preserve inpb outb outl begin
  104. ret = :(
  105. @ccall XZ.$CALL_2(
  106. clvl :: UInt32,
  107. check :: UInt32,
  108. C_NULL :: *(Nothing),
  109. *(inpb) :: *(UInt8),
  110. inpl :: Csize_t,
  111. *(outb) :: *(UInt8),
  112. outl :: Ref{Csize_t},
  113. (outb |> length) :: Csize_t
  114. ) :: UInt32
  115. ) |> eval
  116. ret == OK || error("$ret")
  117. res = outb[begin:outl[]] |> copy
  118. key = UInt8[0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00]
  119. tip = Vector{UInt8}()
  120. append!(tip, res...)
  121. append!(tip, key...)
  122. append!(tip, ID... )
  123. length(tip) & 1 == 0 || begin @error("UNFORTUNATELY NOT 2X AND YOU WRONG."); exit() end
  124. end
  125. (lxb, lya, lyb) = (outl[], outl[] + 1, outl[] * 2)
  126. cx = tip[begin:lxb]
  127. cy = tip[lya:lyb]
  128. cx - cy |> sum |> iszero || begin @error("UNFORTUNATELY YOU TRIED AND WRONG. NOT TRY, JUST DO!"); exit() end
  129. # ---------------------------------------------------------------------------------------------------------------------
  130. mutable struct STREAM
  131. nx :: *(UInt8)
  132. ai :: Csize_t
  133. ti :: UInt64
  134. no :: *(UInt8)
  135. ao :: Csize_t
  136. to :: UInt64
  137. al :: *(Nothing)
  138. intt :: *(Nothing)
  139. _a :: *(Nothing)
  140. _b :: *(Nothing)
  141. _c :: *(Nothing)
  142. _d :: *(Nothing)
  143. _e :: UInt64
  144. _f :: UInt64
  145. _g :: Csize_t
  146. _h :: Csize_t
  147. _i :: Cint
  148. _j :: Cint
  149. end
  150. stream =
  151. STREAM(
  152. C_NULL, 0, 0, C_NULL, 0,
  153. 0, C_NULL, C_NULL, C_NULL, C_NULL,
  154. C_NULL, C_NULL, 0, 0, 0,
  155. 0, 0, 0
  156. )
  157. buf = cx
  158. out = Vector{UInt8}(undef, 100)
  159. println("WINNING CONGRATULATIONS! C PRIOBRETENIEM PRO PREMIYM PAKETA! VERY COOL!")
  160. GC.@preserve tip buf out stream begin
  161. stream.nx = *(buf)
  162. stream.ai = buf |> length
  163. stream.no = *(out)
  164. stream.ao = out |> length
  165. ret = :(@ccall XZ.$CALL_3(
  166. stream :: Ref{STREAM},
  167. typemax(UInt64) :: UInt64,
  168. 0 :: UInt32
  169. ) :: UInt32
  170. ) |> eval
  171. while true
  172. ret = :(
  173. @ccall XZ.$CALL_4(
  174. stream :: Ref{STREAM},
  175. RUN :: UInt32
  176. ) :: UInt32
  177. ) |> eval
  178. (ret == END || ret != OK) && break
  179. (stream.ai == 0) && break
  180. end
  181. res = String(out) |> Base.Fix2(split, "000") |> first |> codeunits
  182. @ccall XZ.lzma_end(
  183. stream :: Ref{STREAM}
  184. ) :: Cvoid
  185. end
  186. println("PRIOBRETAITE CODE:")
  187. # ---------------------------------------------------------------------------------------------------------------------
  188. key = [0x58, 0x4a, 0x5f, 0x4c, 0x09, 0x24, 0x35, 0x5e, 0x23, 0x0d,
  189. 0x36, 0x3b, 0x3b, 0x24, 0x1c, 0x3c, 0x59, 0x2e, 0x7e, 0x4f,
  190. 0x48, 0x5e, 0x59, 0x6d, 0x46, 0x41, 0x59, 0x56, 0x5f, 0x6e,
  191. 0x45, 0x5e, 0x72, 0x24, 0x3a, 0x20, 0x12, 0x3b, 0x30, 0x3e,
  192. 0x55, 0x0f, 0x2a, 0x34, 0x35, 0x44, 0x14, 0x15, 0x1e, 0x1f]
  193. key .⨷ res |> String |> println
  194. # ---------------------------------------------------------------------------------------------------------------------
  195. end
  196.  
Success #stdin #stdout #stderr 1.37s 264312KB
stdin
Standard input is empty
stdout
                                 (C) Author rights protected.
                         TheVillage (OOO), AGS Elite (Agrokekstroy JSC).

    V       V   ii   PPPP
     V     V    ii   P   P
      V   V     ii   PPPP
       V V      ii   P
        V       ii   P

      ViP - K U P O N C H I Q U E
         for entrancing
        the PRIVATE club
      <<THE VILLAGE PRO MAX>>

     POZDRAVL'AEM VI PRIGLASHENY NA VE4NUU VECHERINKU

    N ADO LISH ZAPUSTIT ETOT KUPON V VASHEM RABOCHEM PK.

     1. ECLI HE PA6OTAET, TO OT UMENU ADMINISTRATORA.
     2. ECLI HE PA6OTAET POTOM TO}|{E, YCTAHOBUTE XZ.
     3. ZATEM VVEDITE PAROLCHIK NA KYPOH4IK ....


INSIDE PAROLchik u [ENTER] > 
stderr
┌ Error: UNFORTUNATELY YOU TRIED AND WRONG. NOT TRY, JUST DO!
└ @ Main.VILLAGE_SMART_KUPON ~/prog.jl:128