Jump to content

Search the Community

Showing results for tags 'enabling'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 3 results

  1. clan chat

    Snow Enabling

    Hey guys I followed this snippet from Rune-Server And i got no error and i go in game and i see no snow please help! [quote name='_Jordan'][SIZE=4][B]Took about 5 minutes to do. Super easy to do and pretty cool to have. Since it's like almost Christmas and shit. This can probably be done better, of course, but whatevs. All client sided[/B] [/SIZE] [U][B]Class443[/B][/U] [code] int checkSnow = Loader.SNOW_ENABLED ? -255 : 255; [/code] [code] else if (-620399085 * anInt5595 > checkSnow) anInt5595 = -1574873371; [/code] [U][B]Loader[/B][/U] [code] public static boolean SNOW_ENABLED = false; [/code] [code] private void checkSnowClient() { int input = 0; try { while (input == 0) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); String userInput = JOptionPane.showInputDialog("Start snow client? (Yes or No)"); userInput.toLowerCase(); if (userInput.contains("y") || userInput.contains("Y")) { SNOW_ENABLED = true; input++; } else if (userInput.contains("n") || userInput.contains("N")) { SNOW_ENABLED = false; input++; } } catch (Exception e) { System.exit(0); } } } catch (Exception e) { System.exit(0); } } [/code] Inside the doFrame method in Loader class call the method provided. [IMG]http://i.imgur.com/qohlykj.png[/IMG] [IMG]http://i.imgur.com/BzazXuW.png[/IMG][/QUOTE] [SIZE=4]FULL CREDITS TO _JORDAN ON RUNE-SERVER NOT MY WORK[/SIZE]
  2. Purpose: Enabling RSA Encryption on your client and server. Difficulty: 7 (Most people do not know how it works, so they just disable it, and this will NOT be a beginner friendly tutorial, since I suck at writing tutorials...) Assumed Knowledge: Java and your way around the classes. Classes Modified: Client side: Stream.java Server side: Hyperion: org/hyperion/rs2/net/RS2LoginDecoder.java PI: server/net/RS2LoginProtocolDecoder.java Tested On(if it applies): Hyperion, PI (RS2HD Shouldn't be far off both, and it's simple enough to read) For Apollo, use [url=http://www.rune-server.org/runescape-development/rs2-server/tutorials/421353-apollo-enabling-rsa.html]this[/url] What this does: RSA is an encryption algorithm put in place by Jagex to stop packet sniffers like autorune, which can fake packets, by hiding their isaac keys in the encrypted buffer, it made it impossible to decrypt the raw isaac cipher data. We shouldn't disable it for 2 reasons, it stops sniffing of usernames and passwords, and also gives isaac a purpose again. For a full description of what the RSA Algorithm is, visit this link: [url=http://en.wikipedia.org/wiki/RSA#Integer_factorization_and_RSA_problem]RSA - Wikipedia, the free encyclopedia[/url] Step 1: Generate a public and private key. This tool will generate a private and public key, the public key is a simple biginteger with an exponent which is usually 65537, and the private key is kept hidden in our server to decrypt our data sent by the public key, if the private key EVER gets leaked, someone could sniff the data and decode it. [code]import java.io.BufferedWriter; import java.io.FileWriter; import java.math.BigInteger; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.RSAPrivateKeySpec; import java.security.spec.RSAPublicKeySpec; /** * A class to generate a simple 1024 bit RSA pair * @author Nikki */ public class RSAKeyGen { public static void main(String[] args) { try { KeyFactory factory = KeyFactory.getInstance("RSA"); KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(1024); KeyPair keypair = keyGen.genKeyPair(); PrivateKey privateKey = keypair.getPrivate(); PublicKey publicKey = keypair.getPublic(); RSAPrivateKeySpec privSpec = factory.getKeySpec(privateKey, RSAPrivateKeySpec.class); writeKey("rsapriv", privSpec.getModulus(), privSpec.getPrivateExponent()); RSAPublicKeySpec pubSpec = factory.getKeySpec(publicKey, RSAPublicKeySpec.class); writeKey("rsapub", pubSpec.getModulus(), pubSpec.getPublicExponent()); } catch(Exception e) { e.printStackTrace(); } } public static void writeKey(String file, BigInteger modulus, BigInteger exponent) { try { BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write("private static final BigInteger RSA_MODULUS = new BigInteger(\""+modulus.toString()+"\");"); writer.newLine(); writer.newLine(); writer.write("private static final BigInteger RSA_EXPONENT = new BigInteger(\""+exponent.toString()+"\");"); writer.newLine(); writer.flush(); writer.close(); } catch(Exception e) { e.printStackTrace(); } } } [/code] Compile and run, then you should get 2 files, rsapub and rsapriv, in that directory. You will need them later on. Step 2: Preparing the server. In your server files, open the Login Decoder class, and find something like this: For Hyperion: [code] encryptSize--; int reportedSize = in.get() & 0xFF;[/code] For PI: [code] if(loginEncryptPacketSize != (in.get() & 0xff)) { System.out.println("Encrypted size mismatch."); session.close(); return false; }[/code] Under it a bit, you should see something like this: Hyperion: [code]int blockOpcode = buffer.get() & 0xFF;[/code] PI: [code] if((in.get() & 0xff) != 10) { System.out.println("Encrypted id != 10."); session.close(); return false; }[/code] Above this, you want to read the encryption bytes and decrypt them, so you have to create a byte array with size of the encrypted bytes, like this: Hyperion: [code]byte[] encryptionBytes = new byte[encryptSize];[/code] Pi: [code]byte[] encryptionBytes = new byte[loginEncryptPacketSize];[/code] And then read the bytes into the array [code]in.get(encryptionBytes);[/code] Andd then decrypt: Hyperion: [code]IoBuffer rsaBuffer = IoBuffer.wrap(new BigInteger(encryptionBytes) .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());[/code] PI: [code]ByteBuffer rsaBuffer = ByteBuffer.wrap(new BigInteger(encryptionBytes) .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());[/code] Now, add the code from "rsapriv" file generated earlier to the top of the class, under the class declaration. After this, You will have to go through and change every "get*" type method that's after the new changes to the new buffer method, like this: [code]if((in.get() & 0xff) != 10) { -> if((rsaBuffer.get() & 0xff) != 10) { in.getLong(); -> rsaBuffer.getLong(); String name = readRS2String(in); -> String name = readRS2String(rsaBuffer);[/code] This should be done now, so save and close your files. Step 3: Re-enabling what shouldn't have been disabled! Client side is a bit easier, since the code is pretty much the same on all clients, so open the Stream class or equiv class, and find "BigInteger ", this should be your RSA encryption method. If the method is blank, I can't help you there, since some people delete the whole method to skip it, some comment it out and some comment the line that encrypts it out. My client was like this: [code] public void doKeys() { int i = currentOffset; currentOffset = 0; byte abyte0[] = new byte[i]; readBytes(i, 0, abyte0); BigInteger biginteger2 = new BigInteger(abyte0); BigInteger biginteger3 = biginteger2;[/code] And you can see where biginteger3 was changed to not encrypt. To fix this, you see "bigInteger2;" or equiv, which is simply setting a variable to another one without the modPow, change that line to something like: [code]BigInteger biginteger3 = biginteger2.modPow(RSA_EXPONENT, RSA_MODULUS);[/code] Now, go into your rsapub file and copy those lines to the Stream class. That should be it, anything I missed? Let me know. This tutorial is NOT for Delta or winterlove based servers, since it will be using methods to read from the IoBuffer class. Credits: Nikki
×