Thread: [876] Latest Nocturne Source

Page 10 of 13 FirstFirst ... 89101112 ... LastLast
Results 91 to 100 of 127
  1. #91  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    1,666
    Thanks given
    253
    Thanks received
    407
    Rep Power
    296
    Quote Originally Posted by phoenixwarrior View Post
    How do you get the grand exchange to work? Been looking for an answer and still havent found one. The closest I found is GrandExchangeManager and the interfaces are all messed up but idk what to do about it.
    I never finished the GE. That was one of my future projects I didn't get to unfortunately. The interface changed a lot in this revision and you need to do a lot of debugging to fix it up.
    Reply With Quote  
     

  2. #92  
    48 0x69

    Pax M's Avatar
    Join Date
    Oct 2013
    Posts
    2,008
    Thanks given
    36
    Thanks received
    488
    Rep Power
    2270
    Quote Originally Posted by bobismyname View Post
    I never finished the GE. That was one of my future projects I didn't get to unfortunately. The interface changed a lot in this revision and you need to do a lot of debugging to fix it up.
    True thing Miles
    Reply With Quote  
     

  3. #93  
    Donator
    vinyka's Avatar
    Join Date
    Feb 2014
    Age
    24
    Posts
    16
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by Shirayuki View Post
    I'm just going to post this here since people keep asking the same things. https://www.rune-server.ee/runescape...ml#post5557307
    i followed the thread, but when i try use my public ip https://prnt.sc/s0jcq1
    The MIND MASTERS WORLD OF PACKETS
    Reply With Quote  
     

  4. #94  
    Registered Member Elunar's Avatar
    Join Date
    Oct 2015
    Posts
    15
    Thanks given
    23
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by vinyka View Post
    i followed the thread, but when i try use my public ip https://prnt.sc/s0jcq1
    Try and see if you can get it working for LAN first. If yes, maybe try port forwarding, or someone else is currently hosting a server in your household?

    Besides that idek. I got this gem to work just fine though and came here to thank

    Only issue is the sound/music, etc. Is there a solution for this? Music not playing, 90% of the sounds not playing, etc.
    Reply With Quote  
     

  5. Thankful user:


  6. #95  
    Donator
    vinyka's Avatar
    Join Date
    Feb 2014
    Age
    24
    Posts
    16
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by Elunar View Post
    Try and see if you can get it working for LAN first. If yes, maybe try port forwarding, or someone else is currently hosting a server in your household?

    Besides that idek. I got this gem to work just fine though and came here to thank

    Only issue is the sound/music, etc. Is there a solution for this? Music not playing, 90% of the sounds not playing, etc.
    hey mate, in LAN works on!, just with my public ip does no works , i`ll try buy a vps
    The MIND MASTERS WORLD OF PACKETS
    Reply With Quote  
     

  7. #96  
    Registered Member
    Join Date
    Nov 2012
    Posts
    599
    Thanks given
    14
    Thanks received
    54
    Rep Power
    26
    have u tried using no-ip with it, because your local server ip probz keeps changing so maybe thats why, with no-ip adress it will auto update to the ip and keep it connecting
    Reply With Quote  
     

  8. #97  
    Donator
    vinyka's Avatar
    Join Date
    Feb 2014
    Age
    24
    Posts
    16
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by khayam View Post
    have u tried using no-ip with it, because your local server ip probz keeps changing so maybe thats why, with no-ip adress it will auto update to the ip and keep it connecting
    idk, i just can open server with my localhost ip, if i put a public ip or no-ip domain, the server does open
    The MIND MASTERS WORLD OF PACKETS
    Reply With Quote  
     

  9. #98  
    Registered Member
    Join Date
    Sep 2019
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    hello how i run it
    help plz
    Reply With Quote  
     

  10. #99 changed ips not working for me 
    Registered Member
    Join Date
    May 2015
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    settings.java is set as

    package net.nocturne;

    import java.io.File;
    import java.io.IOException;
    import java.math.BigInteger;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.MalformedURLException;
    import java.net.UnknownHostException;
    import java.util.ArrayList;

    import net.nocturne.game.WorldTile;
    import net.nocturne.game.player.Player;
    import net.nocturne.login.WorldInformation;

    public final class Settings {

    private static boolean hostName() {
    try {
    switch (InetAddress.getLocalHost().getHostName()) {
    case "nocturne":
    return true;
    }
    } catch (UnknownHostException e) {
    e.printStackTrace();
    }
    return false;
    }

    public static int WORLD_ID = 1;
    public static boolean DEBUG = hostName() ? false : true;
    public static boolean HOSTED = hostName() ? true : false;

    public static final String VPS1_IP = HOSTED ? "127.0.0.1"
    : "127.0.0.1";

    public static final String UPDATE_TOPIC_TITLE = "";
    public static final String UPDATE_TOPIC_ID = "";
    public static final String SERVER_NAME = "Nocturne";
    public static final String MAIN_FC = "danny";
    public static final String CACHE_PATH = "./data/cache/";
    public static final String LOGIN_DATA_PATH = "data/accounts_data";
    @suppressWarnings("serial")
    public static final ArrayList<String> SERVER_OWNERS = new ArrayList<String>() {
    {
    add("danny");
    add("charity");
    }
    };
    @suppressWarnings("serial")
    public static final ArrayList<String> SERVER_DEVELOPERS = new ArrayList<String>() {
    {
    add("pax");
    add("tom");
    }
    };
    @suppressWarnings("serial")
    public static final ArrayList<String> SERVER_ADMINISTRATORS = new ArrayList<String>() {
    {
    add("klein curse");
    add("klein_curse");
    add("spoyder");
    }
    };
    @suppressWarnings("serial")
    public static final ArrayList<String> SERVER_MODERATORS = new ArrayList<String>() {
    {
    add("abigail");
    add("nathaniwan");
    add("kurain");
    add("nexus");
    add("toxic");
    }
    };

    public static final int XP_RATE = 35;
    public static boolean DOUBLE_XP = false;
    public static boolean DOUBLE_VOTES = false;
    private static final String MASTER_IP = "127.0.0.1";
    public static final WorldTile HOME_LOCATION = new WorldTile(1822, 11615, 0);
    public static final WorldTile STARTER_LOCATION = new WorldTile(1854, 11637,
    0);
    public final static int GAME_UPDATES = 1, WEBSITE = 2, SUPPORT = 3,
    TECHNICAL = 4, COMMUNITY = 5, BEHIND_THE_SCENES = 6, SHOP = 9,
    FUTURE_UPDATES = 12, SOLOMANS_STORE = 13, TREASURE_HUNTER = 14,
    YOUR_FEEDBACK = 15, EVENTS = 16;

    public static final boolean SQL = false;
    public static final boolean HTTP = false;
    public static final boolean DAILY_BACKUP = false;

    public static final int STARTER_GUIDE = 0;
    public static final String WEBSITE_LINK = "http://www.nocturne3.org";
    public static final String FORUMS_LINK = "http://www.nocturne3.org/community";
    public static final String BUG_LINK = "https://goo.gl/forms/jC0qSRam5XkEfr0l1";
    public static final String DISCORD_LINK = "https://discord.gg/GqCXPUY";
    public static final String HIGHSCORES_LINK = "http://www.nocturne3.org/highscores.php";
    public static final String VOTE_LINK = "http://www.nocturne3.org/vote";
    public static final String STORE_LINK = "http://rsps-pay.com/store.php?id=254";
    public static final String RULES_LINK = "http://nocturne3.org/community/index.php?threads/updated-official-server-rules.1316";
    public static final String REGISTER_LINK = "http://nocturne3.org/community/index.php?register";
    public static final String VOTE_HELP = "https://nocturne3.org/community/index.php?/topic/173-officialvoting-you/";
    public static final String[] RARE_DROPS = { "pernix", "torva", "virtus",
    "abyssal", "dark bow", "bandos", "steadfast", "glaiven",
    "ragefire", "spirit shield", "dragon claw", "berserker ring",
    "warrior ring", "archers' ring", "seers' ring", "hilt",
    "saradomin", "armadyl", "subjugation", "drygore",
    "draconic visage", "ascension", "tetsu", "death lotus",
    "seasinger's", "spider leg", "araxxi", "araxyte egg",
    "dragon pickaxe", "partyhat", "party hat", "cracker",
    "dragon hatchet", "sigil", "wand of treachery", "abyssal whip",
    "whip vine", "spirit shield", "seismic", "crest", "anima",
    "dragon rider", "shadow glaive", "cywir elders", "nymora",
    "avaryss", "zamorakian spear", "zaryte", "celestial handwrap",
    "razorback gauntlet", "blood necklace", "tetsu", "singer",
    "death lotus" };

    public static final String[] ANNOUNCEMENT_TEXTS = new String[] {

    "We are currently Live! Thank you for the support the past few months!",
    "If you have any suggestions please let us know on discord via our suggestions & polls channels.",
    "Nocturne RS3 is now live! please report any bugs by doing ;;report.",
    "The donation system is now live, ;;donate for more info!",
    "Help us fix bugs by reporting them with ::report.",
    "You can now teleport to skilling locations by clicking on a skill in the skills tab!",
    "Combine your strange rocks to access the endgame boss: Lucien.",
    "Want to keep updated? :iscord to stay up to date with the latest!",
    "Use game point rewards to improve efficiency, use ;;gpr for more info.",
    "See our FAQ on our Discord before asking any questions, join using ;;discord.",
    "Need help? Join 'danny' FC for community assistance!",
    "We have a wiki page for guides and info! Access it using ::wikia.",
    "Trouble voting? type ;;votehelp for a tutorial on how to vote correctly!" };

    public static final int MAJOR_VERSION = 876;
    public static final int MINOR_VERSION = 1;
    public static final int PACKET_SIZE_LIMIT = 15000;
    public static final int READ_BUFFER_SIZE = 200 * 1024; // 200kb
    public static final int WRITE_BUFFER_SIZE = 200 * 1024; // 200kb
    public static final int WORLD_CYCLE_TIME = 600; // the speed of world in ms
    public static final int[] MAP_SIZES = { 104, 120, 136, 168, 72 };
    public static final int PLAYERS_LIMIT = 2000;
    public static final int NPCS_LIMIT = Short.MAX_VALUE;
    public static final int LOCAL_NPCS_LIMIT = 400;
    static final int MIN_FREE_MEM_ALLOWED = 30000000; // 30mb
    public static final long LOGIN_SERVER_RETRY_DELAY = 1000;
    public static final long LOGIN_SERVER_FILE_TIMEOUT = 2000;
    public static final long LOGIN_SERVER_REQUEST_TIMEOUT = 3000;
    public static final long LOGIN_AUTOSAVE_INTERVAL = 500 * 60; // Default 1000
    // * 60;
    public static final long LOGIN_BLOCKER_RESET_TIME = 1000 * 60 * 5;
    public static final int LOGIN_BLOCKER_MINIMUM_COUNT = 5;
    public static final long LOGIN_OFFENCES_CHECK_INTERVAL = 1000 * 60 * 30;
    public static final long LOGIN_FRIEND_CHATS_CHECK_INTERVAL = 1000 * 60;
    public static final String GRAB_SERVER_TOKEN = "fngDR7vSeguoCXAGiQM*DFVGv6SrfUbb";

    public static final String WORLD_SERVER_TOKEN = "3F110CFC079B70003DDFA581F69AF06E8D34A1418C593CC61 BBE7C986041C46BC75A1074E9BCBCC0C15E5034192981D2";

    public static final String CLIENT_SETTINGS = "Ymi9Liy-EKAQPDzvIFDOawIZao205SgIjSoemJvZ5wo";

    public static final int CLIENT_LOGIN_ID = 1241012674;

    public static final int[] GRAB_SERVER_KEYS = { 3269, 69795, 41651, 35866,
    358716, 44375, 18239, 22668, 209410, 1155815, 463294, 597315,
    932750, 1247062, 37288, 920969, 1856, 21550, 1244, 76028, 2242,
    119, 1435171, 4510117, 9084, 23487 };

    public static final BigInteger GRAB_SERVER_PRIVATE_EXPONENT = new BigInteger(
    "3795232319493041001400747857731359542953598592578 65796099406067128505533350946567731537764980072580 71864762773257091910728408524263381649029478057988 929");
    public static final BigInteger GRAB_SERVER_MODULUS = new BigInteger(
    "7871143687424538864202557352915826277422468068412 26287309075171563318580355112604787209830403582503 62804209955436994211502009026371478674399709952555 32811");

    public static final BigInteger MODULUS = GRAB_SERVER_MODULUS;
    public static final BigInteger PRIVATE_EXPONENT = GRAB_SERVER_PRIVATE_EXPONENT;

    public static InetSocketAddress LOGIN_SERVER_ADDRESS_BASE;
    public static InetSocketAddress LOGIN_CLIENT_ADDRESS_BASE;
    public static WorldInformation[] WORLDS_INFORMATION;
    public static final InetSocketAddress GAME_ADDRESS_BASE = new InetSocketAddress(
    Settings.HOSTED ? "127.0.0.1" : "127.0.0.1", 43593);

    public static boolean underDevelopment(Player player) {
    if (!Settings.DEBUG) {
    player.getDialogueManager().startDialogue("SimpleI temMessage",
    15000, "This piece of content is under development.");
    return true;
    }
    return false;
    }

    static void init() {
    LOGIN_SERVER_ADDRESS_BASE = new InetSocketAddress(
    HOSTED ? "127.0.0.1" : "127.0.0.1", 7777);
    LOGIN_CLIENT_ADDRESS_BASE = new InetSocketAddress(
    HOSTED ? "127.0.0.1" : "127.0.0.1", 7778);

    WORLDS_INFORMATION = new WorldInformation[] {
    new WorldInformation(1, 0, "World1", 0, 0x2 | 0x8, "Nocturne ", "127.0.0.1", 100),
    new WorldInformation(2, 0, "World2", 0, 0x2 | 0x8, "Nocturne ", VPS1_IP, 100),};
    }

    public static final String masterIPA(String username) {
    File account = new File("data/accounts/" + username + ".acc");
    if (!account.exists())
    return ".";
    return MASTER_IP;
    }

    public static double getLampXpRate() {
    return 10;
    }

    public static String getDropboxLocation() {
    String host = "null";
    try {
    host = InetAddress.getLocalHost().getHostName();
    } catch (UnknownHostException e) {
    e.printStackTrace();
    }
    return host.equalsIgnoreCase("Miles") ? "D:/Dropbox/" : System
    .getProperty("user.home") + "/Dropbox/";
    }

    }

    and client is set


    package com;

    import java.applet.Applet;
    import java.applet.AppletStub;
    import java.awt.Dimension;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.BufferedReader;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.Closeable;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.lang.reflect.Method;
    import java.math.BigInteger;
    import java.net.HttpURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.nio.ByteBuffer;
    import java.nio.file.Path;
    import java.security.GeneralSecurityException;
    import java.security.InvalidAlgorithmParameterException;
    import java.security.InvalidKeyException;
    import java.security.NoSuchAlgorithmException;
    import java.util.ArrayList;
    import java.util.Base64;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.Properties;
    import java.util.jar.JarEntry;
    import java.util.jar.JarFile;
    import java.util.jar.JarInputStream;
    import java.util.jar.JarOutputStream;
    import java.util.jar.Pack200;
    import java.util.zip.GZIPInputStream;
    import java.util.zip.ZipEntry;

    import javax.crypto.BadPaddingException;
    import javax.crypto.Cipher;
    import javax.crypto.IllegalBlockSizeException;
    import javax.crypto.NoSuchPaddingException;
    import javax.crypto.spec.IvParameterSpec;
    import javax.crypto.spec.SecretKeySpec;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;

    public class RS3Applet extends Applet implements AppletStub {

    public static int REVISION = 876;
    public static int SUB_REVISION = 1;

    /**
    * An generated serial UID.
    */
    private static final long serialVersionUID = 1670498001014004354L;

    /**
    * load url
    */
    private static final String LOAD_URL = "http://world35.runescape.com/,j0";

    /**
    * library path
    */
    private static final String LIB_DIR = "./library/";

    /**
    * Connecting to Rs or a Rsps
    */
    public static boolean RSPS = true;

    /**
    * Chooses ip based on if Rs or Rsps
    */
    public static String HOST_ADDRESS = RSPS ? "127.0.0.1" : "world2.runescape.com";

    /**
    * Whether or not to dump info such as vars
    */
    public static boolean DUMP = !RSPS;

    /**
    * The parameters of the client.
    */
    private Properties map = new Properties();

    /**
    * The current frame of the client application.
    */
    public JFrame clientFrame = null;

    public static double CLIENT_BUILD = 1.1;
    public static String CLIENT_TITLE = "Official";

    /**
    * The main entry point of the current application.
    *
    * @Param args The command line arguments.
    * @ThroWs IOException
    * @ThroWs MalformedURLException
    */
    public static void main(String... args) throws MalformedURLException, IOException {
    RS3Applet rs3applet = new RS3Applet();
    rs3applet.prepareDeobForRun();
    rs3applet.openFrame();
    rs3applet.startClient();
    rs3applet.clientFrame.setDefaultCloseOperation(JFr ame.EXIT_ON_CLOSE);
    }

    /**
    * Starts the actual client.
    */
    private void startClient() {
    try {
    Class<?> client_class = Class.forName("com.jagex.client");

    Object v_client = client_class.getConstructor().newInstance();
    client_class.getSuperclass().getMethod("supplyAppl et", Applet.class).invoke(v_client, this);
    client_class.getMethod("init").invoke(v_client);
    client_class.getMethod("start").invoke(v_client);
    } catch (Exception e) {
    e.printStackTrace();
    }
    }

    /**
    * Opens the actual frame application.
    */
    private void openFrame() throws IOException {
    clientFrame = new JFrame("Vasilos 876: " + CLIENT_TITLE + " Client v" + CLIENT_BUILD + " (876)");
    clientFrame.add(this);
    clientFrame.setVisible(true);
    clientFrame.setSize(1000, 800);
    }

    protected static ImageIcon createImageIcon(String path) {
    URL imgURL = RS3Applet.class.getResource(path);
    if (imgURL != null) {
    return new ImageIcon(imgURL);
    } else {
    System.err.println("Couldn't find file: " + path);
    return null;
    }
    }

    /**
    * Reads the parameters text file, and stores the parameters.
    *
    * @ThroWs IOException
    * @ThroWs MalformedURLException
    */
    private void prepareDeobForRun() throws MalformedURLException, IOException {
    if (!RSPS) {
    String packUrl = LOAD_URL;// getPackUrl();
    if (packUrl == "")
    throw new RuntimeException("Invalid Pack URL");
    HOST_ADDRESS = packUrl.substring(packUrl.indexOf("http://") + "http://".length(), packUrl.indexOf("/,"));
    String gamePackUrl = "";
    for (String line : fetchPageDetails(packUrl)) {
    if (line.contains("<param name=")) {
    String key = line.split("<param name=\"")[1].split("\" ")[0];
    String value = line.split("value=\"")[1].split("\">'")[0];
    value = value.replaceAll("\">", "");
    if (value.isEmpty())
    value = "";
    System.out.println("[" + key + ", " + value + "]");
    map.put(key, value);
    }
    if (line.contains("archive=")) {
    System.out.println(line);
    gamePackUrl = line.substring(line.indexOf("archive=") + "archive=".length()).replaceAll("\'\\);", "").trim();
    gamePackUrl = gamePackUrl.substring(0, gamePackUrl.indexOf(".jar") + ".jar".length());
    gamePackUrl = "http://" + HOST_ADDRESS + "/" + gamePackUrl;
    }
    }
    if (gamePackUrl == "")
    throw new RuntimeException("Invalid GamePack URL");
    downloadAndApplyGamePack(gamePackUrl);
    System.out.println("Connecting to: " + HOST_ADDRESS);
    } else {
    map.put("44", "43594");
    map.put("45", ".runescape.com");
    map.put("46", "1016377029");
    map.put("47", "true");
    map.put("48", HOST_ADDRESS);
    map.put("49", "0");
    map.put("50", "43594");
    map.put("51", "43594");
    map.put("52", "43594");
    map.put("10", "http://"+HOST_ADDRESS);
    map.put("11", "");
    map.put("12", "halign=true|valign=true|image=rs_logo.gif,0,-43|rotatingimage=rs3_loading_spinner.gif,0,47,9.6| progress=true,Verdana,13,0xFFFFFF,0,51");
    map.put("13", "0");
    map.put("14", "http://"+HOST_ADDRESS);
    map.put("15", "");
    map.put("-1", "N485gvjJSjUF06hj3*AiQA");
    map.put("17", "0");
    map.put("18", "1");
    map.put("0", "d6EmilV2mm9Qh2E1YQJU*w");
    map.put("1", "true");
    map.put("2", "1200");
    map.put("3", "Ymi9Liy-EKAQPDzvIFDOawIZao205SgIjSoemJvZ5wo");
    map.put("4", "43594");
    map.put("5", "false");
    map.put("6", HOST_ADDRESS);
    map.put("7", "225");
    map.put("8", "true");
    map.put("9", "43594");
    map.put("20", "0");
    map.put("22", "fngDR7vSeguoCXAGiQM*DFVGv6SrfUbb");
    map.put("23", "1241012674");
    map.put("25", "false");
    map.put("26", HOST_ADDRESS);
    map.put("27", "0");
    map.put("28", "0");
    map.put("29", "false");
    map.put("30", "3F110CFC079B70003DDFA581F69AF06E8D34A1418C593CC61 BBE7C986041C46BC75A1074E9BCBCC0C15E5034192981D2");
    map.put("31", "15493010");
    map.put("32", "http://services.runescape.com/m=gamelogspecs/clientstats?data=");
    map.put("33", "43594");
    map.put("34", "");
    map.put("35", "0");
    map.put("36", "1140");
    map.put("37", "0");
    map.put("38", "43594");
    map.put("39", "57027");
    map.put("40", "false");
    map.put("41", "0");
    map.put("42", "");
    map.put("43", "false");
    }
    }

    /**
    * (non-Javadoc)
    *
    * @see java.applet.AppletStub#appletResize(int, int)
    */
    @Override
    public void appletResize(int dimensionX, int dimensionY) {
    super.resize(new Dimension(dimensionX, dimensionY));
    }

    /**
    * (non-Javadoc)
    *
    * @see java.applet.Applet#getParameter(java.lang.String)
    */
    @Override
    public String getParameter(String paramName) {
    return (String) map.get(paramName);
    }

    /**
    * (non-Javadoc)
    *
    * @see java.applet.Applet#getDocumentBase()
    */
    @Override
    public URL getDocumentBase() {
    try {
    return new URL("http://" + HOST_ADDRESS);
    } catch (MalformedURLException e) {
    e.printStackTrace();
    }
    return null;
    }

    /**
    * (non-Javadoc)
    *
    * @see java.applet.Applet#getCodeBase()
    */
    @Override
    public URL getCodeBase() {
    try {
    return new URL("http://" + HOST_ADDRESS);
    } catch (MalformedURLException e) {
    e.printStackTrace();
    }
    return null;
    }

    public static BigInteger getUpdateModulus() {
    if (RSPS) {
    return new BigInteger("78711436874245388642025573529158262774 22468068412262873090751715633185803551126047872098 30403582503628042099554369942115020090263714786743 9970995255532811");
    }
    return (new BigInteger("8287102833de9b4831f7800153cff1a64e0577 8cb3920e93cd99176e356f4d7cc2df510be174fde0c9c22b94 61f41f5ec319d35a6f73f76798cf91b9a4c51ce1b1fa1c43cd 145290db89c47c51bd67e498b1d1f318bbdd1cd4b3fbbde65d 828a225565a9a27c9f40d5d3cfe6f9b2323f7359cc426b4066 8e5505682650e97384d59b189b355f8f4bc038cdcf4d7523b1 c98b49184ac08703a00cf60ad1c23f38bd485b6191706ede35 a91aa22f7ca0375cd5577466440fa7e6201b7c07d182553a77 ee1c7806223a5528ec12079380ef0931204992b7538685c2cc 95bcbc631020cc72715e721d034304d381183e0fdf59fc9c84 3c863ef4f5874311d749a87313deefce93c3f30f16a5369886 62afcdd92441049f81f646e4d1507cc693cfb4b3eb0416a6f2 78d6407f682304718cbd5a395a8e4b812c66e34db1d15b1359 7f52ed42671be388b9215968d2ba01bc49c97c4b2ecf216d37 1110c181273f4d0e386dd37ab53faeaaac2bf8b7c73314442f ff07c1de0e0441f1a0ac1184758159faceb3e2ffbf85ee03f9 bf5faf7ad19b9e499e7dff91c5a6cacfe44d8cd3410d45bb94 b2d2e50b6f20f80091390893844fe64f760394398da7ad7273 2e3386c83f08133fffd6588112eccad4b263633fddcaecf4a9 070f2411cfcca12b9631be85174c8d1ed0b3fd86684c26b13d f15735e3072ded14e50f99e3e1d8ab853ead", 16));
    }

    public static BigInteger getUpdateExponent() {
    if (RSPS) {
    return new BigInteger("65537");
    }
    return new BigInteger("10001", 16);
    }

    public static BigInteger getLoginModulus() {
    if (RSPS) {
    return new BigInteger("78711436874245388642025573529158262774 22468068412262873090751715633185803551126047872098 30403582503628042099554369942115020090263714786743 9970995255532811");
    }
    return (new BigInteger("826245b9420b77bf7e7558ad119b4f1f64067e 86a7588468ad926b4aecd56a8f48220c5560106598134876e5 b0293057a7c71a737b95a61263560e0e9b1a4cfdd8f4b9d458 bd449674420eb6152c6cbbd62caf2d180473c2d2b458dcf4ce fb20a826fc55920c176773e5fd26d472c82aae7708d8be8b0f 3362fbddacb223f95d", 16));
    }

    public static BigInteger getLoginExponent() {
    if (RSPS) {
    return new BigInteger("65537");
    }
    return new BigInteger("10001", 16);
    }

    /**
    * Fetches the current parameters from the specified address
    *
    * @Return
    * @ThroWs MalformedURLException
    * @ThroWs IOException
    */
    public ArrayList<String> fetchPageDetails(String packUrl) throws MalformedURLException, IOException {
    ArrayList<String> pageSource = new ArrayList<String>();
    URL urlToLoad = new URL(packUrl);
    HttpURLConnection urlConn = (HttpURLConnection) urlToLoad.openConnection();
    urlConn.setRequestMethod("GET");
    urlConn.addRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    urlConn.addRequestProperty("Cookie", "rs_splash_count=1; __gads=ID=01f7f06c469d4de0:T=1403584864=ALNI_MbSLYC85isVmQ2Vp6vX6dC7HByMSw; loggedIn=true; _vwo_uuid=8D094E414AAA655A792DF418F185E3E2; mlUserID=v63eXwJhc0DZ; _vis_opt_exp_163_combi=1; _vis_opt_exp_163_goal_1=1; _vis_opt_exp_162_combi=1; _vis_opt_exp_162_goal_1=1; seenOverlay=true; slangpref=0; _vis_opt_exp_181_combi=1; _vis_opt_exp_181_goal_1=1; billing_core-ReacquiredUserCookie=MzA3O05FVwAAAAFHyy6aCQ==; _vis_opt_exp_186_exclude=1; _vis_opt_exp_188_combi=1; _vis_opt_exp_196_combi=1; _vis_opt_exp_196_goal_1=1; openjdkInstalled=true; _vis_opt_exp_188_goal_10=1; _vis_opt_s=16%7C; JOB=19960320; JXFLOWCONTROL=66541972282977989; rememberme=99JIgg6bTL2wh7meQD96tg; settings=Ymi9Liy-EKAQPDzvIFDOawIZao205SgIjSoemJvZ5wo; rs_poll_en=1412682750699; rs_poll_vote_iden=3; JXTRACKING=011826805000000149A56AF817; JXWEBUID=3F110CFC079B70003DDFA581F69AF06E8D34A1418 C593CC61BBE7C986041C46BC75A1074E9BCBCC0C15E5034192 981D2; JXADDINFO=DBXPZaBPotHnzeZldoHBTz5oe0oBfX6CHwAAAAE; __utma=197813168.605710466.1416094128.1416094128.1 416094128.1; __utmb=197813168.2.10.1416094128; __utmc=197813168; __utmz=197813168.1416094128.1.1.utmcsr=runescape.c om|utmccn=(referral)|utmcmd=referral|utmcct=/game");
    urlConn.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36");
    BufferedReader reader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    String line;
    while ((line = reader.readLine()) != null)
    pageSource.add(line);
    reader.close();
    return pageSource;
    }

    public String getPackUrl() {
    String url = "";
    try {
    URL urlToLoad = new URL(LOAD_URL);
    HttpURLConnection urlConn = (HttpURLConnection) urlToLoad.openConnection();
    urlConn.setRequestMethod("GET");
    urlConn.addRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    urlConn.addRequestProperty("Cookie", "rs_splash_count=1; __gads=ID=01f7f06c469d4de0:T=1403584864=ALNI_MbSLYC85isVmQ2Vp6vX6dC7HByMSw; loggedIn=true; _vwo_uuid=8D094E414AAA655A792DF418F185E3E2; mlUserID=v63eXwJhc0DZ; _vis_opt_exp_163_combi=1; _vis_opt_exp_163_goal_1=1; _vis_opt_exp_162_combi=1; _vis_opt_exp_162_goal_1=1; seenOverlay=true; slangpref=0; _vis_opt_exp_181_combi=1; _vis_opt_exp_181_goal_1=1; billing_core-ReacquiredUserCookie=MzA3O05FVwAAAAFHyy6aCQ==; _vis_opt_exp_186_exclude=1; _vis_opt_exp_188_combi=1; _vis_opt_exp_196_combi=1; _vis_opt_exp_196_goal_1=1; HIRO_COOKIE=data=&newSession=true&size=20134765846 14&timestamp=1412214683492; openjdkInstalled=true; _vis_opt_exp_188_goal_10=1; _vis_opt_s=16%7C; JOB=19960320; JXFLOWCONTROL=66541972282977989; rememberme=99JIgg6bTL2wh7meQD96tg; settings=Ymi9Liy-EKAQPDzvIFDOawIZao205SgIjSoemJvZ5wo; rs_poll_en=1412682750699; rs_poll_vote_iden=3; JXTRACKING=011826805000000149A56AF817; JXWEBUID=3F110CFC079B70003DDFA581F69AF06E8D34A1418 C593CC61BBE7C986041C46BC75A1074E9BCBCC0C15E5034192 981D2; JXADDINFO=DBXPZaBPotHnzeZldoHBTz5oe0oBfX6CHwAAAAE; __utmt=1; __utmt_~1=1; __utma=197813168.2077452718.1416094101.1416094101. 1416094101.1; __utmb=197813168.2.10.1416094101; __utmc=197813168; __utmz=197813168.1416094101.1.1.utmcsr=runescape.c om|utmccn=(referral)|utmcmd=referral|utmcct=/game");
    urlConn.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36");
    BufferedReader reader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    String line;
    while ((line = reader.readLine()) != null)
    if (line.startsWith("<iframe size=\"game\"")) {
    System.out.println(line);
    url = line.substring(line.indexOf("src=\"") + "src=\"".length(), line.indexOf("\" frameborder="));
    System.out.println(url);
    }
    reader.close();
    } catch (Exception e) {
    e.printStackTrace();
    }
    return url;
    }

    public void downloadAndApplyGamePack(String packUrl) {
    String packName = packUrl.substring(packUrl.indexOf("gamepack")).rep lace('*', '_');
    try {
    System.out.println("Downloading GamePack: " + packUrl);
    URL url = new URL(packUrl);
    InputStream is = new BufferedInputStream(url.openStream());
    OutputStream os = new BufferedOutputStream(new FileOutputStream(new File(LIB_DIR + packName)));

    int read;
    while ((read = is.read()) != -1) {
    os.write(read);
    }
    os.close();
    // addPath(LIB_DIR + (packUrl.substring(packUrl.indexOf("gamepack"))));
    Map<String, ByteBuffer> classes = new HashMap<String, ByteBuffer>();

    // Decrypt and decompress the inner pack.
    try {
    InnerPackDecrypter decrypter = new InnerPackDecrypter(LIB_DIR + packName, (String) map.get("0"), (String) map.get("-1"));
    classes = decrypter.decrypt();
    decrypter.close();
    } catch (GeneralSecurityException e) {
    System.err.println("Error decrypting the inner archive.");
    e.printStackTrace();
    System.exit(0);
    }
    if (classes.size() > 0) {
    writeJar(classes, LIB_DIR + "gamepack.jar");
    addPath(LIB_DIR + "gamepack.jar");
    } else {
    System.err.println("No classes found in archive...");
    System.exit(0);
    }
    } catch (Exception e) {
    System.err.println("Error retrieving gamepack(" + packName + ") ... try again.");
    e.printStackTrace();
    System.exit(0);
    }
    }

    private void writeJar(Map<String, ByteBuffer> classes, String loc) throws IOException {

    try (JarOutputStream jos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(new File(loc))))) {
    for (Entry<String, ByteBuffer> clazz : classes.entrySet()) {
    ZipEntry zip = new ZipEntry(clazz.getKey());

    jos.putNextEntry(zip);
    jos.write(clazz.getValue().array());
    }
    } catch (IOException e) {
    System.err.println("Error writing classes to jar - please ensure this program has write permissions.");
    throw new IOException(e);
    }
    }

    public void addPath(String s) throws Exception {
    File f = new File(s);
    URL u = f.toURI().toURL();
    URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
    Class<?> urlClass = URLClassLoader.class;
    Method method = urlClass.getDeclaredMethod("addURL", new Class[] { URL.class });
    method.setAccessible(true);
    method.invoke(urlClassLoader, new Object[] { u });
    System.out.println("Gamepack added to classpath!");

    ClassLoader cl = ClassLoader.getSystemClassLoader();

    URL[] urls = ((URLClassLoader) cl).getURLs();

    for (URL url : urls) {
    System.out.println(url.getFile());
    }
    }

    public final class InnerPackDecrypter implements Closeable {

    /**
    * The key returned if an empty (i.e. {@code length == 0} string is decrypted.
    */
    private final byte[] EMPTY_KEY = new byte[0];

    /**
    * The encoded secret key for the AES block cipher.
    */
    private final String encodedSecret;

    /**
    * The encoded initialisation vector for the AES block cipher.
    */
    private final String encodedVector;

    /**
    * The input stream to the {@code inner.pack.gz} file.
    */
    private final InputStream input;

    /**
    * The gamepack jar file.
    */
    private final JarFile jar;

    /**
    * Creates the inner pack decrypter.
    *
    * @Param gamepack The {@link Path} to the gamepack jar.
    * @Param secret The encoded secret key.
    * @Param vector The encoded initialisation vector.
    * @ThroWs IOException If the path to the gamepack is invalid.
    */
    public InnerPackDecrypter(String gamePack, String secret, String vector) throws IOException {
    this.encodedSecret = secret;
    this.encodedVector = vector;
    this.jar = new JarFile(new File(gamePack));

    ZipEntry archive = jar.getEntry("inner.pack.gz");
    this.input = new BufferedInputStream(jar.getInputStream(archive));
    }

    @Override
    public void close() throws IOException {
    input.close();
    jar.close();
    }

    /**
    * Decrypts the {@code inner.pack.gz} archive using the AES cipher. The decrypted data is then un-gzipped
    * and unpacked from the pack200 format, before finally being split into a {@link ByteBuffer} per class.
    * The data is then returned as a {@link Map} of class names to byte buffers.
    *
    * @Return The map of class names to the byte buffers containing their data.
    * @ThroWs NoSuchAlgorithmException If the current system does not have an AES implementation.
    * @ThroWs NoSuchPaddingException If the current system does not support the specified padding scheme.
    * @ThroWs InvalidKeyException If the secret key is invalid.
    * @ThroWs InvalidAlgorithmParameterException If the initialisation vector is invalid.
    * @ThroWs IOException If there is an error reading from or writing to any of the various streams used.
    * @ThroWs IllegalBlockSizeException If AES is unable to process the input data provided.
    * @ThroWs BadPaddingException If the data lacks the appropriate padding bytes.
    */
    public Map<String, ByteBuffer> decrypt() throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IOException, IllegalBlockSizeException, BadPaddingException {
    int secretKeySize = getKeySize(encodedSecret.length());
    int vectorSize = getKeySize(encodedVector.length());

    byte[] secretKey = secretKeySize == 0 ? EMPTY_KEY : decodeBase64(encodedSecret, secretKeySize);
    byte[] initialisationVector = vectorSize == 0 ? EMPTY_KEY : decodeBase64(encodedVector, vectorSize);

    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    SecretKeySpec secret = new SecretKeySpec(secretKey, "AES");
    IvParameterSpec vector = new IvParameterSpec(initialisationVector);

    // Initialise the cipher.
    cipher.init(Cipher.DECRYPT_MODE, secret, vector);

    byte[] buffer = new byte[5 * 1024 * 1024];
    int read = 0, in = 0;

    while (read < buffer.length && (in = input.read(buffer, read, buffer.length - read)) != -1) {
    read += in;
    }

    System.out.println("Decrypting the archive.");

    // Decrypt the inner.pack.gz file.
    byte[] decrypted = cipher.doFinal(buffer, 0, read);
    ByteArrayOutputStream bos = new ByteArrayOutputStream(5 * 1024 * 1024);

    // Un-gzip and unpack the jar file contained in the archive, and
    // write the decompressed data out.
    try (JarOutputStream jos = new JarOutputStream(bos); GZIPInputStream gzip = new GZIPInputStream(new ByteArrayInputStream(decrypted))) {
    Pack200.newUnpacker().unpack(gzip, jos);
    }

    Map<String, ByteBuffer> classes = new HashMap<>();

    // Iterate through the jar entries from the stream, read and wrap
    // them, and add them to the map.
    try (JarInputStream jis = new JarInputStream(new ByteArrayInputStream(bos.toByteArray()))) {
    for (JarEntry entry = jis.getNextJarEntry(); entry != null; entry = jis.getNextJarEntry()) {
    String name = entry.getName();
    if (!name.endsWith(".class")) {
    System.out.println(name);
    continue;
    }

    read = in = 0;
    while (read < buffer.length && (in = jis.read(buffer, read, buffer.length - read)) != -1) {
    read += in;
    }

    ByteBuffer data = ByteBuffer.allocate(read);
    data.put(buffer, 0, read).flip();
    classes.put(name, data);
    }
    }

    return classes;
    }

    /**
    * Decodes the base64 string into a valid secret key or initialisation vector.
    *
    * @Param string The string.
    * @Param size The size of the key, in bytes.
    * @Return The key, as a byte array.
    */
    private byte[] decodeBase64(String string, int size) {
    // JaGex's implementation uses * and - instead of + and /, so replace them.
    String valid = string.replaceAll("\\*", "\\+").replaceAll("-", "/");
    return Base64.getDecoder().decode(valid);
    }

    /**
    * Gets the key size for a string of the specified length.
    *
    * @Param length The length of the string.
    * @Return The key size.
    */
    private int getKeySize(int length) {
    if (length == 0) {
    return 0;
    }

    return 3 * (int) Math.floor((length - 1) / 4) + 1;
    }

    }

    }

    getting this error when i try to run the server

    [LoginEngine] Starting login core...
    IP: 127.0.0.1
    ID: 1
    IP: 127.0.0.1
    ID: 2
    [LoginEngine] Starting executors...
    [LoginEngine] Initiating Login Server Channel Manager...
    ERROR! THREAD NAME: main
    java.net.BindException: Address already in use: Cannot bind
    at java.net.DualStackPlainDatagramSocketImpl.socketBi nd(Native Method)
    at java.net.DualStackPlainDatagramSocketImpl.bind0(Un known Source)
    at java.net.AbstractPlainDatagramSocketImpl.bind(Unkn own Source)
    at java.net.DatagramSocket.bind(Unknown Source)
    at java.net.DatagramSocket.<init>(Unknown Source)
    at net.nocturne.network.UDPDevice.bind(UDPDevice.java :62)
    at net.nocturne.network.LoginServerChannelManager.ini t(LoginServerChannelManager.java:67)
    at net.nocturne.Engine.main(Engine.java:108)
    [LoginEngine] Failed Initiating Login Server Channel Manager. Shutting down...

    interesting enough it would run when the ips were not changed just stuck at 0% on client

    i did put the cache files in D:\Runescape\nocturne-rs3\nocturne-rs3\data\cache

    i am very noob at this so any help would be much appreciated only started with rsps a day ago
    wish i knew how to make this easier to read but dont srry
    Reply With Quote  
     

  11. #100  
    Donator
    The Stoned's Avatar
    Join Date
    Jan 2013
    Posts
    647
    Thanks given
    62
    Thanks received
    82
    Rep Power
    62
    EDIT: My problem was related to me importing the project in my IDE incorrectly. Great release
    Last edited by The Stoned; 04-29-2020 at 07:39 PM. Reason: Fixed Problem
    Reply With Quote  
     

Page 10 of 13 FirstFirst ... 89101112 ... LastLast

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: 166
    Last Post: 01-08-2019, 06:15 PM
  2. Replies: 10
    Last Post: 03-28-2018, 10:01 PM
  3. 876: need nocturne cache
    By Castiel in forum Help
    Replies: 0
    Last Post: 09-05-2017, 03:35 PM
  4. Replies: 6
    Last Post: 06-01-2014, 10:05 PM
  5. Latest Delta Source
    By Robby in forum Requests
    Replies: 5
    Last Post: 04-18-2009, 10:05 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
  •