Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. # This is my injection point in datastring
  2. def deserialize(datastring):
  3.     return pickle.loads(base64.decodestring(datastring))
  4.  
  5. # Datastring gets passed to deserialize here:
  6. def load(session_id, connection):
  7.     '''Load the session from storage.'''
  8.     try:
  9.         value = connection.get(session_id)
  10.         if value:
  11.             data = value.split(':', 1)[0]
  12.             kwargs = MemcachedSession.deserialize(data)
  13.             return MemcachedSession(connection, **kwargs)
  14.     except:
  15.         return None
  16.     return None
  17.  
  18. # This is the value of "session_id" in my cookie:
  19. # session_id="2|1:0|10:1570927435|10:session_id|88:NWJlZWZkMTZiNmU1NzFmODc0M2M2OGQ5MzJkYWQyMjY0Y2NkZTgzNGY0NzQ1MWZlYjkwZjk5NTE0Y2YyZWIzNQ==|92cf13a10a7af4db8cec836f2bf8c1408c6b86ca148d02994a59dde5127b8b9c";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement