Giter Site home page Giter Site logo

cronodump's People

Contributors

erdgeist avatar gsuvorov avatar nlitsme avatar

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

Watchers

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

cronodump's Issues

HEX encoding while save output

Greetings!

I have a problem with converting data to postgres template (using croconvert.py -t postgres ). The original database has a few tables and each table has a field with type of relation to another table. After the convertion completed this relational fields show values as HEX and this HEX is undecodable.

Maybe there is a way to sovle this problem?

p.s.
the output string looks like this
('30', 'some valid data', 'another one valid data', '01 03 ec 0a 00 00 02')

Noob issue

Hello,

I'm a beginner, so it may be more a question of ignorance than a bug...

I'm trying to transfer a cronos database to CSV.

So I try the command "croconvert --csv".

I get :
"WARN: expected dbinfo to start with 0x03
ERROR decoding db definition:
This could possibly mean that you need to try with the --strucrack option".

So I try the command "crodump --strucrack recdump".

I see all the lines of the file scrolling on the prompt, for example :
2297353: 014e321e3337321e313130303532391e313335351ec2cdca1eccd5cb1ec1d3cacec2c01ec0c4c5cbc8cdc01ec0d5ccc5c4cec2cdc01ecfd120d0d420383230303331313433341ec1d3cacec2c020c0c4c5cbc8cdc020c0d5ccc5c4cec2cdc0

What next? I still don't have a CSV file and the "croconvert --csv" command still gives me the same error?

Any advice? A link to a tutorial?

Thanks in advance.

Error with "croconvert"

Hello! An error occurs while converting:
bin/croconvert --csv ~/........path........

WARN: expected dbinfo to start with 0x03
ERROR decoding db definition: 'charmap' codec can't decode byte 0x98 in position 115: character maps to
This could possibly mean that you need to try with the --strucrack option

when executing the command: bin/crodump --strucrack recdump values ​​are displayed from the database:
1: 01cbe8efe5f6ea1e38......
2: 01d1eef7e81e38393830......
3: 01cceef1eae2e01e......
4: 01d2f3ebe01e38........


bin/crodump strudump -v -a ~/.......path.......

error: WARN: expected dbinfo to start with 0x03

Thanks

Not correct Date parse in croconvert.

I want to say a big thanks for you. Everything works perfectly. The only thing that does not work quite correctly for me is the date conversion. For example, if in Сronos the date looks like 18.07.1962, then in the CSV I get 620718. Like in mirror :). I tried several bases, all results the same. Could you fix this? Thanks in advance.

Unsolvable problem(

Hello, i am getting this issue, help pls to fix it.

bin/croconvert --strucrack --csv --dbcrack /run/media/userl/drive/Cronos/base

WARN: expected dbinfo to start with 0x03
ERROR decoding db definition: 'charmap' codec can't decode byte 0x98 in position 31: character maps to
This could possibly mean that you need to try with the --strucrack option
WARN: expected dbinfo to start with 0x03
ERROR decoding db definition: 'charmap' codec can't decode byte 0x98 in position 31: character maps to
This could possibly mean that you need to try with the --strucrack option
bin/croconvert --strucrack --csv --dbcrack 54.74s user 30.93s system 64% cpu 2:12.85 total

Есть непонимание

Имею базу, которая на конвертации выдает ошибку:
"WARN: expected dbinfo to start with 0x03
ERROR decoding db definition:
This could possibly mean that you need to try with the --strucrack option
WARN: expected dbinfo to start with 0x03
ERROR decoding db definition:
This could possibly mean that you need to try with the --strucrack option
"
Командой
crodump --strucrack recdump
Выдает 32 млн строк. Я так понимаю как раз KOD

Что с этим делать дальше? как раскодировать базу, чтобы отконвертить ее в cvs

Link decoding capability

Is it possible to decode values of links to find out base name and SN?
e.g. we have HEX value link '01 05 08 00 00 00 02 00 00 00 20 00 00 80' that point on field in base 'АД' with SN '85'.

Issue with Retrieving Values of Related Fields from Bases

Hello!

Can someone, please, advise me on how to correctly retrieve the values of these related fields?

I have a Bank, that includes the "people" and "anketa" bases, which are related to each other through the "anketa_conn" field in the "people" base and the "people_conn" field in the "anketa" base.

strudump shows this bases like this

== Base004 ==
Warning: FieldDefinition Section 2 not marked with a 2
0,3<5,0,14>4  1,11 'address'  'AD'  [TableImage(0 bytes): none]
Type:  0  0    1,0       - 'Системный номер'
Type:  1 ( 1/ 1) 0000,(1-  20),1000d - 'id'                                     -- 0000000000000000000000000500001741070000
Type:  2 ( 2/ 2) 0800,(1-   2),1000d - 'country'                                -- 000000000000000000000000050000a3a80700000000
Type:  2 ( 3/ 3) 0800,(1-  16),1000d - 'area'                                   -- 000000000000000000000000050000c1a80700000000
Type:  2 ( 4/ 4) 0800,(1-  31),1000d - 'city'                                   -- 00000000000000000000000005000001aa0700000000
Type:  1 ( 5/ 5) 0800,(1-  20),1000d - 'index'                                  -- 000000000000000000000000050000d1c6070000
Type:  2 ( 6/ 6) 0800,(1-  50),1000d - 'address'                                -- 000000000000000000000000050000bd0b0800000000
Type:  1 ( 7/ 7) 0000,(1-  20),1000d - 'type'                                   -- 000000000000000000000000000000
Type:  1 ( 8/ 8) 0000,(1-  20),1000d - 'verify'                                 -- 000000000000000000000000000000
Type:  1 ( 9/ 9) 0000,(1-  20),1000d - 'priority'                               -- 000000000000000000000000000000
Type: 17 (10/10) 0040,(1-100000),1000d - 'people_conn'                            -- 00000000000000000000000002005045020031330001003100

And

== Base001 ==
Warning: FieldDefinition Section 2 not marked with a 2
0,3<5,0,3>1  1,20 'people'  'PE'  [TableImage(0 bytes): none]
Type:  0  0    1,0       - 'Системный номер'
Type:  1 ( 1/ 1) 0000,(1-  20),1000d - 'id'                                     -- 0000000000000000000000000500000100000000
Type:  1 ( 2/ 2) 0000,(1-  20),1000d - 'ecbID'                                  -- 0000000000000000000000000500007669000000
Type:  2 ( 3/ 3) 0000,(1-  12),1000d - 'login'                                  -- 00000000000000000000000005000000cf0000000000
Type:  2 ( 4/ 4) 0800,(1-  12),1000d - 'surname'                                -- 0000000000000000000000000500009b4e0100000000
Type:  2 ( 5/ 5) 0800,(1-  10),1000d - 'name'                                   -- 00000000000000000000000005000096a20200000000
Type:  2 ( 6/ 6) 0800,(1-  13),1000d - 'middlename'                             -- 00000000000000000000000005000020bd0200000000
Type:  1 ( 7/ 7) 0000,(1-  20),1000d - 'sex'                                    -- 00000000000000000000000005000061d0020000
Type:  4 ( 8/ 8) 0800,(1-  20),1000d - 'dateB'                                  -- 00000000000000000000000005000066d0020001
Type:  2 ( 9/ 9) 0000,(1-  24),1000d - 'key'                                    -- 0000000000000000000000000000000000
Type:  2 (10/10) 0000,(1-   2),1000d - 'nationality'                            -- 000000000000000000000000050000078c0400000000
Type:  1 (11/11) 0000,(1-  20),1000d - 'translate'                              -- 000000000000000000000000050000278c040000
Type: 17 (15/20) 0040,(1-100000),1000d - 'anketa_conn'                            -- 0000000000000000000000000200414e020031310001003100

During formatting, I am trying to retrieve the values of these related fields, but I am getting empty values.

Thank you for your assistance!

Error returned: Exception: not a Crofile

Very neat package, but I'm having trouble dumping about 20 Cronos databases. Here's the error:

(base) computer cronodump-master % bin/croconvert --csv "Banks/Cronosd/“

unknown magic: b'Cr\xeeFile\x00'
Traceback (most recent call last):
File "/Users/computer/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/computer/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/computer/Documents/cronodump-master/crodump/croconvert.py", line 139, in
main()
File "/Users/computer/Documents/cronodump-master/crodump/croconvert.py", line 133, in main
csv_output(kod, args)
File "/Users/computer/Documents/cronodump-master/crodump/croconvert.py", line 41, in csv_output
db = Database(args.dbdir, kod)
File "/Users/computer/Documents/cronodump-master/crodump/Database.py", line 32, in init
self.stru = self.getfile("Stru")
File "/Users/computer/Documents/cronodump-master/crodump/Database.py", line 55, in getfile
return Datafile(name, open(datname, "rb"), open(tadname, "rb"), self.kod)
File "/Users/computer/Documents/cronodump-master/crodump/Datafile.py", line 16, in init
self.readdathdr()
File "/Users/computer/Documents/cronodump-master/crodump/Datafile.py", line 63, in readdathdr
raise Exception("not a Crofile")
Exception: not a Crofile

And here's the file listing. Happy to share the database if that would help.

CroBank.dat
CroBank.tad
CroIndex.dat
CroIndex.tad
CroStru.dat
CroStru.tad

ERROR decoding db definition: list index out of range

bin/croconvert --strucrack --csv --dbcrack test_data/DB/
WARN: expected dbinfo to start with 0x03
ERROR decoding db definition: list index out of range
This could possibly mean that you need to try with the --strucrack option
WARN: expected dbinfo to start with 0x03
ERROR decoding db definition: list index out of range
This could possibly mean that you need to try with the --strucrack option

Got the issue above, any hints how it can be fixed?
Thanks

CronosPlus .cpy format support

CronosPlus has an option to backup a "bank" with its data and indices into compressed .cpy archive. Are there plans to support this kind of a database in the future?

Header sample:

00000000: 4372 6f41 7263 3032 4372 6f42 6443 6f70  CroArc02CroBdCop
00000010: 7906 00de e805 0026 d59a bf56 212e 4a97  y......&...V!.J.
00000020: b733 5062 8a2d 17ce 6074 0072 015f ecf9  .3Pb.-..`t.r._..
00000030: 347b b90a 8517 06bb 30b9 2f76 e32e 2a54  4{......0./v..*T
00000040: e658 5f0d 0174 0095 b322 6f3b a722 a4c0  .X_..t..."o;."..
00000050: d21c 7bd1 0aaa c563 1ace ab94 6099 d64c  ..{....c....`..L
00000060: ed23 844f 4448 1ae2 f97d ff26 0e69 d149  .#.ODH...}.&.i.I
00000070: 40b9 80a2 db95 2d84 146c e460 00ee eef1  @.....-..l.`....
00000080: 4185 16bd dfbf 760d 92ba 69c5 4aee 38e5  A.....v...i.J.8.
00000090: 984b b5e5 0803 f085 7cd0 e216 a259 ecc7  .K......|....Y..

Entropy: image.png

Reference link: restoring CronosPlus backup (in russian)

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.