rex-random_identifier 0.1.18 → 0.1.20
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 +4 -4
- data/README.md +9 -11
- data/lib/rex/random_identifier/generator.rb +2 -1
- data/lib/rex/random_identifier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1535a86c7b5bcab6e709ba8337f165f2a5f0179ba2a82ab4f96b029a0630cb98
|
4
|
+
data.tar.gz: 191058bcd6288fe7ba429bcaa36f12861695f5b5cf7af92ce199f90ce4708c13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08182b8117736c3c2b1113926c353c7b16f1f46935a7f5886a7c7f56aa0c341f174f54d4eefa54e3decbf4697b13a4ee442477864613fa7524ff33abdc5e68b9'
|
7
|
+
data.tar.gz: 58c553250b747f9474ae18f4535425c4ffdff3be321b328150305a03468040f0c875711681c968c8716903363e1630010750fc186cd431c81c3c177bbebc613f
|
data/README.md
CHANGED
@@ -23,16 +23,15 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
Example
|
25
25
|
```ruby
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
#
|
26
|
+
vars = Rex::RandomIdentifierGenerator.new
|
27
|
+
asp_code = <<-END_CODE
|
28
|
+
Sub #{vars[:func]}()
|
29
|
+
Dim #{vars[:fso]}
|
30
|
+
Set #{vars[:fso]} = CreateObject("Scripting.FileSystemObject")
|
31
|
+
...
|
32
|
+
End Sub
|
33
|
+
#{vars[:func]}
|
34
|
+
END_CODE
|
36
35
|
```
|
37
36
|
|
38
37
|
## Development
|
@@ -44,4 +43,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
44
43
|
## Contributing
|
45
44
|
|
46
45
|
Bug reports and pull requests are welcome on GitHub at https://github.com/rapid7/rex-random_identifier. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
47
|
-
|
@@ -427,7 +427,8 @@ class Rex::RandomIdentifier::Generator
|
|
427
427
|
#
|
428
428
|
# @return [Boolean] Is identifier forbidden?
|
429
429
|
def forbid_id?(ident = nil)
|
430
|
-
ident.nil?
|
430
|
+
return true if ident.nil?
|
431
|
+
@opts[:forbidden].any? { |f| f.casecmp?(ident) }
|
431
432
|
end
|
432
433
|
|
433
434
|
end
|