From f21137a129aa57f6c691fd5af46e1dc32aa7ab4e Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 13 Dec 2017 12:56:20 +0100 Subject: [PATCH] Switch from \r\n to \n line terminators in tools/securenotes2hashcat.pl --- tools/securenotes2hashcat.pl | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/securenotes2hashcat.pl b/tools/securenotes2hashcat.pl index e8d5611c4..43d638c5f 100644 --- a/tools/securenotes2hashcat.pl +++ b/tools/securenotes2hashcat.pl @@ -1,35 +1,35 @@ -#!/usr/bin/env perl - -## -## Author......: See docs/credits.txt -## License.....: MIT -## - -use strict; -use warnings; -use DBI; -use DBD::SQLite; - -die "usage: $0 NoteStore.sqlite\n" unless (scalar @ARGV == 1); - -my $database = shift @ARGV; -my $dsn = "DBI:SQLite:dbname=$database"; -my $userid = ""; -my $password = ""; - -my $dbh = DBI->connect ($dsn, $userid, $password, { RaiseError => 1 }) or die $DBI::errstr; - -my $sth = $dbh->prepare ("SELECT Z_PK,ZCRYPTOITERATIONCOUNT,ZCRYPTOSALT,ZCRYPTOWRAPPEDKEY FROM ZICCLOUDSYNCINGOBJECT WHERE ZISPASSWORDPROTECTED=1"); - -$sth->execute () or die $DBI::errstr; - -while (my $row = $sth->fetchrow_arrayref ()) -{ - printf ("\$ASN\$*%d*%d*%s*%s\n", $row->[0], $row->[1], unpack ("H*", $row->[2]), unpack ("H*", $row->[3])); -} - -$sth->finish; - -$dbh->disconnect (); - -exit (0); +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; +use DBI; +use DBD::SQLite; + +die "usage: $0 NoteStore.sqlite\n" unless (scalar @ARGV == 1); + +my $database = shift @ARGV; +my $dsn = "DBI:SQLite:dbname=$database"; +my $userid = ""; +my $password = ""; + +my $dbh = DBI->connect ($dsn, $userid, $password, { RaiseError => 1 }) or die $DBI::errstr; + +my $sth = $dbh->prepare ("SELECT Z_PK,ZCRYPTOITERATIONCOUNT,ZCRYPTOSALT,ZCRYPTOWRAPPEDKEY FROM ZICCLOUDSYNCINGOBJECT WHERE ZISPASSWORDPROTECTED=1"); + +$sth->execute () or die $DBI::errstr; + +while (my $row = $sth->fetchrow_arrayref ()) +{ + printf ("\$ASN\$*%d*%d*%s*%s\n", $row->[0], $row->[1], unpack ("H*", $row->[2]), unpack ("H*", $row->[3])); +} + +$sth->finish; + +$dbh->disconnect (); + +exit (0);