Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • hexedss1: Anyone would like to help on client side got a variable declartion Error
      August 15, 2018, 09:06:30 PM
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM

    Author Topic: Nyphrex - 530 Emulation Project  (Read 6528 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #100 on: October 15, 2014, 09:35:31 PM »
    This isn't dead, ryley is helping but I moved to 550 because I had a deob of it and yeah. Here's just a screenie of the new base:

    Runescape Gambling

    OfflineElrick

    • Member
    • ****
    • Posts: 1,132
    • Thanks: +0/-0
      • View Profile
      • Evelus
    Re: Nyphrex - 530 Emulation Project
    « Reply #101 on: October 17, 2014, 09:01:36 PM »
    Good stuff, I had been wondering about this project.
    http://www.moparscape.org/smf/index.php/topic,639149.0.html
    Support adding the
    (click to show/hide)
    Runescape Gambling

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #102 on: October 17, 2014, 09:03:19 PM »
    Who did I make a bet with about how long it would take for something major to change about the project? You owe me 20 bucks.
    Runescape Gambling

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #103 on: October 18, 2014, 04:30:55 AM »
    Like it matters to you, note how much I did for what you're working with and get little to no respect from you about it.

    OfflineRuby

    • Member
    • ****
    • *
    • *
    • Posts: 6,836
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #104 on: October 18, 2014, 07:09:30 AM »
    SHOTS








    FIRED
    Shreddology.

    Toms guilty pleasure: http://i.imgur.com/bmWqw7v.png

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #105 on: October 18, 2014, 12:57:45 PM »
    Not really.

    https://bitbucket.org/sinisoul/cobalt

    Anyway, I'm moving over to my own base for various reasons. One, I wanted to be able to normalize packets before they were read by a decoder and I didn't want to have to fiddle with the architecture of other bases to do this. Two, I wanted to incorporate the idea of environments (production, testing, development) along with plug and go services. This wouldn't drastically change the way say ScapeEmu would look but I wanted to do it from scratch. I swapped the revision over to #550. Note that there's a lot of things in the source that aren't final and actually need proper naming (Aka, StreamCodec). That'll gradually get better with time.

    I will be incorporating the scripting system in the old post.

    Here's an example of packet normalizing:


    Code: Lua
    1. -- [ byte, short ] --> [ short, byte ]
    2. codecs.bind('normalize', frames.login,function(codec)
    3.     codec.read(type.byte,1)
    4.     codec.read(type.short,0)
    5. end)
    6.  

    OfflineLothy

    • Member
    • ****
    • *
    • *
    • Posts: 7,006
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #106 on: October 18, 2014, 02:59:34 PM »
    What's the rationale for preprocessing the packets? I can't think of a benefit that justifies it, unless I'm not clear on what you're doing.
    <&Speljohan_> i wouldnt want to live in a society where Mopman isnt monitored 24/7

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #107 on: October 18, 2014, 03:10:33 PM »
    What's the rationale for preprocessing the packets? I can't think of a benefit that justifies it, unless I'm not clear on what you're doing.

    Consistency. I wrote an article earlier proving incoming and outgoing packets use an obfuscated id. To make my life easier I just normalize them

    OfflineLothy

    • Member
    • ****
    • *
    • *
    • Posts: 7,006
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #108 on: October 18, 2014, 03:38:51 PM »
    What do you mean by normalising them exactly? To me it just sounds like an unnecessary operation.
    <&Speljohan_> i wouldnt want to live in a society where Mopman isnt monitored 24/7

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #109 on: October 18, 2014, 03:55:47 PM »
    What do you mean by normalising them exactly? To me it just sounds like an unnecessary operation.

    Player option 1

    bytec
    inta

    Player option 2

    intc
    bytea

    They have the same structure, different streams. Before you convert them into a message normalize them to:

    Player Option X

    int
    byte

    So that you can have a single strategy for decoding all player option messages. Same goes for outgoing packets.

    OfflineDan0194

    • Member
    • ****
    • Posts: 1,140
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #110 on: October 18, 2014, 03:57:01 PM »
    What do you mean by normalising them exactly? To me it just sounds like an unnecessary operation.

    Player option 1

    bytec
    inta

    Player option 2

    intc
    bytea

    They have the same structure, different streams. Before you convert them into a message normalize them to:

    Player Option X

    int
    byte

    So that you can have a single strategy for decoding all player option messages. Same goes for outgoing packets.

    wow that's a pretty good idea, alot easier.
    lol who told you winterLove had bad codes
    Smart man.
    if you read this your a fagit

    OfflineLothy

    • Member
    • ****
    • *
    • *
    • Posts: 7,006
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #111 on: October 18, 2014, 04:16:03 PM »
    But aren't there only a few cases like that one?
    <&Speljohan_> i wouldnt want to live in a society where Mopman isnt monitored 24/7

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #112 on: October 18, 2014, 04:19:54 PM »
    But aren't there only a few cases like that one?

    ...no, all packets have streams like this and theres many MANY packets that have a similar model to this. it's not fun to work with if you're designing a decoder for each packet

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #113 on: October 18, 2014, 04:26:48 PM »
    But aren't there only a few cases like that one?

    All interactable options (player, mob, object, ground item, etc) are different from one another. Same byte length however the streams are obfuscated (a, c, s, little, middle, etc) and they are not in the same order.

    Most other packets are like this as well.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #114 on: October 18, 2014, 04:59:19 PM »
    But aren't there only a few cases like that one?

    ...no, all packets have streams like this and theres many MANY packets that have a similar model to this. it's not fun to work with if you're designing a decoder for each packet
    But don't you have to get the structure of each one anyway to add its definition to your normalizer? I don't really see the advantage, it seems like it does exactly the same thing as scape emulator already did with the message structure.
    « Last Edit: October 18, 2014, 05:01:42 PM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #115 on: October 18, 2014, 05:13:59 PM »
    But aren't there only a few cases like that one?

    ...no, all packets have streams like this and theres many MANY packets that have a similar model to this. it's not fun to work with if you're designing a decoder for each packet
    But don't you have to get the structure of each one anyway to add its definition to your normalizer? I don't really see the advantage, it seems like it does exactly the same thing as scape emulator already did with the message structure.

    Yes but it's more dynamic and if you wanted to you could easily generate your own obfuscated streams and apply them to your client. There's a lot of different advantages. It's really not. I just don't think I explained it well enough. It makes working with the client substantially easier. Scape emulator has 5 different decoders for the same packet structure. So no David, no even remotely close.

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #116 on: October 18, 2014, 05:20:54 PM »
    But aren't there only a few cases like that one?

    ...no, all packets have streams like this and theres many MANY packets that have a similar model to this. it's not fun to work with if you're designing a decoder for each packet
    But don't you have to get the structure of each one anyway to add its definition to your normalizer? I don't really see the advantage, it seems like it does exactly the same thing as scape emulator already did with the message structure.

    Not really... Scape Emulator has VERY basic message multiplexing and only supports one frame per message, by normalizing all outbound and inbound frames we are able to manage multiple frames with the same structure all-in-one without needing to create additional messages for different frames which manage the same thing (e.g interaction options). Not only that but it makes creating frames in the server significantly easier, dealing with obfuscated streams is messy and like I stated before, redundant.

    OfflineLothy

    • Member
    • ****
    • *
    • *
    • Posts: 7,006
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #117 on: October 18, 2014, 05:25:06 PM »
    By the way, does this involve copying from one block of memory (such as the incoming data stream) to another stream?
    You might really want to profile it first, especially if copy operations are involved.
    <&Speljohan_> i wouldnt want to live in a society where Mopman isnt monitored 24/7

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #118 on: October 18, 2014, 05:35:25 PM »
    By the way, does this involve copying from one block of memory (such as the incoming data stream) to another stream?
    You might really want to profile it first, especially if copy operations are involved.

    you copy the packet bytes but technically you could reuse the same byte array.

    Thinking about caching buffers now hmmn
    « Last Edit: October 18, 2014, 06:04:25 PM by sinisoul »

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Nyphrex - 530 Emulation Project
    « Reply #119 on: October 18, 2014, 06:06:15 PM »
    But aren't there only a few cases like that one?

    ...no, all packets have streams like this and theres many MANY packets that have a similar model to this. it's not fun to work with if you're designing a decoder for each packet
    But don't you have to get the structure of each one anyway to add its definition to your normalizer? I don't really see the advantage, it seems like it does exactly the same thing as scape emulator already did with the message structure.

    Yes but it's more dynamic and if you wanted to you could easily generate your own obfuscated streams and apply them to your client. There's a lot of different advantages. It's really not. I just don't think I explained it well enough. It makes working with the client substantially easier. Scape emulator has 5 different decoders for the same packet structure. So no David, no even remotely close.
    You would have 5 different decoder definitions as well, wouldn't you? Just all into a script instead of into a new class. You could create one decoder to achieve the same thing in Scape emulator with a simple switch statement and slight modification of how you bind the decoders (allowing for multiple ID's).

    Code: Java
    1. int id;
    2. int data;
    3. switch(option){
    4.   ONE:
    5.     id = getByteA;
    6.     data = getMEInt;
    7.     break;
    8.   TWO:
    9.     id = getInt;
    10.     data = getNegByte;
    11.     break;
    12.   // etc...
    13. }
    14. returnnew RandomThingMessage(id, data);
    15.  
    Allowing you to change it rather simply. You could create some sort of generic or vararg to define what a packet decoder SHOULD return if you wanted to ensure structure was not changed accidentally.. But yeah.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal