Giter VIP home page Giter VIP logo

ccl-ssns's People

Watchers

 avatar

Forkers

bartevers

ccl-ssns's Issues

[email protected]

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Feb 2014 at 7:40

Should this project still work? Error reading record begining at data offset XX

$ chrome_tabs Current\ Tabs moo.html
Processing begins...
Error reading record begining at data offset 27.
Error caused by: unpack requires a bytes object of length 4.
Traceback follows for debugging:

---------------EXCEPTION BEGINS---------------
Traceback (most recent call last):
  File "/Users/david/bin/chrome_tabs", line 544, in load_iter
    command = read_command(f)
  File "/Users/david/bin/chrome_tabs", line 480, in read_command
    return read_tab_restore_command(command_buffer, command_id)
  File "/Users/david/bin/chrome_tabs", line 520, in read_tab_restore_command
    state = WebHistoryItem.from_bytes(state_blob[4:]) # first 32bits is the internal pickle size. We dont' need it.
  File "/Users/david/bin/chrome_tabs", line 225, in from_bytes
    return cls.from_stream(f)
  File "/Users/david/bin/chrome_tabs", line 276, in from_stream
    doc_state_count, = struct.unpack("<i", f.read(4))
struct.error: unpack requires a bytes object of length 4
----------------EXCEPTION ENDS----------------

NB: No further records will be read.
Processing finished.

$ chrome_tabs Last\ Session moo.html
Processing begins...
Error reading record begining at data offset 57.
Error caused by: unpack requires a bytes object of length 4.
Traceback follows for debugging:

---------------EXCEPTION BEGINS---------------
Traceback (most recent call last):
  File "/Users/david/bin/chrome_tabs", line 544, in load_iter
    command = read_command(f)
  File "/Users/david/bin/chrome_tabs", line 480, in read_command
    return read_tab_restore_command(command_buffer, command_id)
  File "/Users/david/bin/chrome_tabs", line 520, in read_tab_restore_command
    state = WebHistoryItem.from_bytes(state_blob[4:]) # first 32bits is the internal pickle size. We dont' need it.
  File "/Users/david/bin/chrome_tabs", line 225, in from_bytes
    return cls.from_stream(f)
  File "/Users/david/bin/chrome_tabs", line 276, in from_stream
    doc_state_count, = struct.unpack("<i", f.read(4))
struct.error: unpack requires a bytes object of length 4
----------------EXCEPTION ENDS----------------

NB: No further records will be read.
Processing finished.


What version of the product are you using? On what operating system?
OSX 10.9.5


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 6 Feb 2015 at 4:38

Another error from an unclean Chrome exit

1. Parse another unclean Chrome exit file from another PC (file fragment 
follows)
2. An struct.error occurs.

The error I'm getting is 

Processing begins...
Error reading record begining at data offset 2315120.
Error caused by: unpack requires a bytes object of length 4.
Tracebck follows for debugging:

---------------EXCEPTION BEGINS---------------
Traceback (most recent call last):
  File "ccl_ssns.py", line 435, in load_iter
    command = read_command(f)
  File "ccl_ssns.py", line 380, in read_command
    return read_tab_restore_command(command_buffer, command_id)
  File "ccl_ssns.py", line 414, in read_tab_restore_command
    state = WebHistoryItem.from_bytes(state_blob[4:]) # first 32bits is the internal pickle size. We dont' need it.
  File "ccl_ssns.py", line 150, in from_bytes
    return cls.from_stream(f)
  File "ccl_ssns.py", line 156, in from_stream
    version, = struct.unpack("<i", f.read(4))
struct.error: unpack requires a bytes object of length 4
----------------EXCEPTION ENDS----------------

NB: No further records will be read.
Processing finished.

This was with version 0.7, under Windows 8 64-bit (again with Chrome 23)

The relevant excerpt follows:

          0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF
--------------------------------------------------------------------
0x235370: E101 06DC 0100 006F 0400 0000 0000 005D - á..Ü...o.......]
0x235380: 0000 0068 7474 703A 2F2F 7777 772E 7265 - ...http://www.re
0x235390: 6464 6974 2E63 6F6D 2F72 2F47 616D 6573 - ddit.com/r/Games
0x2353A0: 2F63 6F6D 6D65 6E74 732F 3131 7265 6136 - /comments/11rea6
0x2353B0: 2F77 6974 685F 6761 6D65 735F 6C69 6B65 - /with_games_like
0x2353C0: 5F74 7261 696E 5F73 696D 756C 6174 6F72 - _train_simulator
0x2353D0: 5F62 6569 6E67 5F73 6F6D 6577 6861 742F - _being_somewhat/
0x2353E0: 0000 0078 0000 0057 0069 0074 0068 0020 - ...x...W.i.t.h. 
0x2353F0: 0067 0061 006D 0065 0073 0020 006C 0069 - .g.a.m.e.s. .l.i
0x235400: 006B 0065 0020 0054 0072 0061 0069 006E - .k.e. .T.r.a.i.n
0x235410: 0020 0053 0069 006D 0075 006C 0061 0074 - . .S.i.m.u.l.a.t
0x235420: 006F 0072 0020 0062 0065 0069 006E 0067 - .o.r. .b.e.i.n.g
0x235430: 002E 002E 002E 0020 0073 006F 006D 0065 - ....... .s.o.m.e
0x235440: 0077 0068 0061 0074 0020 0070 006F 0070 - .w.h.a.t. .p.o.p
0x235450: 0075 006C 0061 0072 002E 0020 0057 006F - .u.l.a.r... .W.o
0x235460: 0075 006C 0064 006E 0027 0074 0020 0061 - .u.l.d.n.'.t. .a
0x235470: 0020 0053 0070 0061 0063 0065 0073 0068 - . .S.p.a.c.e.s.h
0x235480: 0069 0070 0020 0053 0069 006D 0075 006C - .i.p. .S.i.m.u.l
0x235490: 0061 0074 006F 0072 0020 0062 0065 0020 - .a.t.o.r. .b.e. 
0x2354A0: 0069 006E 0063 0072 0065 0064 0069 0062 - .i.n.c.r.e.d.i.b
0x2354B0: 006C 0079 0020 0070 006F 0070 0075 006C - .l.y. .p.o.p.u.l
0x2354C0: 0061 0072 003F 0020 003A 0020 0047 0061 - .a.r.?. .:. .G.a
0x2354D0: 006D 0065 0073 0000 0000 0008 0000 0000 - .m.e.s..........
0x2354E0: 0000 0000 0000 0001 0000 005D 0000 0068 - ...........]...h
0x2354F0: 7474 703A 2F2F 7777 772E 7265 6464 6974 - ttp://www.reddit
0x235500: 2E63 6F6D 2F72 2F47 616D 6573 2F63 6F6D - .com/r/Games/com
0x235510: 6D65 6E74 732F 3131 7265 6136 2F77 6974 - ments/11rea6/wit
0x235520: 685F 6761 6D65 735F 6C69 6B65 5F74 7261 - h_games_like_tra
0x235530: 696E 5F73 696D 756C 6174 6F72 5F62 6569 - in_simulator_bei
0x235540: 6E67 5F73 6F6D 6577 6861 742F 0000 0000 - ng_somewhat/....
0x235550: 0000 005D CD06 58CD 0000 BE02 0000 0000 - ...]Í.XÍ..¾.....


I don't really *need* to extract data from this one, but why keep bugs? :)

Original issue reported on code.google.com by GSchizas on 15 Nov 2012 at 9:27

Not works under Linux Mint 64bit

What steps will reproduce the problem?
1. Linux Mint 16 Petra (64bit machine)
2. Download script & add exec rights to it
3. Run in command line:

    ./ccl_ssns.py ~/.config/google-chrome/Default/Current\ Tabs out.html

What is the expected output?

  Report generated, withot error.

What do you see instead?

Processing begins...
Error reading record begining at data offset 27.
Error caused by: unpack requires a bytes object of length 4.
Traceback follows for debugging:

---------------EXCEPTION BEGINS---------------
Traceback (most recent call last):
  File "./ccl_ssns.py", line 544, in load_iter
    command = read_command(f)
  File "./ccl_ssns.py", line 480, in read_command
    return read_tab_restore_command(command_buffer, command_id)
  File "./ccl_ssns.py", line 520, in read_tab_restore_command
    state = WebHistoryItem.from_bytes(state_blob[4:]) # first 32bits is the internal pickle size. We dont' need it.
  File "./ccl_ssns.py", line 225, in from_bytes
    return cls.from_stream(f)
  File "./ccl_ssns.py", line 276, in from_stream
    doc_state_count, = struct.unpack("<i", f.read(4))
struct.error: unpack requires a bytes object of length 4
----------------EXCEPTION ENDS----------------

NB: No further records will be read.
Processing finished.


What version of the product are you using? On what operating system?

   Current from trunk (master).  Linux Mint 16 Petra (64bit machine)

Original issue reported on code.google.com by [email protected] on 2 Apr 2014 at 7:55

encoding is an invalid keyword argument

What steps will reproduce the problem?

attempting to parse chrome Current Session file extracted from hard drive using 
FTK imager

using following command:
user$ python ccl_ssns.py Current\ Session output.html

What is the expected output? What do you see instead?
gives error:
processing begins...
Traceback (most recent call last):
  File "ccl_ssns.py", line 721, in <module>
    main()
  File "ccl_ssns.py", line 713, in main
    out = open(sys.argv[2], "wt", encoding="utf-8")
TypeError: 'encoding' is an invalid keyword argument for this function

What version of the product are you using? On what operating system?
latest build rev 4d96d3d2f2aa
running on ubuntu 12.04 precise
python version 2.7.3

Please provide any additional information below.
according to python documentation, only arguments for open() should be 
open(name[, mode[, buffering]])
there is no option for encoding

Original issue reported on code.google.com by [email protected] on 21 Nov 2014 at 8:57

[PATCH] Minor python-2.7 compatibility tweaks

Despite shebang being python3, code is very close to working on python-2.7 and 
required only a few minor changes.

Fork with tweak: https://code.google.com/r/mkfraggod-py27-compat-fixes
Commit (just one new there): 
https://code.google.com/r/mkfraggod-py27-compat-fixes/source/detail?r=02aa14c04f
333eb695142bea0385000ea374a2e5#

I've tested result on local "Current Tabs" file with python 2.7.3 and 3.2.3, 
both seem to work with that commit added.

Not sure if maintaining py2.7 compatibility might be beyond the scope of 
project, but it just seem to be so trivial in this case.
Please let me know if you consider the change unnecessary, so I'll just 
clean-up the fork.

Thanks for sharing the script, really saved me a lot of time restoring a dozen 
tabs which one of the late chromium updates seem to have discarded.

Original issue reported on code.google.com by [email protected] on 16 Feb 2013 at 12:00

Upload to pypi

Hi, great tool. I'd like to package it for Arch Linux.

Could you upload it to PyPI? That would make things easier.

Original issue reported on code.google.com by [email protected] on 6 Sep 2014 at 11:17

When parsing a Current Session file from an unclean Chrome exit, a struct.error exception is raised.

1. Use Chrome 23 with several tabs, and exit uncleanly (e.g. kill the root 
Chrome process)
2. Run the script with "Current Session" (i.e. python python ccl_ssns.py 
"Current Session" "Current Session.html")
3. A "Current Session.html" file is not produced. Instead, an exception is 
raised: 

Traceback (most recent call last):
  File "ccl_ssns.py", line 550, in <module>
    main()
  File "ccl_ssns.py", line 535, in main
    for c in sorted(load(f, FILE_TYPE_TABS), key=lambda rec: (rec.tab_id or -1, rec.index or -1)):
  File "ccl_ssns.py", line 423, in load
    return [c for c in load_iter(f, file_type)]
  File "ccl_ssns.py", line 423, in <listcomp>
    return [c for c in load_iter(f, file_type)]
  File "ccl_ssns.py", line 416, in load_iter
    command = read_command(f)
  File "ccl_ssns.py", line 364, in read_command
    return read_tab_restore_command(command_buffer, command_id)
  File "ccl_ssns.py", line 398, in read_tab_restore_command
    state = WebHistoryItem.from_bytes(state_blob[4:]) # first 32bits is the internal pickle size. We dont' need it.
  File "ccl_ssns.py", line 145, in from_bytes
    return cls.from_stream(f)
  File "ccl_ssns.py", line 158, in from_stream
    original_url = read_str_16(f, string_length_is_bytes)
  File "ccl_ssns.py", line 326, in read_str_16
    char_count, = struct.unpack("<i", f.read(4))
struct.error: unpack requires a bytes object of length 4

This was done with the latest version of the script, and with Chrome 23.

The error occurs because at that point f.read(4) returns 0 bytes.

The last SessionCommand that is being parsed seems to be the following:

command_id=6 (245 bytes):

      0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF
----------------------------------------------------------------
0x00: 06F0 0000 0035 0200 0002 0000 001C 0000 - .ð...5..........
0x10: 0068 7474 703A 2F2F 7269 7365 3466 756E - .http://rise4fun
0x20: 2E63 6F6D 2F41 676C 2F51 706C 7526 0000 - .com/Agl/Qplu&..
0x30: 0041 0067 006C 0020 0040 0020 0072 0069 - .A.g.l. .@. .r.i
0x40: 0073 0065 0034 0066 0075 006E 0020 0066 - .s.e.4.f.u.n. .f
0x50: 0072 006F 006D 0020 004D 0069 0063 0072 - .r.o.m. .M.i.c.r
0x60: 006F 0073 006F 0066 0074 0020 0052 0065 - .o.s.o.f.t. .R.e
0x70: 0073 0065 0061 0072 0063 0068 0028 0000 - .s.e.a.r.c.h.(..
0x80: 0024 0000 00FF FFFF FF1C 0000 0068 7474 - .$...ÿÿÿÿ....htt
0x90: 703A 2F2F 7269 7365 3466 756E 2E63 6F6D - p://rise4fun.com
0xA0: 2F41 676C 2F51 706C 7508 0000 0000 0000 - /Agl/Qplu.......
0xB0: 0017 0000 0068 7474 703A 2F2F 7269 7365 - .....http://rise
0xC0: 3466 756E 2E63 6F6D 2F41 676C 0001 0000 - 4fun.com/Agl....
0xD0: 001C 0000 0068 7474 703A 2F2F 7269 7365 - .....http://rise
0xE0: 3466 756E 2E63 6F6D 2F41 676C 2F51 706C - 4fun.com/Agl/Qpl
0xF0: 7500 0000 00                            - u....           


Original issue reported on code.google.com by GSchizas on 14 Nov 2012 at 12:31

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.