EICAR 0.0.1
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.
- checksums.yaml +15 -0
- data/.gitignore +18 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +14 -0
- data/LICENSE +42 -0
- data/README.md +36 -0
- data/bin/eicar.com +1 -0
- data/eicar.gemspec +20 -0
- data/lib/eicar/version.rb +3 -0
- data/lib/eicar.rb +29 -0
- metadata +57 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWNjZTEyOWNkYTY3NmNkOWVjYTVkZTkwYWU2NDdmNzQwNGI4ZGY5ZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTA0OWI5ZjM2OWU4ZmQwNGMzYTdiYmZhYWU3M2Y5MzkwMzYyZDg1Ng==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGY4YmM1NmRkYjc4ZjRlZDAxMzUyNDNlNDgwYTdhZDMwMTYwOWYxZTIzNzNm
|
10
|
+
ZDkyY2FmMGFlYTQwZDlmMjE2Zjg1MTM4NGVlNmIyNjlhOWEwNjkxNzFmODYz
|
11
|
+
MTdkZDcyYzMyOThmZDhiZTgwN2I1OTU2MDcyM2IxOGEyMTM2NTg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MGY2YzRiMDFiNWQzM2YyNTU0MTA3MzMxYjQxNWI2YTM1OWNjYWIxZDBjZjc2
|
14
|
+
ZWYyODU5NzM5OTc1ZGZlYTA5MWU1NWQ0Mjg0NjEyODM5YThmMTM0NDQxYWU3
|
15
|
+
MTFmOTAwZjViYmEwMDY0ODVjYWI2OWRjNDFkMjVlZTEwM2JlMWQ=
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
eicar
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p484
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
2
|
+
Source: https://github.com/todb-r7/eicar
|
3
|
+
|
4
|
+
Files: *
|
5
|
+
Copyright: 2006-2013, Rapid7 Inc.
|
6
|
+
License: BSD-3-clause
|
7
|
+
|
8
|
+
# The EICAR gem is provided under the 3-clause BSD license provided
|
9
|
+
# at the end of this file.
|
10
|
+
#
|
11
|
+
# The copyright on this package is held by Rapid7 LLC.
|
12
|
+
#
|
13
|
+
# This license does not apply to third-party components detailed below.
|
14
|
+
#
|
15
|
+
# Last updated: 2013-Dec-30
|
16
|
+
#
|
17
|
+
|
18
|
+
License: BSD-3-clause
|
19
|
+
Redistribution and use in source and binary forms, with or without modification,
|
20
|
+
are permitted provided that the following conditions are met:
|
21
|
+
.
|
22
|
+
* Redistributions of source code must retain the above copyright notice,
|
23
|
+
this list of conditions and the following disclaimer.
|
24
|
+
.
|
25
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
26
|
+
this list of conditions and the following disclaimer in the documentation
|
27
|
+
and/or other materials provided with the distribution.
|
28
|
+
.
|
29
|
+
* Neither the name of Rapid7 LLC nor the names of its contributors
|
30
|
+
may be used to endorse or promote products derived from this software
|
31
|
+
without specific prior written permission.
|
32
|
+
.
|
33
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
34
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
35
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
36
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
37
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
38
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
39
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
40
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
41
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
42
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
eicar
|
2
|
+
=====
|
3
|
+
|
4
|
+
EICAR test string for anti-virus functionality detection
|
5
|
+
|
6
|
+
Usage
|
7
|
+
=====
|
8
|
+
|
9
|
+
If you believe you have anti-virus checking your rubygems install path,
|
10
|
+
you can check to make sure with simply:
|
11
|
+
|
12
|
+
````ruby
|
13
|
+
require 'eicar'
|
14
|
+
````
|
15
|
+
|
16
|
+
If anti-virus is active, this will raise `EICAR::EICARReadError`.
|
17
|
+
Therefore, code that wants anti-virus active should `rescue` this on
|
18
|
+
load. I know, it's a little backwards.
|
19
|
+
|
20
|
+
Code exercising this might look like this:
|
21
|
+
|
22
|
+
````
|
23
|
+
#!/usr/bin/env ruby
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'eicar'
|
27
|
+
rescue EICAR::EICARReadError
|
28
|
+
@antivirus_active = true
|
29
|
+
end
|
30
|
+
````
|
31
|
+
|
32
|
+
TODO
|
33
|
+
====
|
34
|
+
|
35
|
+
Actual specs for testing
|
36
|
+
|
data/bin/eicar.com
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
|
data/eicar.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'eicar/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'EICAR'
|
7
|
+
spec.version = EICAR::VERSION
|
8
|
+
spec.authors = ["Tod Beardsley"]
|
9
|
+
spec.email = ["tod_beardsley@rapid7.com"]
|
10
|
+
spec.summary = "A gem to test local anti-virus filesystem coverage"
|
11
|
+
spec.description = %q{
|
12
|
+
This gem is designed to fail in the face of anti-virus coverage
|
13
|
+
of your gem path. If you are running anti-virus systemwide, this
|
14
|
+
gem will not load since it will be deleted or quarantined.
|
15
|
+
}
|
16
|
+
spec.homepage = "https://github.com/todb-r7/eicar"
|
17
|
+
spec.license = "BSD 3-Clause"
|
18
|
+
spec.files = `git ls-files`.split($/)
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
end
|
data/lib/eicar.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'eicar/version'
|
2
|
+
|
3
|
+
module EICAR
|
4
|
+
|
5
|
+
def self.version
|
6
|
+
EICAR::VERSION
|
7
|
+
end
|
8
|
+
|
9
|
+
class Error < StandardError
|
10
|
+
end
|
11
|
+
|
12
|
+
class EICARReadError < Error
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.test_string
|
16
|
+
lib_path = File.expand_path(File.dirname(__FILE__))
|
17
|
+
bin_path = File.expand_path(File.join(lib_path, "..", "bin"))
|
18
|
+
com_file = File.join(bin_path, "eicar.com")
|
19
|
+
begin
|
20
|
+
data = File.open(com_file, "rb") {|f| f.read f.stat.size}
|
21
|
+
rescue SystemCallError
|
22
|
+
raise EICAR::EICARReadError
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
EICAR.test_string
|
29
|
+
|
metadata
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: EICAR
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tod Beardsley
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-30 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: ! "\n This gem is designed to fail in the face of anti-virus coverage\n
|
14
|
+
\ of your gem path. If you are running anti-virus systemwide, this\n gem will
|
15
|
+
not load since it will be deleted or quarantined.\n "
|
16
|
+
email:
|
17
|
+
- tod_beardsley@rapid7.com
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- .ruby-gemset
|
24
|
+
- .ruby-version
|
25
|
+
- Gemfile
|
26
|
+
- Gemfile.lock
|
27
|
+
- LICENSE
|
28
|
+
- README.md
|
29
|
+
- bin/eicar.com
|
30
|
+
- eicar.gemspec
|
31
|
+
- lib/eicar.rb
|
32
|
+
- lib/eicar/version.rb
|
33
|
+
homepage: https://github.com/todb-r7/eicar
|
34
|
+
licenses:
|
35
|
+
- BSD 3-Clause
|
36
|
+
metadata: {}
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
requirements: []
|
52
|
+
rubyforge_project:
|
53
|
+
rubygems_version: 2.1.11
|
54
|
+
signing_key:
|
55
|
+
specification_version: 4
|
56
|
+
summary: A gem to test local anti-virus filesystem coverage
|
57
|
+
test_files: []
|