ipreader 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -1
- data/GETTING_STARTED.md +13 -0
- data/LICENSE +19 -0
- data/README.md +41 -0
- data/bin/ext_sms.rb +0 -1
- data/ipreader.rb +1 -0
- data/ipreader/version.rb +1 -1
- data/test/Gemfile +15 -0
- data/test/Gemfile.lock +31 -0
- data/test/LICENSE +19 -0
- data/{README → test/README} +0 -0
- data/test/README.md +64 -0
- data/test/Rakefile +2 -0
- data/test/ipreader.gemspec +22 -0
- data/test/ipreader.rb +49 -0
- metadata +12 -2
data/.gitignore
CHANGED
data/GETTING_STARTED.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Getting Started
|
2
|
+
===============
|
3
|
+
|
4
|
+
Using ipReader
|
5
|
+
--------------
|
6
|
+
|
7
|
+
Usage: ext_sms [ options ]
|
8
|
+
-h, -?, --help show this message
|
9
|
+
--format FORMAT Output format, one of [html, csv, xml]
|
10
|
+
-p, --path PATHNAME Path to backup directory
|
11
|
+
-f 'COLUMN_NAME:value', Filter to apply, columns [address:value[, text:value]]
|
12
|
+
--filters
|
13
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2008 Joe Ferris and thoughtbot, inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
ipReader
|
2
|
+
========
|
3
|
+
|
4
|
+
ipReader is an IPhone text message reader that accepts a backup directory location and text message or address wild card filter.
|
5
|
+
|
6
|
+
If you want to use ipReader, see
|
7
|
+
[ipReader](http://github.com/catman/ipReader).
|
8
|
+
|
9
|
+
Documentation
|
10
|
+
-------------
|
11
|
+
|
12
|
+
See {file:GETTING_STARTED.md} for information on defining and using ipReader.
|
13
|
+
|
14
|
+
Download
|
15
|
+
--------
|
16
|
+
|
17
|
+
[Github](http://github.com/catman/ipreader/tree/master) or
|
18
|
+
|
19
|
+
Rubygems:
|
20
|
+
gem install ipReader
|
21
|
+
|
22
|
+
More Information
|
23
|
+
----------------
|
24
|
+
|
25
|
+
* [Rubygems](http://rubygems.org/gems/ipreader)
|
26
|
+
* [Issues](http://github.com/catman/ipReader/issues)
|
27
|
+
|
28
|
+
Contributing
|
29
|
+
------------
|
30
|
+
|
31
|
+
Please read the contribution guidelines before submitting patches or pull requests.
|
32
|
+
|
33
|
+
Credits
|
34
|
+
-------
|
35
|
+
|
36
|
+
ipReader was written by David Rabbich with inspiration from https://github.com/terrettaz/export-iphone-sms
|
37
|
+
|
38
|
+
License
|
39
|
+
-------
|
40
|
+
|
41
|
+
ipReader is Copyright © 2008-2011 David Rabbich. It is free software, and may be redistributed under the terms specified in the LICENSE file.
|
data/bin/ext_sms.rb
CHANGED
data/ipreader.rb
CHANGED
data/ipreader/version.rb
CHANGED
data/test/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
group :test do
|
4
|
+
gem "fakefs", :git => "git://github.com/vertiginous/fakefs.git"
|
5
|
+
gem "mocha"
|
6
|
+
end
|
7
|
+
|
8
|
+
gem "haml", ">=3.0.24"
|
9
|
+
gem "sqlite3-ruby", :require => "sqlite3"
|
10
|
+
|
11
|
+
#group :development do
|
12
|
+
#end
|
13
|
+
|
14
|
+
# Specify your gem's dependencies in ipreader.gemspec
|
15
|
+
gemspec
|
data/test/Gemfile.lock
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/vertiginous/fakefs.git
|
3
|
+
revision: 7a35534e02128c95650d59fd95d34ef7cb04313b
|
4
|
+
specs:
|
5
|
+
fakefs (0.3.1)
|
6
|
+
|
7
|
+
PATH
|
8
|
+
remote: .
|
9
|
+
specs:
|
10
|
+
ipreader (0.0.1)
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: http://rubygems.org/
|
14
|
+
specs:
|
15
|
+
haml (3.0.25)
|
16
|
+
mocha (0.9.9)
|
17
|
+
rake
|
18
|
+
rake (0.8.7)
|
19
|
+
sqlite3 (1.3.3-x86-mingw32)
|
20
|
+
sqlite3-ruby (1.3.3)
|
21
|
+
sqlite3 (>= 1.3.3)
|
22
|
+
|
23
|
+
PLATFORMS
|
24
|
+
x86-mingw32
|
25
|
+
|
26
|
+
DEPENDENCIES
|
27
|
+
fakefs!
|
28
|
+
haml (>= 3.0.24)
|
29
|
+
ipreader!
|
30
|
+
mocha
|
31
|
+
sqlite3-ruby
|
data/test/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2008 Joe Ferris and thoughtbot, inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/{README → test/README}
RENAMED
File without changes
|
data/test/README.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
factory_girl
|
2
|
+
============
|
3
|
+
|
4
|
+
factory_girl is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance.
|
5
|
+
|
6
|
+
If you want to use factory_girl with Rails 3, see
|
7
|
+
[factory_girl_rails](http://github.com/thoughtbot/factory_girl_rails).
|
8
|
+
|
9
|
+
Documentation
|
10
|
+
-------------
|
11
|
+
|
12
|
+
You should find the documentation for your version of factory_girl on [Rubygems](http://rubygems.org/gems/factory_girl).
|
13
|
+
|
14
|
+
See {file:GETTING_STARTED.md} for information on defining and using factories.
|
15
|
+
|
16
|
+
Download
|
17
|
+
--------
|
18
|
+
|
19
|
+
[Github](http://github.com/thoughtbot/factory_girl/tree/master) or
|
20
|
+
|
21
|
+
Rubygems:
|
22
|
+
gem install factory_girl
|
23
|
+
|
24
|
+
More Information
|
25
|
+
----------------
|
26
|
+
|
27
|
+
* [Rubygems](http://rubygems.org/gems/factory_girl)
|
28
|
+
* [Mailing list](http://groups.google.com/group/factory_girl)
|
29
|
+
* [Issues](http://github.com/thoughtbot/factory_girl/issues)
|
30
|
+
* [GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS](http://giantrobots.thoughtbot.com)
|
31
|
+
|
32
|
+
Contributing
|
33
|
+
------------
|
34
|
+
|
35
|
+
Please read the contribution guidelines before submitting patches or pull requests.
|
36
|
+
|
37
|
+
Credits
|
38
|
+
-------
|
39
|
+
|
40
|
+
factory_girl was written by Joe Ferris with contributions from several authors, including:
|
41
|
+
|
42
|
+
* Alex Sharp
|
43
|
+
* Eugene Bolshakov
|
44
|
+
* Jon Yurek
|
45
|
+
* Josh Nichols
|
46
|
+
* Josh Owens
|
47
|
+
* Nate Sutton
|
48
|
+
|
49
|
+
The syntax layers are derived from software written by the following authors:
|
50
|
+
|
51
|
+
* Pete Yandell
|
52
|
+
* Rick Bradley
|
53
|
+
* Yossef Mendelssohn
|
54
|
+
|
55
|
+

|
56
|
+
|
57
|
+
factory_girl is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community)
|
58
|
+
|
59
|
+
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
60
|
+
|
61
|
+
License
|
62
|
+
-------
|
63
|
+
|
64
|
+
factory_girl is Copyright © 2008-2011 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
|
data/test/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.dirname(__FILE__)
|
3
|
+
#$:.push File.join( File.dirname(__FILE__),'ipreader' )
|
4
|
+
require "ipreader/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "ipreader"
|
8
|
+
s.version = Ipreader::Backup::Reader::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["David Rabbich"]
|
11
|
+
s.email = ["davidrabbich@yahoo.co.uk"]
|
12
|
+
s.homepage = "http://rubygems.org/gems/ipreader"
|
13
|
+
s.summary = %q{ Reads an unencrypted IPhone backup store and queries the sms data within it. }
|
14
|
+
s.description = %q{ Takes as input a directory location of the Apple backup store and interrogates the back up data for SMS data }
|
15
|
+
|
16
|
+
s.rubyforge_project = "ipreader"
|
17
|
+
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
end
|
data/test/ipreader.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'haml'
|
3
|
+
require 'sqlite3'
|
4
|
+
|
5
|
+
require_relative "ipreader/database_utils"
|
6
|
+
require_relative "ipreader/display"
|
7
|
+
|
8
|
+
module Ipreader
|
9
|
+
|
10
|
+
KNOWN_FORMATS = [ "xml", "csv", "html" ]
|
11
|
+
NO_TEMPLATE = "no template chosen"
|
12
|
+
LIBRARY_LOCATION = "ipreader"
|
13
|
+
TEMPLATE_LOCATION = "templates"
|
14
|
+
|
15
|
+
class Controller
|
16
|
+
|
17
|
+
include Ipreader::Database::Utils
|
18
|
+
include Ipreader::Display
|
19
|
+
|
20
|
+
def initialize(backup_path = nil, format = "html" , filters = {} )
|
21
|
+
@conversations = []
|
22
|
+
@backup_path = backup_path
|
23
|
+
@template_type = format
|
24
|
+
@filters = filters
|
25
|
+
end
|
26
|
+
|
27
|
+
def start
|
28
|
+
read_backups
|
29
|
+
display_sms(@template_type, @conversations.flatten)
|
30
|
+
end
|
31
|
+
|
32
|
+
# control which backup directories to read through
|
33
|
+
# TODO more than one backup directory
|
34
|
+
# TODO more than one database type
|
35
|
+
def read_backups
|
36
|
+
Dir.foreach(@backup_path) do |file_name|
|
37
|
+
full_name = File.join(@backup_path, file_name)
|
38
|
+
unless File.directory?(full_name)
|
39
|
+
if is_sqlite3?(full_name)
|
40
|
+
@conversations << read_sms_table(full_name, @filters) if sms_db?(full_name)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
# @conversations
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipreader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease: !!null
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -23,9 +23,11 @@ extensions: []
|
|
23
23
|
extra_rdoc_files: []
|
24
24
|
files:
|
25
25
|
- .gitignore
|
26
|
+
- GETTING_STARTED.md
|
26
27
|
- Gemfile
|
27
28
|
- Gemfile.lock
|
28
|
-
-
|
29
|
+
- LICENSE
|
30
|
+
- README.md
|
29
31
|
- Rakefile
|
30
32
|
- bin/ext_sms
|
31
33
|
- bin/ext_sms.rb
|
@@ -39,6 +41,14 @@ files:
|
|
39
41
|
- ipreader/templates/sms.missing.haml
|
40
42
|
- ipreader/templates/sms.xml.haml
|
41
43
|
- ipreader/version.rb
|
44
|
+
- test/Gemfile
|
45
|
+
- test/Gemfile.lock
|
46
|
+
- test/LICENSE
|
47
|
+
- test/README
|
48
|
+
- test/README.md
|
49
|
+
- test/Rakefile
|
50
|
+
- test/ipreader.gemspec
|
51
|
+
- test/ipreader.rb
|
42
52
|
- test/test_database_utils.rb
|
43
53
|
- test/test_database_utils2.rb
|
44
54
|
- test/test_display.rb
|