Results 1 to 13 of 13

Thread: MD5 Hashing in SCAR.

  1. #1
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default MD5 Hashing in SCAR.

    SCAR Code:
    program MD5_Authorization;

    const
      User  = 'User';
      Pass  = 'Pass';
      Hash1 = '8f9bfe9d1345237cb3b2b205864da075';
      Hash2 = 'b9b57aae83585e17ede4570dcede353c';
    begin
      if MD5(User) = Hash1 then   {Method is not secure...}
        if MD5(Pass) = Hash2 then
          WriteLn('Correct, welcome '+User+'!')
        else
          WriteLn('Password incorrect, '+User+'.')
      else
        WriteLn('Unknown user!');
    end.

    Thats how it might be used, but remember: you could just remove this auth part... Better use PHP, kiddies.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  2. #2
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by R0b0t1 View Post
    SCAR Code:
    program MD5_Authorization;

    const
      User  = 'User';
      Pass  = 'Pass';
      Hash1 = '8f9bfe9d1345237cb3b2b205864da075';
      Hash2 = 'b9b57aae83585e17ede4570dcede353c';
    begin
      if MD5(User) = Hash1 then   {Method is not secure...}
        if MD5(Pass) = Hash2 then
          WriteLn('Correct, welcome '+User+'!')
        else
          WriteLn('Password incorrect, '+User+'.')
      else
        WriteLn('Unknown user!');
    end.

    Thats how it might be used, but remember: you could just remove this auth part... Better use PHP, kiddies.
    Yea, because can't can't remove a php auth

  3. #3
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    write your script to use hash passwords before you send it, then encrypt the script,
    remember to salt your passwords before you hash them, with a value that changes every time (sent from the server hopefully)
    Join the Official SRL IRC channel. Learn how to Here.

  4. #4
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Yes, I see what you mean...

    (Rolling Code)

    * Have a file that stores a number which is incremented, hash it.

    * Check hash against the next 256 possible hashes, protects against failed connects.

    * If successful, use that MD5 to seed a random function...

    * Uhm... Use that number as salt? (Processes will be performed on the server also)

    * Since password on server and SCAR would have gone through the same processes, they will be identical, so compare them.

    * Tell scar: "Sure, this guy is OK".


    [Freddy, I forgot that both are useless w/o encryption]
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  5. #5
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    nah i dont like the storing in the file
    try something like this

    C: start underlying protocol
    S: **gets the cpu cycles, or other almost random number (windows API has the GetTickCount())
    S: **Send this number along with some other stuff
    C: **use that number as a seed, generates 10 numbers from it, which are between the ascii values of a-z A-Z and 0-9, adds this string to the password, hashes it and sends to server
    S: Server does the same thing, and checks if the two hashes are the same, if they are, it replies with an OK message

    this isnt incredibly useful, i guess it would just confuse people, like if they are monitoring packets, they get a new hash, even though they typed the same password
    also make your own pseduorandom number alogorithm, and keep it secret (IE scar script encrypted and on your php server)
    also you might want to xor the seed you get from the server with a (secret) constant value
    Join the Official SRL IRC channel. Learn how to Here.

  6. #6
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I've always wondered, why do people always use xor?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  7. #7
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    xor = either but not both.

  8. #8
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Still doesn't answer why they'd use it.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  9. #9
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no..? its less code / faster
    look at set run

  10. #10
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Timer View Post
    no..? its less code / faster
    look at set run
    More code in my opinion. Because then you have to check which side of the statement was true.


  11. #11
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    But still, WHY THE HELL DO THEY USE IT?

    Why is it in so many algorithms? Something special about it?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  12. #12
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    imagine we got A, B and C
    A xor B = C
    A xor C = B
    B xor C = A
    If you xor 2 values, you'll get the missing one.
    I made a new script, check it out!.

  13. #13
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    in my case, i used it cause its a relativly simple way of scrambling bytes
    so if someone is packet sniffing your script, it wont be ascii human readable characters

    look on wikipedia for the other uses
    Join the Official SRL IRC channel. Learn how to Here.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. [Scar IDE] How to set jEDIT to edit scar files corectly!
    By LordGregGreg in forum Outdated Tutorials
    Replies: 16
    Last Post: 06-23-2007, 01:19 AM
  3. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  4. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •