Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

Page 4 of 15 FirstFirst 12345678910111214 ... LastLast
Results 46 to 60 of 224
  1. #46
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by Caustik View Post
    Are you writing the rc4 class from scratch? Just wondering, cause Mike put up a class on his github repo
    Porting one that Nillus gave me back in the day.

    Still having issues with encryption however i can now generate keys correctly having some issues decoding them again (i think the checksum is wrong can't confirm yet) which may explain incorrect data when i decipher it.

  2. #47
    Apprentice jeppepulis is offline
    MemberRank
    Oct 2010 Join Date
    Calahonda, AndaLocation
    14Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Screenies?

  3. #48
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by jeppepulis View Post
    Screenies?
    Lrn2read

  4. #49
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    I've made some progress with encryption, generateKey() and decodeKey() have been reimplemented and seem to work correctly. I'm having issues decrypting data i'm sure if a bug if it's a bug in my encipher() method though ;P

    What happened to posts auto-merging?

  5. #50
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Code:
     int c = (char)data.Substring(a, 1).ToCharArray()[0] ^ k;
    I found that on a paste for V23 RC4, in place of:
    Code:
    int c = (char)s.charAt(a) ^ k;
    It might just work, not sure though
    [source]=http://pastebin.com/F5ankLTK

    (I myself have been encountering problems porting the rc4 stuff to C++ :s)
    Posted via Mobile Device

  6. #51
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by Caustik View Post
    Code:
     int c = (char)data.Substring(a, 1).ToCharArray()[0] ^ k;
    I found that on a paste for V23 RC4, in place of:
    Code:
    int c = (char)s.charAt(a) ^ k;
    It might just work, not sure though
    [source]=http://pastebin.com/F5ankLTK

    (I myself have been encountering problems porting the rc4 stuff to C++ :s)
    Posted via Mobile Device

    That would make no difference, I've rewrote it based on Sulakes leaked server.

    Pushed the newest build to github.
    Last edited by Crossroads; 11-01-12 at 04:01 AM.

  7. #52
    Developer Quackster is online now
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,474Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by Crossroads View Post
    That would make no difference, I've rewrote it based on Sulakes leaked server.

    Pushed the newest build to github.
    Since when did Sulake have a server leaked?

  8. #53
    Demi-god on these 'ere wa DominicGunn is offline
    MemberRank
    Jun 2011 Join Date
    347Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by Quackster View Post
    Since when did Sulake have a server leaked?
    As fate wud have it. Legend foretells of their server (around the time of Habbo v7) being attacked 'n leaked my poor boy! it is veryyy private tho

  9. #54
    Proficient Member office.boy is offline
    MemberRank
    Feb 2007 Join Date
    156Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Code:
    package com.fuse.security;
    
    import java.security.SecureRandom;
    
    // Referenced classes of package com.fuse.security:
    //            SecretKey
    
    public class SecretKeyCharIndex
        implements SecretKey
    {
    
        public SecretKeyCharIndex()
        {
            randomGen = new SecureRandom();
        }
    
        public String generateKey()
        {
            int length = 30 + Math.abs(randomGen.nextInt() % 40);
            StringBuffer table = new StringBuffer(length);
            StringBuffer key = new StringBuffer(length);
            for(int i = 0; i < length; i++)
            {
                Character c = new Character("abcdefghijklmnopqrstuvwxyz1234567890".charAt(Math.abs(randomGen.nextInt() % "abcdefghijklmnopqrstuvwxyz1234567890".length())));
                table.append(c);
                c = new Character("abcdefghijklmnopqrstuvwxyz1234567890".charAt(Math.abs(randomGen.nextInt() % "abcdefghijklmnopqrstuvwxyz1234567890".length())));
                table.append(c);
                key.append(c);
            }
    
            return table.toString() + key.toString();
        }
    
        public String decodeKey(String origKey)
        {
            String table = origKey.substring(0, origKey.length() / 2);
            String key = origKey.substring(origKey.length() / 2);
            long checkSum = 0L;
            for(int i = 0; i < table.length(); i++)
            {
                int offset = table.indexOf(key.charAt(i));
                if(offset % 2 == 0)
                    offset *= 2;
                if(i % 3 == 0)
                    offset *= 3;
                if(offset < 0)
                    offset = table.length() % 2;
                checkSum += offset;
                checkSum ^= offset << (i % 3) * 8;
            }
    
            return (new Long(checkSum)).toString();
        }
    
        public static void main(String args[])
        {
            SecretKeyCharIndex keyCode = new SecretKeyCharIndex();
            for(int i = 0; i < 10; i++)
            {
                String key = keyCode.generateKey();
                keyCode.decodeKey(key);
            }
    
        }
    
        public static final String VERSION = "$Id: SecretKeyCharIndex.java,v 1.12 2004/02/17 11:18:45 jambo Exp $";
        private final int KEY_MINLENGTH = 30;
        private final int KEY_LENGTH_VARIATION = 40;
        private static final String characters = "abcdefghijklmnopqrstuvwxyz1234567890";
        SecureRandom randomGen;
    }
    From the leaked server itself 8-)

  10. #55
    Proficient Member Nathandj is offline
    MemberRank
    Jan 2012 Join Date
    The NetherlandsLocation
    194Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    This is from the same source Mike?

    Code:
    package com.fuse.security;
    
    import java.util.*;
    import java.security.*;
    
    public class VerySimpleSecretKey implements SecretKey {
    
    	long seed = System.currentTimeMillis();
    	
    	public String generateKey() {
    		Random rand = new Random((seed += System.currentTimeMillis() % 500));
    		StringBuffer sb = new StringBuffer(200);
    		for(int i=0; i<20; i++) {
    			sb.append(Math.abs(rand.nextInt() % 1000));
    			sb.append(" ");	
    		}
    		return sb.toString();
    	}
    	
    	public String decodeKey(String key) {
    		String s;
    		int x, i=0;
    		long z = 0;
    		StringTokenizer zt = new StringTokenizer(key, " ");
    		while(zt.hasMoreTokens()) {
    			i++;
    			s = zt.nextToken();
    			x = Integer.parseInt(s);
    			z += (x+i%5);
    		}
    		System.out.println("z=" + z + "; i=" + i +"; res=" + 1000*Math.sin(z * 1.0));
    		return new Integer((int) (1000*Math.sin(z * 1.0))).toString();
    	}
    	
    	public static void main(String[] args) {
    		VerySimpleSecretKey keyCode = new VerySimpleSecretKey();
    		System.out.println("Start");
    		for(int i=0; i<10; i++) {
    			String key = keyCode.generateKey();
    			String decryptKey = keyCode.decodeKey(key);
    			System.out.println(key);
    			System.out.println(decryptKey);
    			System.out.println("");		
    		}	
    	}
    }

  11. #56
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by office.boy View Post
    Code:
    package com.fuse.security;
    
    import java.security.SecureRandom;
    
    // Referenced classes of package com.fuse.security:
    //            SecretKey
    
    public class SecretKeyCharIndex
        implements SecretKey
    {
    
        public SecretKeyCharIndex()
        {
            randomGen = new SecureRandom();
        }
    
        public String generateKey()
        {
            int length = 30 + Math.abs(randomGen.nextInt() % 40);
            StringBuffer table = new StringBuffer(length);
            StringBuffer key = new StringBuffer(length);
            for(int i = 0; i < length; i++)
            {
                Character c = new Character("abcdefghijklmnopqrstuvwxyz1234567890".charAt(Math.abs(randomGen.nextInt() % "abcdefghijklmnopqrstuvwxyz1234567890".length())));
                table.append(c);
                c = new Character("abcdefghijklmnopqrstuvwxyz1234567890".charAt(Math.abs(randomGen.nextInt() % "abcdefghijklmnopqrstuvwxyz1234567890".length())));
                table.append(c);
                key.append(c);
            }
    
            return table.toString() + key.toString();
        }
    
        public String decodeKey(String origKey)
        {
            String table = origKey.substring(0, origKey.length() / 2);
            String key = origKey.substring(origKey.length() / 2);
            long checkSum = 0L;
            for(int i = 0; i < table.length(); i++)
            {
                int offset = table.indexOf(key.charAt(i));
                if(offset % 2 == 0)
                    offset *= 2;
                if(i % 3 == 0)
                    offset *= 3;
                if(offset < 0)
                    offset = table.length() % 2;
                checkSum += offset;
                checkSum ^= offset << (i % 3) * 8;
            }
    
            return (new Long(checkSum)).toString();
        }
    
        public static void main(String args[])
        {
            SecretKeyCharIndex keyCode = new SecretKeyCharIndex();
            for(int i = 0; i < 10; i++)
            {
                String key = keyCode.generateKey();
                keyCode.decodeKey(key);
            }
    
        }
    
        public static final String VERSION = "$Id: SecretKeyCharIndex.java,v 1.12 2004/02/17 11:18:45 jambo Exp $";
        private final int KEY_MINLENGTH = 30;
        private final int KEY_LENGTH_VARIATION = 40;
        private static final String characters = "abcdefghijklmnopqrstuvwxyz1234567890";
        SecureRandom randomGen;
    }
    From the leaked server itself 8-)
    I have that along with the RC4, SecretKey and SecretKeyCharIndex class's ;P

  12. #57
    Lurking since '06 1ntel is offline
    MemberRank
    Jul 2006 Join Date
    401Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by DominicGunn View Post
    As fate wud have it. Legend foretells of their server (around the time of Habbo v7) being attacked 'n leaked my poor boy! it is veryyy private tho
    I thought FUSE could be obtained from Sulake anyway?

    edit: oh nvm a habbo v7 server, fuse was a prototype code before habbo

  13. #58
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    Quote Originally Posted by matty13 View Post
    I thought FUSE could be obtained from Sulake anyway?

    edit: oh nvm a habbo v7 server, fuse was a prototype code before habbo
    Parts of FUSE {are,were} open source, which is what the early versions of the Habbo Architecture were built upon i think around R15 they rewrote most of the backend to be more scaleable.

  14. #59
    Proficient Member office.boy is offline
    MemberRank
    Feb 2007 Join Date
    156Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    I release the leaked server files on SoM some time ago. They're very much in circulation... Lots of test classes in there too.

  15. #60
    Member Crossroads is offline
    MemberRank
    Dec 2011 Join Date
    59Posts

    re: Crowley - r63 - Java - Hibernate/BoneCP (MySQL)

    So yeah i've decided to forget about encryption for now, registration is nearly complete (ignores the database for now) username validation is performed using a regex instead of comparing each character like in some older servers. Once i bother to hookup the User model to hibernate i will implement username checks (already in use - easy change) i will add password validation and login should be easy enough to finish from there.



Advertisement