Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 447 Vote(s) - 3.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unserialize PHP data in python

#1
> **Possible Duplicate:**
> [How to read/make sense of a PHP serialised data string in python](

[To see links please register here]

)

<!-- End of automatically inserted text -->

I'm using python to access a database which is managed by a Drupal install. The data I want to access in Drupal in saved in the database as a PHP serialized object.

Are there any pre-built python modules which can deserialize a PHP serialized object into a python object? I've done some searching and come up with nothing.

I realize I could write my own parser from scratch but I'd rather use something thats been tried and tested.
Reply

#2
Are you looking for [phpserialize](

[To see links please register here]

)?
Reply

#3
If you don't need object serialization (which can be compensated with associative arrays), then a faster alternative might be this:

[To see links please register here]

(it's a Python module written in C)

It's used in production servers under **heavy** load at my company, so I might recommend it as stable. There is no tarball available, though. So you have to grab it straight from the repository.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through