spamchronic 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/mailpot/mail.rb +9 -10
  3. metadata +73 -110
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
data/lib/mailpot/mail.rb CHANGED
@@ -7,7 +7,7 @@ require 'digest/md5'
7
7
  require 'aws'
8
8
  require 'mail'
9
9
  require 'net/smtp'
10
- require 'json/pure'
10
+ require 'json'
11
11
 
12
12
  module Mailpot::Mail
13
13
  module_function
@@ -34,10 +34,10 @@ module_function
34
34
  msg[:recipients] = message[:recipients]
35
35
  msg[:probe] = detect_probe(message)
36
36
  # we must at this point detect probes because we need them to be sent
37
- encoded_message = Base64.encode64(msg.to_json)
38
- deflate_encoded_message = gzdeflate(encoded_message)
39
- digest = Digest::MD5.hexdigest(deflate_encoded_message)
40
- store_message(digest, deflate_encoded_message)
37
+ puts msg[:source]
38
+ encoded_message = Marshal.dump(msg)
39
+ digest = Digest::MD5.hexdigest(encoded_message)
40
+ store_message(digest, encoded_message)
41
41
  end
42
42
 
43
43
  def detect_probe(msg)
@@ -71,14 +71,13 @@ module_function
71
71
  def store_message(key, value)
72
72
  Thread.new {
73
73
  mail = @s3.buckets[@bucket].objects[key]
74
- mail.write(value)
74
+ options = {
75
+ :storage_class => :reduced_redundancy
76
+ }
77
+ mail.write(value, options)
75
78
  q = @sqs.queues[@queue]
76
79
  msg = q.send_message(key)
77
80
  }
78
81
  end
79
82
 
80
- def gzdeflate(s)
81
- Zlib::Deflate.new(nil, -Zlib::MAX_WBITS).deflate(s, Zlib::FINISH)
82
- end
83
-
84
83
  end
metadata CHANGED
@@ -1,162 +1,125 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spamchronic
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 6
10
- version: 0.0.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Matt Jezorek
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-02-20 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-25 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: activesupport
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &75100280 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 7
29
- segments:
30
- - 3
31
- - 0
32
- version: "3.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: eventmachine
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *75100280
25
+ - !ruby/object:Gem::Dependency
26
+ name: eventmachine
27
+ requirement: &75099380 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
29
+ requirements:
41
30
  - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 19
44
- segments:
45
- - 0
46
- - 12
47
- version: "0.12"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.12'
48
33
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: aws-sdk
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *75099380
36
+ - !ruby/object:Gem::Dependency
37
+ name: aws-sdk
38
+ requirement: &75098880 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
62
44
  type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: mail
66
45
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *75098880
47
+ - !ruby/object:Gem::Dependency
48
+ name: mail
49
+ requirement: &75032310 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
76
55
  type: :runtime
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
56
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *75032310
58
+ - !ruby/object:Gem::Dependency
59
+ name: rake
60
+ requirement: &75031800 !ruby/object:Gem::Requirement
82
61
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
90
66
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: rdoc
94
67
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *75031800
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdoc
71
+ requirement: &75031160 !ruby/object:Gem::Requirement
96
72
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
104
77
  type: :development
105
- version_requirements: *id006
106
- description: " MailPot is a simple SMTP server honeypot that will catch emails and store\n them in S3 and then pop a message into SQS for later processing\n"
78
+ prerelease: false
79
+ version_requirements: *75031160
80
+ description: ! " MailPot is a simple SMTP server honeypot that will catch emails
81
+ and store\n them in S3 and then pop a message into SQS for later processing\n"
107
82
  email: mjezorek@gmail.com
108
- executables:
83
+ executables:
109
84
  - spamchronic
110
85
  extensions: []
111
-
112
- extra_rdoc_files:
86
+ extra_rdoc_files:
113
87
  - README.md
114
88
  - LICENSE
115
- files:
89
+ files:
116
90
  - README.md
117
91
  - LICENSE
118
92
  - VERSION
119
93
  - bin/spamchronic
120
- - lib/mailpot/configuration.rb
94
+ - lib/mailpot.rb
95
+ - lib/mailpot/models.rb
121
96
  - lib/mailpot/events.rb
122
97
  - lib/mailpot/mail.rb
123
98
  - lib/mailpot/smtp.rb
124
- - lib/mailpot/models.rb
125
- - lib/mailpot.rb
99
+ - lib/mailpot/configuration.rb
126
100
  homepage: http://mattjezorek.com/
127
101
  licenses: []
128
-
129
102
  post_install_message:
130
103
  rdoc_options: []
131
-
132
- require_paths:
104
+ require_paths:
133
105
  - lib
134
- required_ruby_version: !ruby/object:Gem::Requirement
106
+ required_ruby_version: !ruby/object:Gem::Requirement
135
107
  none: false
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- hash: 57
140
- segments:
141
- - 1
142
- - 8
143
- - 7
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
144
111
  version: 1.8.7
145
- required_rubygems_version: !ruby/object:Gem::Requirement
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
113
  none: false
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- hash: 3
151
- segments:
152
- - 0
153
- version: "0"
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
154
118
  requirements: []
155
-
156
119
  rubyforge_project:
157
- rubygems_version: 1.7.2
120
+ rubygems_version: 1.8.10
158
121
  signing_key:
159
122
  specification_version: 3
160
- summary: Runs an SMTP Server and catches emails, will pass probes when identified as a probe
123
+ summary: Runs an SMTP Server and catches emails, will pass probes when identified
124
+ as a probe
161
125
  test_files: []
162
-