GithubHelp home page GithubHelp logo

binarycookiereader's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

binarycookiereader's Issues

Licensing

If you find software that doesn’t have a license, that generally means you have no permission from the creators of the software to use, modify, or share the software. Although a code host such as GitHub may allow you to view and fork the code, this does not imply that you are permitted to use, modify, or share the software for any purpose.

Source: https://choosealicense.com/no-permission

Author's contact information is provided in the script header,

For any bug fixes contact me: [email protected]

I recommend reaching out to them and asking for permission to post their code.

Thanks!

Just used it. Works great!

Had to update for Python 3.12.2

Fast forward to 2024 and this did not work for me out of the box using Python 3.12.2. In general the handling of byte data isn't working, beginning with the file signature check which results in the error: "Not a Cookies.binarycookie file". But also, StringIO didn't work.

I got it working, but actually I had grabbed a different version at https://github.com/ktnjared/BinaryCookieReader . I've never done a pull request before but I'm not sure which version to start with if I were to do so. The core changes I made are (line numbers are off because I made other changes):

16c19
< from io import StringIO

from io import BytesIO
34c37
< if str(file_header) != 'cook':


if file_header != b'cook':
57,59c60,62
< # Converts the string to a file. So that we can use read/write operations easily.
< page = StringIO(page)
< page.read(4) # page header: 4 bytes: Always 00000100


# Converts the bytes to a file. So that we can use read/write operations easily.
pageio = BytesIO(page)
pageio.read(4)  # page header: 4 bytes: Always 00000100

61c64
< num_cookies = unpack('<i', page.read(4))[0]

num_cookies = unpack('<i', pageio.read(4))[0]

66c69
< cookie_offsets.append(unpack('<i', page.read(4))[0])

    cookie_offsets.append(unpack('<i', pageio.read(4))[0])

68c71
< page.read(4) # end of page header: Always 00000000

pageio.read(4)  # end of page header: Always 00000000

72,74c75,77
< page.seek(offset) # Move the page pointer to the cookie starting point
< cookiesize = unpack('<i', page.read(4))[0] # fetch cookie size
< cookie = StringIO(page.read(cookiesize)) # read the complete cookie

    pageio.seek(offset)  # Move the page pointer to the cookie starting point
    cookiesize = unpack('<i', pageio.read(4))[0]  # fetch cookie size
    cookie = BytesIO(pageio.read(cookiesize))  # read the complete cookie

90c93
< cookie_flags = 'Unknown'

        cookie_flags = 'Unknown'+str(flags)

123c126
< url = url+str(u)

        url = url+u.decode()

130c133
< name = name+str(n)

        name = name+n.decode()

137c140
< path = path+str(pa)

        path = path+pa.decode()

144c147
< value = value+str(va)

        value = value+va.decode()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.