Jump to content

A trick with numbers


MSasu

Recommended Posts

(setq stringNew "")
(foreach index '(0 1 2 3 4 5)
(setq stringNew
      (strcat stringNew
              (chr
               (fix
                (atof
                 (rtos (+ (* index
                             (+ (* index
                                 (+ (* index
                                     (- (* index
                                         (+ (* index
                                               -0.75)
                                            7.2917))
                                        22.5))
                                    16.708))
                                28.25))
                          72)
                       2 0))))))
)
(foreach index '(0 1 2 3 4 5)
(setq stringNew
      (strcat stringNew
              (chr
               (fix
                (atof
                 (rtos
                  (+ (* index
                        (- (* index
                            (+ (* index
                                (- (* index
                                    (+ (* index
                                        (- (* index
                                              0.425)
                                           6.8667))
                                       40.833))
                                   109.58))
                               122.24))
                           23.05))
                     87)
                  2 0))))))
)
(alert stringNew)

(translated from a Visual Basic 6 routine; author unknown)

Link to comment
Share on other sites

Reminds me of this:

 

(   (lambda ( f x ) (f x))
   (lambda ( x ) (eval x))
   (   (lambda ( f x ) (f x))
       (lambda ( x ) (read x))
       (   (lambda ( f x ) (f x))
           (lambda ( x ) (vl-list->string x))
           (   (lambda ( f x ) (mapcar 'f x))
               (lambda ( x ) (boole 6 90 x))
               (   (lambda ( f x ) (f x))
                   (lambda ( x ) (vl-string->list x))
                   "r;6?(.zx\022?665z\r5(6>{xs"
               )
           )
       )
   )
)

 

Or, 'unobfuscated':

 

(eval
   (read
       (vl-list->string
           (mapcar
               (function
                   (lambda ( x ) (boole 6 90 x))
               )
               (vl-string->list "r;6?(.zx\022?665z\r5(6>{xs")
           )
       )
   )
)

Link to comment
Share on other sites

Yep, this type of thing is usually used as a way of hard-coding unlock-codes / passwords so that such can't be readily seen in compiled code by simply viewing an EXE in a hex editor. A simple "hash" function to obfuscate such things. It's not the best method, but works to stop most people from cracking a program - won't stop a determined guy though :twisted:

 

It can be seen as introducing a key into your program. Although this would be like adding a 2 leaver key (i.e. easily pickable with a hairpin). :lol:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...