Deserialize an Object from string without original object info in Javajava.io.StreamCorruptedException: invalid stream header: 75720002How do I call one constructor from another in Java?How do I read / convert an InputStream into a String in Java?How do I create a Java string from the contents of a file?How to get an enum value from a string value in Java?Deserialize JSON into C# dynamic object?How to split a string in JavaConverting 'ArrayList<String> to 'String[]' in JavaHow do I convert a String to an int in Java?How do I turn a C# object into a JSON string in .NET?Finding the end of a java serialized object in a binary stream
How to take photos in burst mode, without vibration?
Brothers & sisters
Modeling an IP Address
Does a druid starting with a bow start with no arrows?
Why are electrically insulating heatsinks so rare? Is it just cost?
Anagram holiday
Assassin's bullet with mercury
What is a clear way to write a bar that has an extra beat?
What is going on with Captain Marvel's blood colour?
What exploit are these user agents trying to use?
Could gravitational lensing be used to protect a spaceship from a laser?
Facing a paradox: Earnshaw's theorem in one dimension
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
How can I tell someone that I want to be his or her friend?
Fully-Firstable Anagram Sets
90's TV series where a boy goes to another dimension through portal near power lines
Would Slavery Reparations be considered Bills of Attainder and hence Illegal?
I Accidentally Deleted a Stock Terminal Theme
Why is Collection not simply treated as Collection<?>
Doing something right before you need it - expression for this?
Is "remove commented out code" correct English?
What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?
Emailing HOD to enhance faculty application
What to put in ESTA if staying in US for a few days before going on to Canada
Deserialize an Object from string without original object info in Java
java.io.StreamCorruptedException: invalid stream header: 75720002How do I call one constructor from another in Java?How do I read / convert an InputStream into a String in Java?How do I create a Java string from the contents of a file?How to get an enum value from a string value in Java?Deserialize JSON into C# dynamic object?How to split a string in JavaConverting 'ArrayList<String> to 'String[]' in JavaHow do I convert a String to an int in Java?How do I turn a C# object into a JSON string in .NET?Finding the end of a java serialized object in a binary stream
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Say I have an object serialized string that looks something like this when displayed in terminal:
bd40efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd
2b020c49efbfbdefbfbdefbfbdefbfbd2b020c49efbfbd3fefbfbdefbfbd
efbfbd126eefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00000a
efbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbdefbfbdefbfbd53efbfbd
efbfbdefbfbd16efbfbd3fefbfbdefbfbdefbfbdefbfbd45efbfbd40efbf
bdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd3b645a1c
efbfbdefbfbdd0b4395810624e3fefbfbd020c49efbfbd5e3540efbfbdef
bfbd000000000a7371007e00000aefbfbdefbfbdefbfbdefbfbd126eefbf
bdefbfbdefbfbdefbfbd1aefbfbdefbfbd76c8b43fefbfbdefbfbd53efbf
bdefbfbdefbfbd1740efbfbdefbfbd00000000000a7371007e0000efbfbd
c49befbfbdefbfbd53efbfbdcfbf50624defbfbdefbfbdefbfbd3fefbfbd
efbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00
00efbfbdc9ba5e353f7cefbfbdefbfbd1cefbfbd083126efbfbd3fefbfbd
2d0e560418efbfbd40efbfbdefbfbd00000000000a7371007e0000efbfbd
efbfbdefbfbd45efbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbf
bd126eefbfbd3fefbfbdefbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd
000000000a7371007e0000efbfbdefbfbd26efbfbd78efbfbdefbfbdefbf
bdefbfbd6eefbfbdefbfbd4fefbfbd3b3fefbfbd10624defbfbdefbfbd40
efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbd4fefbfbd3b
645aefbfbdefbfbd126eefbfbdefbfbd503fefbfbdefbfbdefbfbd22efbf
bdefbfbd6040efbfbdefbfbd000000000a7371007e0000efbfbdefbfbd49
efbfbd5e353f7defbfbdefbfbd10624defbfbdefbfbd3fefbfbd083126ef
bfbd78efbfbd40efbfbdefbfbd00000000000a7371007e00000aefbfbdef
bfbd26efbfbd78efbfbdefbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbd
efbfbd3fefbfbdefbfbd16efbfbd2b020c40efbfbdef
This is the hex I see when typing:xxd -p fileName
in Terminal. I can also view it as Binary but I'm not sure how to decode the serialized object.
I know it is a set of Java serialized objects, but I don't know where the serialization starts/ends. I've tried to loop through with a start and end index but I keep getting:
java.io.StreamCorruptedException: invalid stream header: 30303061
I don't know what else to try, any help would be greatly appreciated.
Thank you!
java serialization deserialization
|
show 5 more comments
Say I have an object serialized string that looks something like this when displayed in terminal:
bd40efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd
2b020c49efbfbdefbfbdefbfbdefbfbd2b020c49efbfbd3fefbfbdefbfbd
efbfbd126eefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00000a
efbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbdefbfbdefbfbd53efbfbd
efbfbdefbfbd16efbfbd3fefbfbdefbfbdefbfbdefbfbd45efbfbd40efbf
bdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd3b645a1c
efbfbdefbfbdd0b4395810624e3fefbfbd020c49efbfbd5e3540efbfbdef
bfbd000000000a7371007e00000aefbfbdefbfbdefbfbdefbfbd126eefbf
bdefbfbdefbfbdefbfbd1aefbfbdefbfbd76c8b43fefbfbdefbfbd53efbf
bdefbfbdefbfbd1740efbfbdefbfbd00000000000a7371007e0000efbfbd
c49befbfbdefbfbd53efbfbdcfbf50624defbfbdefbfbdefbfbd3fefbfbd
efbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00
00efbfbdc9ba5e353f7cefbfbdefbfbd1cefbfbd083126efbfbd3fefbfbd
2d0e560418efbfbd40efbfbdefbfbd00000000000a7371007e0000efbfbd
efbfbdefbfbd45efbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbf
bd126eefbfbd3fefbfbdefbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd
000000000a7371007e0000efbfbdefbfbd26efbfbd78efbfbdefbfbdefbf
bdefbfbd6eefbfbdefbfbd4fefbfbd3b3fefbfbd10624defbfbdefbfbd40
efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbd4fefbfbd3b
645aefbfbdefbfbd126eefbfbdefbfbd503fefbfbdefbfbdefbfbd22efbf
bdefbfbd6040efbfbdefbfbd000000000a7371007e0000efbfbdefbfbd49
efbfbd5e353f7defbfbdefbfbd10624defbfbdefbfbd3fefbfbd083126ef
bfbd78efbfbd40efbfbdefbfbd00000000000a7371007e00000aefbfbdef
bfbd26efbfbd78efbfbdefbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbd
efbfbd3fefbfbdefbfbd16efbfbd2b020c40efbfbdef
This is the hex I see when typing:xxd -p fileName
in Terminal. I can also view it as Binary but I'm not sure how to decode the serialized object.
I know it is a set of Java serialized objects, but I don't know where the serialization starts/ends. I've tried to loop through with a start and end index but I keep getting:
java.io.StreamCorruptedException: invalid stream header: 30303061
I don't know what else to try, any help would be greatly appreciated.
Thank you!
java serialization deserialization
1
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
1
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
1
0x303061
is two ASCII spaces followed by a lowercasea
.String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?
– user207421
Mar 8 at 23:06
1
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
1
NB This file does not start with0x30303061
. Can't see those three spaces and ana
anywhere.
– user207421
Mar 8 at 23:43
|
show 5 more comments
Say I have an object serialized string that looks something like this when displayed in terminal:
bd40efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd
2b020c49efbfbdefbfbdefbfbdefbfbd2b020c49efbfbd3fefbfbdefbfbd
efbfbd126eefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00000a
efbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbdefbfbdefbfbd53efbfbd
efbfbdefbfbd16efbfbd3fefbfbdefbfbdefbfbdefbfbd45efbfbd40efbf
bdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd3b645a1c
efbfbdefbfbdd0b4395810624e3fefbfbd020c49efbfbd5e3540efbfbdef
bfbd000000000a7371007e00000aefbfbdefbfbdefbfbdefbfbd126eefbf
bdefbfbdefbfbdefbfbd1aefbfbdefbfbd76c8b43fefbfbdefbfbd53efbf
bdefbfbdefbfbd1740efbfbdefbfbd00000000000a7371007e0000efbfbd
c49befbfbdefbfbd53efbfbdcfbf50624defbfbdefbfbdefbfbd3fefbfbd
efbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00
00efbfbdc9ba5e353f7cefbfbdefbfbd1cefbfbd083126efbfbd3fefbfbd
2d0e560418efbfbd40efbfbdefbfbd00000000000a7371007e0000efbfbd
efbfbdefbfbd45efbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbf
bd126eefbfbd3fefbfbdefbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd
000000000a7371007e0000efbfbdefbfbd26efbfbd78efbfbdefbfbdefbf
bdefbfbd6eefbfbdefbfbd4fefbfbd3b3fefbfbd10624defbfbdefbfbd40
efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbd4fefbfbd3b
645aefbfbdefbfbd126eefbfbdefbfbd503fefbfbdefbfbdefbfbd22efbf
bdefbfbd6040efbfbdefbfbd000000000a7371007e0000efbfbdefbfbd49
efbfbd5e353f7defbfbdefbfbd10624defbfbdefbfbd3fefbfbd083126ef
bfbd78efbfbd40efbfbdefbfbd00000000000a7371007e00000aefbfbdef
bfbd26efbfbd78efbfbdefbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbd
efbfbd3fefbfbdefbfbd16efbfbd2b020c40efbfbdef
This is the hex I see when typing:xxd -p fileName
in Terminal. I can also view it as Binary but I'm not sure how to decode the serialized object.
I know it is a set of Java serialized objects, but I don't know where the serialization starts/ends. I've tried to loop through with a start and end index but I keep getting:
java.io.StreamCorruptedException: invalid stream header: 30303061
I don't know what else to try, any help would be greatly appreciated.
Thank you!
java serialization deserialization
Say I have an object serialized string that looks something like this when displayed in terminal:
bd40efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd
2b020c49efbfbdefbfbdefbfbdefbfbd2b020c49efbfbd3fefbfbdefbfbd
efbfbd126eefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00000a
efbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbdefbfbdefbfbd53efbfbd
efbfbdefbfbd16efbfbd3fefbfbdefbfbdefbfbdefbfbd45efbfbd40efbf
bdefbfbd00000000000a7371007e00000aefbfbdefbfbdefbfbd3b645a1c
efbfbdefbfbdd0b4395810624e3fefbfbd020c49efbfbd5e3540efbfbdef
bfbd000000000a7371007e00000aefbfbdefbfbdefbfbdefbfbd126eefbf
bdefbfbdefbfbdefbfbd1aefbfbdefbfbd76c8b43fefbfbdefbfbd53efbf
bdefbfbdefbfbd1740efbfbdefbfbd00000000000a7371007e0000efbfbd
c49befbfbdefbfbd53efbfbdcfbf50624defbfbdefbfbdefbfbd3fefbfbd
efbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd000000000a7371007e00
00efbfbdc9ba5e353f7cefbfbdefbfbd1cefbfbd083126efbfbd3fefbfbd
2d0e560418efbfbd40efbfbdefbfbd00000000000a7371007e0000efbfbd
efbfbdefbfbd45efbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbf
bd126eefbfbd3fefbfbdefbfbd45efbfbdefbfbdefbfbd40efbfbdefbfbd
000000000a7371007e0000efbfbdefbfbd26efbfbd78efbfbdefbfbdefbf
bdefbfbd6eefbfbdefbfbd4fefbfbd3b3fefbfbd10624defbfbdefbfbd40
efbfbdefbfbd00000000000a7371007e00000aefbfbdefbfbd4fefbfbd3b
645aefbfbdefbfbd126eefbfbdefbfbd503fefbfbdefbfbdefbfbd22efbf
bdefbfbd6040efbfbdefbfbd000000000a7371007e0000efbfbdefbfbd49
efbfbd5e353f7defbfbdefbfbd10624defbfbdefbfbd3fefbfbd083126ef
bfbd78efbfbd40efbfbdefbfbd00000000000a7371007e00000aefbfbdef
bfbd26efbfbd78efbfbdefbfbdefbfbdefbfbdefbfbdefbfbd126eefbfbd
efbfbd3fefbfbdefbfbd16efbfbd2b020c40efbfbdef
This is the hex I see when typing:xxd -p fileName
in Terminal. I can also view it as Binary but I'm not sure how to decode the serialized object.
I know it is a set of Java serialized objects, but I don't know where the serialization starts/ends. I've tried to loop through with a start and end index but I keep getting:
java.io.StreamCorruptedException: invalid stream header: 30303061
I don't know what else to try, any help would be greatly appreciated.
Thank you!
java serialization deserialization
java serialization deserialization
edited Mar 11 at 16:10
Nikita Jerschow
asked Mar 8 at 22:28
Nikita JerschowNikita Jerschow
2591415
2591415
1
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
1
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
1
0x303061
is two ASCII spaces followed by a lowercasea
.String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?
– user207421
Mar 8 at 23:06
1
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
1
NB This file does not start with0x30303061
. Can't see those three spaces and ana
anywhere.
– user207421
Mar 8 at 23:43
|
show 5 more comments
1
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
1
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
1
0x303061
is two ASCII spaces followed by a lowercasea
.String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?
– user207421
Mar 8 at 23:06
1
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
1
NB This file does not start with0x30303061
. Can't see those three spaces and ana
anywhere.
– user207421
Mar 8 at 23:43
1
1
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
1
1
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
1
1
0x303061
is two ASCII spaces followed by a lowercase a
. String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?– user207421
Mar 8 at 23:06
0x303061
is two ASCII spaces followed by a lowercase a
. String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?– user207421
Mar 8 at 23:06
1
1
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
1
1
NB This file does not start with
0x30303061
. Can't see those three spaces and an a
anywhere.– user207421
Mar 8 at 23:43
NB This file does not start with
0x30303061
. Can't see those three spaces and an a
anywhere.– user207421
Mar 8 at 23:43
|
show 5 more comments
1 Answer
1
active
oldest
votes
I figured out how to deserialize the object. After some research I went through the hex dump step by step to extract relevant information. The tricky part is that some of the data is sent in different packets over HTTP so the deserialization is kind of stitched together. Anyway here is what I was able to come up with. If anyone has any input on the unknown parts of the snippet below, please, do not hesitate to comment and I will attempt to edit my answer accordingly.
0005 – STREAM_VERSION
0a - UNKNOWN
73 – TC_OBJECT
72 – TC_CLASSDESC
0015 – length of the class name
616461732e746f6f6c6b69742e646174612e504144 - class name
efbfbd221844efbf – SerialVersionUID
bdefbfbdefbfbdefbfbd - UNKNOWN
02 - OBJECT SERIALIZABLE
0004 - NUMBER OF PROPERTIES (4)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
61 - PROPERTY NAME (a)?
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
64 - PROPERTY NAME (d)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
70 - PROPERTY NAME (p)
44 - PROPERTY CODE (D : Double)
0008 - PROPERTY NAME LENGTH
73657175656e6365 - PROPERTY NAME (sequence)
0a -UNKNOWN
78 - END BLOCK
70efbfbdefbfbdef - VALUE OF a: 1.00947731285363886197528984273E236
bfbd2b020c49efbf - VALUE OF d: -1.13937500000189637083813920526E-1
bdefbfbdefbfbd45 - VALUE OF p: -2.3100431973060554004134169949E-10
efbfbdefbfbdefbf - VALUE OF sequence: -1.9249974767166909849440370334E230
I hope this helps someone who is in the same situation as I was.
Thank you!
Helpful links:
Javaworld
Javapapers
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071874%2fdeserialize-an-object-from-string-without-original-object-info-in-java%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I figured out how to deserialize the object. After some research I went through the hex dump step by step to extract relevant information. The tricky part is that some of the data is sent in different packets over HTTP so the deserialization is kind of stitched together. Anyway here is what I was able to come up with. If anyone has any input on the unknown parts of the snippet below, please, do not hesitate to comment and I will attempt to edit my answer accordingly.
0005 – STREAM_VERSION
0a - UNKNOWN
73 – TC_OBJECT
72 – TC_CLASSDESC
0015 – length of the class name
616461732e746f6f6c6b69742e646174612e504144 - class name
efbfbd221844efbf – SerialVersionUID
bdefbfbdefbfbdefbfbd - UNKNOWN
02 - OBJECT SERIALIZABLE
0004 - NUMBER OF PROPERTIES (4)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
61 - PROPERTY NAME (a)?
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
64 - PROPERTY NAME (d)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
70 - PROPERTY NAME (p)
44 - PROPERTY CODE (D : Double)
0008 - PROPERTY NAME LENGTH
73657175656e6365 - PROPERTY NAME (sequence)
0a -UNKNOWN
78 - END BLOCK
70efbfbdefbfbdef - VALUE OF a: 1.00947731285363886197528984273E236
bfbd2b020c49efbf - VALUE OF d: -1.13937500000189637083813920526E-1
bdefbfbdefbfbd45 - VALUE OF p: -2.3100431973060554004134169949E-10
efbfbdefbfbdefbf - VALUE OF sequence: -1.9249974767166909849440370334E230
I hope this helps someone who is in the same situation as I was.
Thank you!
Helpful links:
Javaworld
Javapapers
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
add a comment |
I figured out how to deserialize the object. After some research I went through the hex dump step by step to extract relevant information. The tricky part is that some of the data is sent in different packets over HTTP so the deserialization is kind of stitched together. Anyway here is what I was able to come up with. If anyone has any input on the unknown parts of the snippet below, please, do not hesitate to comment and I will attempt to edit my answer accordingly.
0005 – STREAM_VERSION
0a - UNKNOWN
73 – TC_OBJECT
72 – TC_CLASSDESC
0015 – length of the class name
616461732e746f6f6c6b69742e646174612e504144 - class name
efbfbd221844efbf – SerialVersionUID
bdefbfbdefbfbdefbfbd - UNKNOWN
02 - OBJECT SERIALIZABLE
0004 - NUMBER OF PROPERTIES (4)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
61 - PROPERTY NAME (a)?
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
64 - PROPERTY NAME (d)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
70 - PROPERTY NAME (p)
44 - PROPERTY CODE (D : Double)
0008 - PROPERTY NAME LENGTH
73657175656e6365 - PROPERTY NAME (sequence)
0a -UNKNOWN
78 - END BLOCK
70efbfbdefbfbdef - VALUE OF a: 1.00947731285363886197528984273E236
bfbd2b020c49efbf - VALUE OF d: -1.13937500000189637083813920526E-1
bdefbfbdefbfbd45 - VALUE OF p: -2.3100431973060554004134169949E-10
efbfbdefbfbdefbf - VALUE OF sequence: -1.9249974767166909849440370334E230
I hope this helps someone who is in the same situation as I was.
Thank you!
Helpful links:
Javaworld
Javapapers
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
add a comment |
I figured out how to deserialize the object. After some research I went through the hex dump step by step to extract relevant information. The tricky part is that some of the data is sent in different packets over HTTP so the deserialization is kind of stitched together. Anyway here is what I was able to come up with. If anyone has any input on the unknown parts of the snippet below, please, do not hesitate to comment and I will attempt to edit my answer accordingly.
0005 – STREAM_VERSION
0a - UNKNOWN
73 – TC_OBJECT
72 – TC_CLASSDESC
0015 – length of the class name
616461732e746f6f6c6b69742e646174612e504144 - class name
efbfbd221844efbf – SerialVersionUID
bdefbfbdefbfbdefbfbd - UNKNOWN
02 - OBJECT SERIALIZABLE
0004 - NUMBER OF PROPERTIES (4)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
61 - PROPERTY NAME (a)?
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
64 - PROPERTY NAME (d)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
70 - PROPERTY NAME (p)
44 - PROPERTY CODE (D : Double)
0008 - PROPERTY NAME LENGTH
73657175656e6365 - PROPERTY NAME (sequence)
0a -UNKNOWN
78 - END BLOCK
70efbfbdefbfbdef - VALUE OF a: 1.00947731285363886197528984273E236
bfbd2b020c49efbf - VALUE OF d: -1.13937500000189637083813920526E-1
bdefbfbdefbfbd45 - VALUE OF p: -2.3100431973060554004134169949E-10
efbfbdefbfbdefbf - VALUE OF sequence: -1.9249974767166909849440370334E230
I hope this helps someone who is in the same situation as I was.
Thank you!
Helpful links:
Javaworld
Javapapers
I figured out how to deserialize the object. After some research I went through the hex dump step by step to extract relevant information. The tricky part is that some of the data is sent in different packets over HTTP so the deserialization is kind of stitched together. Anyway here is what I was able to come up with. If anyone has any input on the unknown parts of the snippet below, please, do not hesitate to comment and I will attempt to edit my answer accordingly.
0005 – STREAM_VERSION
0a - UNKNOWN
73 – TC_OBJECT
72 – TC_CLASSDESC
0015 – length of the class name
616461732e746f6f6c6b69742e646174612e504144 - class name
efbfbd221844efbf – SerialVersionUID
bdefbfbdefbfbdefbfbd - UNKNOWN
02 - OBJECT SERIALIZABLE
0004 - NUMBER OF PROPERTIES (4)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
61 - PROPERTY NAME (a)?
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
64 - PROPERTY NAME (d)
44 - PROPERTY CODE (D : Double)
0001 - PROPERTY NAME LENGTH
70 - PROPERTY NAME (p)
44 - PROPERTY CODE (D : Double)
0008 - PROPERTY NAME LENGTH
73657175656e6365 - PROPERTY NAME (sequence)
0a -UNKNOWN
78 - END BLOCK
70efbfbdefbfbdef - VALUE OF a: 1.00947731285363886197528984273E236
bfbd2b020c49efbf - VALUE OF d: -1.13937500000189637083813920526E-1
bdefbfbdefbfbd45 - VALUE OF p: -2.3100431973060554004134169949E-10
efbfbdefbfbdefbf - VALUE OF sequence: -1.9249974767166909849440370334E230
I hope this helps someone who is in the same situation as I was.
Thank you!
Helpful links:
Javaworld
Javapapers
answered yesterday
Nikita JerschowNikita Jerschow
2591415
2591415
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
add a comment |
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
Not accepting this answer since it only gives partial understanding.
– Nikita Jerschow
yesterday
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071874%2fdeserialize-an-object-from-string-without-original-object-info-in-java%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Just to verify: Is what you want to show in your post actually mostly unprintable non-alpha-num noise? The problem is that what you see might be different from what I/we see, because of charactersets, unicode, ... I recommend to state that what you want to show is mostly unreadable. I realise that your question might be exactly about this, but a simple explanation/statement probably helps with the clarity. (downvote not by me, I only want to help)
– Yunnosch
Mar 8 at 22:31
1
See java.io.StreamCorruptedException: invalid stream header: 75720002. Also, please show us your code.
– Michał Ziober
Mar 8 at 22:33
1
0x303061
is two ASCII spaces followed by a lowercasea
.String
is not a container for binary data. Why don't you know where the Serialization starts and ends? How was this data produced?– user207421
Mar 8 at 23:06
1
OK, so scan the data for the object stream header sequence, which I believe is 0xCAFEBABE, but you will find it specified in the Protocol chapter of the Object Serialization Specification. You should have taken a hex dump, and posted it here, not the gibberish.
– user207421
Mar 8 at 23:35
1
NB This file does not start with
0x30303061
. Can't see those three spaces and ana
anywhere.– user207421
Mar 8 at 23:43