[sqlite] Encrypted or Corrupt File

2015-10-15 Thread Paul Sanderson
What chat application are they from.

What was the last thing that you did before they stopped working

Is there anything else on your computer that could be opening these fles

Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit
-Forensic Toolkit for SQLite
email from a work address for a fully functional demo licence


On 15 October 2015 at 19:48, Simon Slavin  wrote:
>
> On 15 Oct 2015, at 7:37pm, Michael Horn  wrote:
>
>> I am new to this and an amateur to say the least. I'm trying to recover
>> online some chat files. I'm using SQLite manager to read files and the
>> files I was just using yesterday are not opening. file error: either the
>> file is encrypted or corrupt component returned failure code 0x8052000b.
>> Can anyone give me some pointers? Thanks.
>
> First, ignore whatever tool you're currently using to view the files and use 
> the SQLite command-line tool instead.  Does it get the same kind of error ?  
> If so ...
>
> Do you have hexdump or any other tool which can show the beginning of the 
> file as Hexadecimal higits ?  The beginning of a normal SQLite database is a 
> fixed header containing easy-to-read ASCII characters.  By looking at the 
> file you're trying to open we might be able to figure out what it is.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Encrypted or Corrupt File

2015-10-15 Thread Simon Slavin

On 15 Oct 2015, at 7:37pm, Michael Horn  wrote:

> I am new to this and an amateur to say the least. I'm trying to recover
> online some chat files. I'm using SQLite manager to read files and the
> files I was just using yesterday are not opening. file error: either the
> file is encrypted or corrupt component returned failure code 0x8052000b.
> Can anyone give me some pointers? Thanks.

First, ignore whatever tool you're currently using to view the files and use 
the SQLite command-line tool instead.  Does it get the same kind of error ?  If 
so ...

Do you have hexdump or any other tool which can show the beginning of the file 
as Hexadecimal higits ?  The beginning of a normal SQLite database is a fixed 
header containing easy-to-read ASCII characters.  By looking at the file you're 
trying to open we might be able to figure out what it is.

Simon.


[sqlite] SQLite Release 3.9.0

2015-10-15 Thread Warren Young
On Oct 14, 2015, at 4:48 PM, Craig Maynard  wrote:
> 
> I'm not sure what semantic versioning says about this

semver.org is not a very long page.

Spec point 2 covers this: it does not allow empty X, Y, or Z components.

> why not just drop the trailing .0 and call the release 3.9? That seems 
> cleaner and emphasizes the fact that this is a new minor version.

It also makes version numbers harder to automatically parse, which is part of 
the point of semver.

If all software used semver, your OS?s package manager could tell you about 
version incompatibilities, instead of leaving it to the linker or runtime.


[sqlite] include "sqlite.h" in sqlite.h

2015-10-15 Thread bob
having  #include "sqlite.h"  inside of sqlite.h  presumes the file is 
still called sqlite.h
this makes deploying different versions very difficult.



[sqlite] Encrypted or Corrupt File

2015-10-15 Thread Michael Horn
I am new to this and an amateur to say the least. I'm trying to recover
online some chat files. I'm using SQLite manager to read files and the
files I was just using yesterday are not opening. file error: either the
file is encrypted or corrupt component returned failure code 0x8052000b.
Can anyone give me some pointers? Thanks.


[sqlite] Version 3.9.0 source_id mismatch

2015-10-15 Thread Bruce Blackwell
I do not know if it is significant or not, but this is the first time I
have ever seen this happen.

sqlite3.dll from sqlite-dll-win32-x86-309.zip reports
sqlite_source_id() as 2015-10-14 18:30:13
a43bb2b5cf9c7c19edbce37c883826eb0f7ed764
However, the amalgamation files have #define SQLITE_SOURCE_ID "2015-10-14
12:29:53 a721fc0d89495518fe5612e2e3bbc60befd2e90d"


[sqlite] sqlite window functions extension?

2015-10-15 Thread Igor Tandetnik
On 10/15/2015 9:36 AM, Don V Nielsen wrote:
>  limit ifnull( (
>select net_non_pieces from crrt_net_non net
>where net.zip=zip and net.crrt=crrt

I suspect this WHERE clause is equivalent to "where net.zip=net.zip and 
net.crrt=net.crrt" - that is, always true. The actual limit value comes 
from whichever row accidentally happens to be first.
-- 
Igor Tandetnik



[sqlite] sqlite window functions extension?

2015-10-15 Thread Don V Nielsen
I'm surprised that and extension for this type of functionality has not
been been developed by someone with the c/c++.  It's seems like a natural
fit.  I wish I had the kind of ability & smarts to do it.

On Thu, Oct 15, 2015 at 9:04 AM, Igor Tandetnik  wrote:

> On 10/15/2015 9:36 AM, Don V Nielsen wrote:
>
>>  limit ifnull( (
>>select net_non_pieces from crrt_net_non net
>>where net.zip=zip and net.crrt=crrt
>>
>
> I suspect this WHERE clause is equivalent to "where net.zip=net.zip and
> net.crrt=net.crrt" - that is, always true. The actual limit value comes
> from whichever row accidentally happens to be first.
>
> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] sqlite window functions extension?

2015-10-15 Thread Don V Nielsen
The correlated query was not accepted in the select statement.  However, I
modified your original UPDATE query, as follows, and it did execute, and
passed the proper quantity of rows for the first zip/crrt combination,
only.  The rows were not updated.  It counted correctly, but did not change
the values.

sql> UPDATE tmp_addresses
  set segment='xx'
  where rowid in (
select x2.rowid from tmp_addresses x2 where x2.zip=zip and x2.crrt=crrt
order by
  CASE
  WHEN x2.version_id = '0060' THEN 0
  WHEN x2.version_id = '0064' THEN 2
  WHEN x2.version_id = '0061' THEN 3
  ELSE 99
  END ASC
limit ifnull( (
  select net_non_pieces from crrt_net_non net
  where net.zip=zip and net.crrt=crrt
), 0)
  )
[2015-10-15 06:54:18] *42 row(s)* affected in 189ms

I have not yet attempted your most recent suggestion.  I will get to that
some time today.



On Wed, Oct 14, 2015 at 9:21 PM, Igor Tandetnik  wrote:

> On 10/14/2015 9:29 PM, Don V Nielsen wrote:
>
>> But I am having problems with the LIMIT statement.  It throws an exception
>> no matter what table alias is used: X or x2.  It says "no such column".
>>
>
> Ah, interesting. LIMIT clause doesn't appear to allow correlated
> subqueries; only self-contained expressions. Here goes that idea.
>
> Something like this should work:
>
> select X.*
> from addresses X join crrt_net_non_pieces using (zip, crrt)
> where net_non_pieces > (
>   select count(*) from addresses x2
>   where X.zip=x2.zip and X.crrt=x2.crrt and
>   (x2.version_id < X.version_id or (x2.version_id = X.version_id and
> x2.rowid < X.rowid))
> );
>
> I took the liberty to simplify the ordering expression, for purposes of
> exposition (it's very long and would need to be repeated four times).
> Replace all occurrences of T.version_id with your CASE clause, calculated
> against table T. Also, I'm breaking ties by rowid; your original problem
> statement is underspecified unless there's a total order on Addresses.
>
> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] include "sqlite.h" in sqlite.h

2015-10-15 Thread Richard Hipp
On 10/14/15, bob  wrote:
> having  #include "sqlite.h"  inside of sqlite.h  presumes the file is
> still called sqlite.h
> this makes deploying different versions very difficult.

That line can be omitted safely.

-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] sqlite window functions extension?

2015-10-15 Thread R.Smith


On 2015-10-14 11:20 PM, Don V Nielsen wrote:
> X has columns zip & crrt, just like crrt_net_non.  These form a composite
> key identifying groups within x.  A value "53001.R501" would be an
> example...53001 being the zip code and R501 being the carrier route.  There
> are 52 rows in X that have the key 53001.R501.  A calculation determined
> that I need 42 rows from that key and saved the result in crrt_net_non, the
> row looking like "53001.R501.52.6.46.42".  What I need is a sql function
> that can iterate over crrt_net_non, then grab the rows from X, "53001.R501"
> being first key, sort them into an internal group sequence, then update a
> code of the first 42 rows of that sorted group, and then doing this until
> crrt_net_non is exhausted.

Hi Don, usually a CTE can be pressed into service to make things work. 
Maybe others know exactly what you mean here but it's a bit Greek to me.

As Igor suggested - perhaps some data to accompany this schema and an 
example result-set (or resulting updated table) from it will make it 
clear what you want to achieve with the query. Feel free to simplify so 
the essence of what is needed remain, but be sure to give an example 
that cannot be achieved by other arbitrary means.