Thread: Almost All File Archive Hash Names

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11  
    Ex Rune-Scaper

    Join Date
    Jun 2008
    Posts
    3,534
    Thanks given
    457
    Thanks received
    1,257
    Rep Power
    990
    Quote Originally Posted by TheChosenOne View Post
    I have done some bruteforcing in the past for the same reason as you.
    I can add the following name/hash combinations to your complete solution:

    1362520410: mapedge.dat
    1451391714: button_brown.dat
    902321338: pen.dat

    That leaves the following as "unknown":
    -1857300557
    22834782

    If you want to brute force. I can give you the code I have used in the past.



    It can indeed use underscores. Notice the code for hashing a string contains a toUpperCase(). So you only have to check either lowercase or uppercase.

    It would seem that, while I have done a great deal of brute forcing the hashes. I only used the .dat extension.
    That means I forgot to check .idx and no extension :/
    Awesome job, yeah those are correct. Sure, that would be very helpful!

    Update: 3 more media archives were discovered by TheChosenOne
    Code:
    pen.dat:902321338
    button_brown.dat:1451391714
    mapedge.dat:1362520410
    Attached image
    Reply With Quote  
     

  2. #12  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    Here's the code I'm currently using.

    It does include spaces within the name. That might not be the case in reality so you might want to omit those.
    This code checks for 9 characters of the table without extension, with .dat extension and with .idx extension.
    The matches will be written to a file. You will have to check yourself which ones could be possible. There are a lot of gibberish 'names' that produce the same hash result.

    EDIT: removed code, some faults slipped in. Will post the correct one below.
    Reply With Quote  
     

  3. #13  
    Ex Rune-Scaper

    Join Date
    Jun 2008
    Posts
    3,534
    Thanks given
    457
    Thanks received
    1,257
    Rep Power
    990
    Quote Originally Posted by TheChosenOne View Post
    Here's the code I'm currently using.

    It does include spaces within the name. That might not be the case in reality so you might want to omit those.
    This code checks for 9 characters of the table without extension, with .dat extension and with .idx extension.
    The matches will be written to a file. You will have to check yourself which ones could be possible. There are a lot of gibberish 'names' that produce the same hash result.

    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    
    public class BruteForce{
        public static void main(String[] args){
            bruteForceHash();
        }
    
        private static int[] hashes = new int[]{
                22834782,
                -1857300557,
        };
    
        private static char[] allvalidChars = new char[]{' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', '-'};
    
        private static void bruteForceHash(){
            int l1hash;
            int l2hash;
            int l3hash;
            int l4hash;
            int l5hash;
            int l6hash;
            int l7hash;
            int l8hash;
            int l9hash;
            int hash;
            for(char c1: allvalidChars){
                l1hash = c1 - 32;
                for(char c2 : allvalidChars){
                    l2hash = l1hash * 61 + c2 - 32;
                    for(char c3 : allvalidChars){
                        l3hash = l2hash * 61 + c3 - 32;
                        for(char c4 : allvalidChars){
                            l4hash = l3hash * 61 + c4 - 32;
                            for(char c5 : allvalidChars){
                                System.out.println("First 3 characters (out of 9): " + c1 + c2 + c3);
                                l5hash = l4hash * 61 + c5 - 32;
                                for(char c6 : allvalidChars){
                                    l6hash = l5hash * 61 + c6 - 32;
                                    for(char c7 : allvalidChars){
                                        l7hash = l6hash * 61 + c7 - 32;
                                        for(char c8 : allvalidChars){
                                            l8hash = l7hash * 61 + c8 - 32;
                                            for(char c9 : allvalidChars){
                                                l9hash = l8hash * 61 + c9 - 32;
                                                hash = addToHash(".DAT", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".DAT").toString(), hash);
                                                hash = addToHash(".IDX", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".IDX").toString(), hash);
                                                if(getMatch(l9hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".IDX").toString(), hash);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    
        private static int addToHash(String s, int hash){
            for(int j = 0; j < s.length(); j++)
                hash = (hash * 61 + s.charAt(j)) - 32;
            return hash;
        }
    
        private static int getMatch(int hash){
            for(int i = 0; i < hashes.length; i++)
                if(hashes[i] == hash)
                    return i;
            return -1;
        }
    
        private static int getHashForName(String dataName){
            int dataNameHash = 0;
            for(int j = 0; j < dataName.length(); j++)
                dataNameHash = (dataNameHash * 61 + dataName.charAt(j)) - 32;
            return dataNameHash;
        }
    
        private static void appendToBruteForceHashLog(String name, int hash){
            PrintWriter out = null;
            try{
                out = new PrintWriter(new BufferedWriter(new FileWriter("nameHashCombination.txt", true)));
                out.println("\"" + name.trim() + "\"\thash: " + hash);
            } catch(IOException e){
                e.printStackTrace();
            } finally{
                if(out != null)
                    out.close();
            }
        }
    }
    jesus those for loops haha

    edit:
    time to let it run for several days
    Attached image
    Reply With Quote  
     

  4. #14  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    Quote Originally Posted by Seven View Post
    oh my lanta, 9 for loops haha. i'd prob use recursion here. thanks though

    edit:
    time to let it run for several days
    Halt! I just noticed an error in here. Originally I didn't include the space. Now that it is included it's wrong because in reality it doesn't count for the hash at the start of a string (I think??).
    So you'll have to do 1 for-loop for 1 character size. 2 for-loops for 2 character size, etc. .

    The reason I used 9 for loops instead of recursion was to avoid the overhead of all the method calls I believe.

    EDIT: I just removed the space in the array of possible characters. Now lets hope there isn't one.
    If there can be, you'd have to use a seperate array without the space for the first character.

    Quote Originally Posted by Seven View Post
    oh my lanta, 9 for loops haha. i'd prob use recursion here. thanks though

    edit:
    time to let it run for several days
    Noticed another error I just made. For the one without extension. I printed out the wrong filename and hash.

    Correction:
    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    
    public class BruteForce{
        public static void main(String[] args){
            bruteForceHash();
        }
    
        private static int[] hashes = new int[]{
                22834782,
                -1857300557,
        };
    
        private static char[] allvalidChars = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', '-'};
    
        private static void bruteForceHash(){
            int l1hash;
            int l2hash;
            int l3hash;
            int l4hash;
            int l5hash;
            int l6hash;
            int l7hash;
            int l8hash;
            int l9hash;
            int hash;
            for(char c1: allvalidChars){
                l1hash = c1 - 32;
                for(char c2 : allvalidChars){
                    l2hash = l1hash * 61 + c2 - 32;
                    for(char c3 : allvalidChars){
                        l3hash = l2hash * 61 + c3 - 32;
                        System.out.println("First 3 characters (out of 9): " + c1 + c2 + c3);
                        for(char c4 : allvalidChars){
                            l4hash = l3hash * 61 + c4 - 32;
                            for(char c5 : allvalidChars){
                                l5hash = l4hash * 61 + c5 - 32;
                                for(char c6 : allvalidChars){
                                    l6hash = l5hash * 61 + c6 - 32;
                                    for(char c7 : allvalidChars){
                                        l7hash = l6hash * 61 + c7 - 32;
                                        for(char c8 : allvalidChars){
                                            l8hash = l7hash * 61 + c8 - 32;
                                            for(char c9 : allvalidChars){
                                                l9hash = l8hash * 61 + c9 - 32;
                                                hash = addToHash(".DAT", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".DAT").toString(), hash);
                                                hash = addToHash(".IDX", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".IDX").toString(), hash);
                                                if(getMatch(l9hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).toString(), l9hash);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        
        private static int addToHash(String s, int hash){
            for(int j = 0; j < s.length(); j++)
                hash = (hash * 61 + s.charAt(j)) - 32;
            return hash;
        }
    
        private static int getMatch(int hash){
            for(int i = 0; i < hashes.length; i++)
                if(hashes[i] == hash)
                    return i;
            return -1;
        }
    
        private static int getHashForName(String dataName){
            int dataNameHash = 0;
            for(int j = 0; j < dataName.length(); j++)
                dataNameHash = (dataNameHash * 61 + dataName.charAt(j)) - 32;
            return dataNameHash;
        }
    
        private static void appendToBruteForceHashLog(String name, int hash){
            PrintWriter out = null;
            try{
                out = new PrintWriter(new BufferedWriter(new FileWriter("nameHashCombination.txt", true)));
                out.println("\"" + name.trim() + "\"\thash: " + hash);
            } catch(IOException e){
                e.printStackTrace();
            } finally{
                if(out != null)
                    out.close();
            }
        }
    }
    I'm currently checking 8 characters.
    Reply With Quote  
     

  5. #15  
    ???

    funkE's Avatar
    Join Date
    Feb 2008
    Posts
    2,612
    Thanks given
    255
    Thanks received
    989
    Rep Power
    1366
    Quote Originally Posted by TheChosenOne View Post
    Halt! I just noticed an error in here. Originally I didn't include the space. Now that it is included it's wrong because in reality it doesn't count for the hash at the start of a string (I think??).
    So you'll have to do 1 for-loop for 1 character size. 2 for-loops for 2 character size, etc. .

    The reason I used 9 for loops instead of recursion was to avoid the overhead of all the method calls I believe.

    EDIT: I just removed the space in the array of possible characters. Now lets hope there isn't one.
    If there can be, you'd have to use a seperate array without the space for the first character.



    Noticed another error I just made. For the one without extension. I printed out the wrong filename and hash.

    Correction:
    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    
    public class BruteForce{
        public static void main(String[] args){
            bruteForceHash();
        }
    
        private static int[] hashes = new int[]{
                22834782,
                -1857300557,
        };
    
        private static char[] allvalidChars = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', '-'};
    
        private static void bruteForceHash(){
            int l1hash;
            int l2hash;
            int l3hash;
            int l4hash;
            int l5hash;
            int l6hash;
            int l7hash;
            int l8hash;
            int l9hash;
            int hash;
            for(char c1: allvalidChars){
                l1hash = c1 - 32;
                for(char c2 : allvalidChars){
                    l2hash = l1hash * 61 + c2 - 32;
                    for(char c3 : allvalidChars){
                        l3hash = l2hash * 61 + c3 - 32;
                        System.out.println("First 3 characters (out of 9): " + c1 + c2 + c3);
                        for(char c4 : allvalidChars){
                            l4hash = l3hash * 61 + c4 - 32;
                            for(char c5 : allvalidChars){
                                l5hash = l4hash * 61 + c5 - 32;
                                for(char c6 : allvalidChars){
                                    l6hash = l5hash * 61 + c6 - 32;
                                    for(char c7 : allvalidChars){
                                        l7hash = l6hash * 61 + c7 - 32;
                                        for(char c8 : allvalidChars){
                                            l8hash = l7hash * 61 + c8 - 32;
                                            for(char c9 : allvalidChars){
                                                l9hash = l8hash * 61 + c9 - 32;
                                                hash = addToHash(".DAT", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".DAT").toString(), hash);
                                                hash = addToHash(".IDX", l9hash);
                                                if(getMatch(hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).append(".IDX").toString(), hash);
                                                if(getMatch(l9hash) != -1)
                                                    appendToBruteForceHashLog(new StringBuilder().append(c1).append(c2).append(c3).append(c4).append(c5).append(c6).append(c7).append(c8).append(c9).toString(), l9hash);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        
        private static int addToHash(String s, int hash){
            for(int j = 0; j < s.length(); j++)
                hash = (hash * 61 + s.charAt(j)) - 32;
            return hash;
        }
    
        private static int getMatch(int hash){
            for(int i = 0; i < hashes.length; i++)
                if(hashes[i] == hash)
                    return i;
            return -1;
        }
    
        private static int getHashForName(String dataName){
            int dataNameHash = 0;
            for(int j = 0; j < dataName.length(); j++)
                dataNameHash = (dataNameHash * 61 + dataName.charAt(j)) - 32;
            return dataNameHash;
        }
    
        private static void appendToBruteForceHashLog(String name, int hash){
            PrintWriter out = null;
            try{
                out = new PrintWriter(new BufferedWriter(new FileWriter("nameHashCombination.txt", true)));
                out.println("\"" + name.trim() + "\"\thash: " + hash);
            } catch(IOException e){
                e.printStackTrace();
            } finally{
                if(out != null)
                    out.close();
            }
        }
    }
    I'm currently checking 8 characters.
    You aren't doing this in parallel?!
    .
    Reply With Quote  
     

  6. Thankful user:


  7. #16  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    Quote Originally Posted by Supah Fly View Post
    You aren't doing this in parallel?!
    It's based on old code I once used. And no I didn't.

    PARTY HARD!!!!!
    I had a quick look at my own code and looked at the images.
    And I realised something that could make a major difference in finding the answers.
    :-)

    I present to you hash -1857300557: "blackmark.dat"
    Reply With Quote  
     

  8. Thankful user:


  9. #17  
    Ex Rune-Scaper

    Join Date
    Jun 2008
    Posts
    3,534
    Thanks given
    457
    Thanks received
    1,257
    Rep Power
    990
    The last missing hash!

    2d graphics
    1 image archive unknown
    • 22834782 contains
      • 3 sprites






    Updated media archive visual representation

    Attached image
    Reply With Quote  
     

  10. #18  
    Registered Member

    Join Date
    Feb 2009
    Age
    27
    Posts
    2,861
    Thanks given
    127
    Thanks received
    226
    Rep Power
    700
    Quote Originally Posted by CrazyPanda View Post
    The last missing hash!

    2d graphics
    1 image archive unknown
    • 22834782 contains
      • 3 sprites




    Final missing hash has been found. The name is

    Code:
    gnomeball_buttons.dat
    Congratulations, and thanks, to Kikorono for the find

    Test code

    Code:
    class Main {  
      public static void main(String args[]) {
        int expected = 22834782;
        String input = "gnomeball_buttons.dat";
    
        int result = fileNameToHash(input);
        
        System.out.println(result);
        System.out.println(result == expected);
      }
    
      public static int fileNameToHash(String name) {
        int hash = 0;
        name = name.toUpperCase();
    
        for (int i = 0; i < name.length(); i++) {
          hash = (hash * 61 + name.charAt(i)) - 32;
        }
    
        return hash;
      }
    }
    Output

    Code:
    22834782
    true
    Reply With Quote  
     

  11. Thankful user:


Page 2 of 2 FirstFirst 12

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 08-28-2008, 11:17 PM
  2. some file archiver reviews.
    By Unity in forum Downloads
    Replies: 1
    Last Post: 08-10-2008, 10:32 PM
  3. ! battlescape isle decompiled no errors!all files
    By owned112 in forum Downloads
    Replies: 14
    Last Post: 04-26-2008, 01:28 AM
  4. 481 Client - Almost All Packets Documented.
    By Evolution X in forum RS2 Client
    Replies: 34
    Last Post: 02-04-2008, 12:30 AM
Tags for this Thread

View Tag Cloud

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