SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Base64 decoding help needed

    Hi all,
    Can anyone help me to decode these portions of URL (see examples below from multiple URLs) or at least tell me what kind of encoding is used?

    AAAAAQAQ1tw91N3JVN-cExHAqDfEkwAAAAqaq8rvjZWYa0e9h1Mz26fJ
    AAAAAQAQJtUZw3AnsZ1vpvwtCdM46wAAAAqaq-87eL4febhSa6Zooz6Y
    AAAAAQAQAdDCuu1dBKS_aY5-SpLROgAAAAqaqAkuAOKpCSxFUSkJ9MR5
    AAAAAQAQ8iTSnNIU4LtZNuC8QUXkZgAAAAkrhdMFVqkSxSQeiPqfw-QS
    AAAAAQAQ0S-9JdlwgAfAtjZSAKHZ-QAAAApNkwdKQ2An5APcvwr11Cxz
    AAAAAQAQ6ea-oC056aFYukblFVnfwQAAAAqMAT6KUsnRz87MtmVRm4eC

    Here is what I think (Im not an expert, so my finding may sound silly. Do not judge. :-)
    - This is not a session data part of URL (trust me on that)
    - This is not classic PHP BASE64 that is easily decodable by base64_decode command in PHP.
    - This is 8-bit clean encryption since it has to be used in URL
    - The encoded output length is always a multiple of 4 bytes. If its shorter its padded by one or two , signs at the end (never saw more then 2). All this makes me to believe that the encryption is some sort of variant of BASE64 URL encryption that uses AZ, az, and 09 for the first 62 digits, plus _- for the last two.

    Some other observations
    - It always has AAAAAQAQ in the beginning of the string and it always has AAA at the position #22
    - I believe I can identify some portions of the string and tell what is the content of that portion.

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Two thoughts:

    • AAAAAQAQ is just denoting the beginning, and would be stripped off when parsed.
    • AAAA is some kind of split-pivot, showing that the string splits into multiple parts (i.e. before and after the AAAA)
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    Hi nm2005, welcome to the forums

    In what context are you seeing these URLs?

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Houston
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    These appear to be encrypted facebook emails:

    http://facebook.com//string_image.ph...=0&highlight=1

    Though... they are just large numbers when facebook decrypts them... where did you get these?

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Houston
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh wait... i see... point it at facebooks pic loader: http://facebook.com/profile/pic.php?...nRz87MtmVRm4eC

    I guess facebook uses the same encryption / obfuscation scheme for encoding the integer id of images...

    decrypt("AAAAAQAQ6ea-oC056aFYukblFVnfwQAAAAqMAT6KUsnRz87MtmVRm4eC") == 1127321692


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •