EICAR 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/eicar/version.rb +1 -1
- data/lib/eicar.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTQ0OTkzNTMyMjRkMGU0YjJkMzdkMGZhZjdiYTFmNGNkNWZlMTNmYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmE0MzlhYWUyMjI2ZTc0NTgzMDc2ZjY4MTUxYTVhZWU3NzJhN2E5OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Yzg0YTNjYTNhNzA4MTVlNWIxNTFmMmVmNTUxNzgxZjIwMTNjNzhhOWY0Mzkw
|
10
|
+
YjhhYzQ2NzZhZjVjNGJlN2EwMTgzOWZiYjg2NDVkZWFhYjU2ZTk4NTRkMDAz
|
11
|
+
ZmIwMGRjOWJlYzcwOWViYzBkZGI3ZWJhNDc1MjQ2YTM5YzBmN2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2MxZDYyMTkxNDlmYzk2OTI0OGJlZjQyYjY5OWU1ZWNhMWVjOTQzZWY2N2Rl
|
14
|
+
ZjMwNmVlZTkwYjRmOTMyOTlkODEzZDk0N2VjMDlhMTM2NTQ3MmUxZjliOTAw
|
15
|
+
ZWUxMGRjNjNkZDQ3OTk2YjI2MWIwMWJhODkxODZiN2RiNzRjN2M=
|
data/lib/eicar/version.rb
CHANGED
data/lib/eicar.rb
CHANGED
@@ -46,12 +46,17 @@ module EICAR
|
|
46
46
|
end
|
47
47
|
|
48
48
|
# Returns a TrueClass if the file was created and is readable in the
|
49
|
-
#
|
49
|
+
# given path (by default, the expected path for the EICAR test file).
|
50
|
+
#
|
51
|
+
# For system-wide gem installs, this will usually need
|
50
52
|
# to be run as root, or else you'll raise.
|
51
|
-
|
53
|
+
#
|
54
|
+
# TODO: yardify this
|
55
|
+
def self.create(path=nil)
|
52
56
|
data = self.rot13(ROT13_DOWNCASE_EICAR).upcase
|
53
57
|
begin
|
54
|
-
|
58
|
+
path ||= self.test_file_path
|
59
|
+
File.open(path, "wb") {|f| f.write data}
|
55
60
|
rescue SystemCallError
|
56
61
|
raise EICAR::EICARWriteError
|
57
62
|
end
|