How to decode AMF data for automation purposes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to decode AMF data for automation purposes

jbennett
Good day everyone,

     I'm trying to automate the retrieval of performance data and settings details from a larger number of servers on our network. I've been able to access a lot of this data using a REST API but this API has limitations which the vendor just confirmed for me the other day.

     The information on the servers' current status can be accessed using a Flash (Flex) website and I was able to deserialize enough of the responses from the server to see that the information I need is indeed buried inside the response but it is not human readable.

     Does anyone know how to decode the AMF responses such that they are human-readable? I have included an example website and its associated AMF response message.

     Any help with figuring out how to decode this information so that I can automate these types of requests by parsing the responses would be sincerely appreciated.

     Thank you everyone!






Reply | Threaded
Open this post in threaded view
|

Re: How to decode AMF data for automation purposes

Nemi
Good day,

Maybe AMF deserialization like this:
1. use registerClassAlias() for each custom Class used within AMF
2. read input as ByteArray
3. set ObjectEncoding.AMF0 or ObjectEncoding.AMF3
4. byteArray.readObject() as SomeMyClass
5. trace(someMyClass.someProperty);

Check:
Reading and writing a ByteArray
Reply | Threaded
Open this post in threaded view
|

Re: How to decode AMF data for automation purposes

Christofer Dutz
In reply to this post by jbennett
I think if you use Wireshark to inspect the network traffic it is able to decode AMF and displays things in a human readable format … eventually that helps?

Another option would be to de-serialize the AMF message to generic Maps and to serialize that to JSON.

Chris

Am 08.02.17, 22:51 schrieb "jbennett" <[hidden email]>:

    Good day everyone,
   
         I'm trying to automate the retrieval of performance data and settings
    details from a larger number of servers on our network. I've been able to
    access a lot of this data using a REST API but this API has limitations
    which the vendor just confirmed for me the other day.
   
         The information on the servers' current status can be accessed using a
    Flash (Flex) website and I was able to deserialize enough of the responses
    from the server to see that the information I need is indeed buried inside
    the response but it is not human readable.
   
         Does anyone know how to decode the AMF responses such that they are
    human-readable? I have included an example website and its associated AMF
    response message.
   
         Any help with figuring out how to decode this information so that I can
    automate these types of requests by parsing the responses would be sincerely
    appreciated.
   
         Thank you everyone!
   
   
    <http://apache-flex-users.2333346.n4.nabble.com/file/n14661/xcvxcvxcv.jpg>
   
    <http://apache-flex-users.2333346.n4.nabble.com/file/n14661/asdvdsvdsv.jpg>
   
   
   
   
   
    --
    View this message in context: http://apache-flex-users.2333346.n4.nabble.com/How-to-decode-AMF-data-for-automation-purposes-tp14661.html
    Sent from the Apache Flex Users mailing list archive at Nabble.com.