mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2024-12-18 12:14:22 -05:00
Update erb script
This commit is contained in:
parent
2ad89e7645
commit
6915ffba4a
@ -60,9 +60,12 @@ A collection of awesome tools used by Web hackers. Happy hacking , Happy bug-hun
|
|||||||
- [Thanks to contributor](#thanks-to-contributor)
|
- [Thanks to contributor](#thanks-to-contributor)
|
||||||
|
|
||||||
## Weapons
|
## Weapons
|
||||||
- OS: Linux(![](./images/linux.png)) macOS(![](./images/apple.png)) Windows(![](./images/windows.png))
|
*Attributes*
|
||||||
- Browser-Addon: Firefox(![](./images/firefox.png)) Safari(![](./images/safari.png)) Chrome(![](./images/chrome.png))
|
| | Attributes |
|
||||||
- Tool-Addon: ZAP(![](./images/zap.png)) BurpSuite(![](./images/burp.png))
|
|-------|---------------------------------------------------|
|
||||||
|
| Types | `Recon` `Fuzzer` `Scanner` `Exploit` `Utils` `Etc`|
|
||||||
|
| Tags | <%= tags.uniq.join ' ' %> |
|
||||||
|
| Langs | <%= langs.uniq.join ' ' %> |
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
<%= tools %>
|
<%= tools %>
|
||||||
@ -82,19 +85,58 @@ I would like to thank everyone who helped with this project 👍😎
|
|||||||
|
|
||||||
}.gsub(/^ /, '')
|
}.gsub(/^ /, '')
|
||||||
|
|
||||||
head = "| Type | Name | Description | Star | Badges |\n"
|
tags = []
|
||||||
head = head + "| --- | --- | --- | --- | --- |"
|
langs = []
|
||||||
|
head = "| Type | Name | Description | Star | Tags | Badges |\n"
|
||||||
|
head = head + "| --- | --- | --- | --- | --- | --- |"
|
||||||
tools = head + "\n"
|
tools = head + "\n"
|
||||||
bookmarklets = head + "\n"
|
bookmarklets = head + "\n"
|
||||||
browser_addons = head + "\n"
|
browser_addons = head + "\n"
|
||||||
tool_addons = head + "\n"
|
tool_addons = head + "\n"
|
||||||
|
|
||||||
|
weapons = []
|
||||||
|
weapons_obj = {
|
||||||
|
"recon"=> [],
|
||||||
|
"fuzzer"=> [],
|
||||||
|
"scanner"=> [],
|
||||||
|
"exploit"=> [],
|
||||||
|
"utils"=> [],
|
||||||
|
"etc"=> []
|
||||||
|
}
|
||||||
|
|
||||||
Dir.entries("./weapons/").each do | name |
|
Dir.entries("./weapons/").each do | name |
|
||||||
if name != '.' && name != '..'
|
if name != '.' && name != '..'
|
||||||
begin
|
begin
|
||||||
data = YAML.load(File.open("./weapons/#{name}"))
|
data = YAML.load(File.open("./weapons/#{name}"))
|
||||||
|
if data['type'] != "" && data['type'] != nil
|
||||||
|
weapons_obj[data['type'].downcase].push data
|
||||||
|
else
|
||||||
|
weapons_obj['etc'].push data
|
||||||
|
end
|
||||||
|
rescue => e
|
||||||
|
puts e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
weapons_obj.each do |key,value|
|
||||||
|
weapons.concat value
|
||||||
|
end
|
||||||
|
|
||||||
|
weapons.each do | data |
|
||||||
|
begin
|
||||||
name = data['name']
|
name = data['name']
|
||||||
popularity = "x"
|
temp_tags = []
|
||||||
|
data['tags'].each do |t|
|
||||||
|
temp_tags.push "`#{t}`"
|
||||||
|
end
|
||||||
|
tags.concat temp_tags
|
||||||
|
lang_badge = ""
|
||||||
|
if data['lang'].length > 0 && data['lang'] != "null"
|
||||||
|
langs.push "`#{data['lang']}`"
|
||||||
|
lang_badge = "![](./images/#{data['lang'].downcase}.png)"
|
||||||
|
end
|
||||||
|
|
||||||
|
popularity = ""
|
||||||
|
|
||||||
if data['url'].length > 0
|
if data['url'].length > 0
|
||||||
name = "[#{name}](#{data['url']})"
|
name = "[#{name}](#{data['url']})"
|
||||||
@ -106,8 +148,8 @@ Dir.entries("./weapons/").each do | name |
|
|||||||
end
|
end
|
||||||
badge = generate_badge(data['platform'])
|
badge = generate_badge(data['platform'])
|
||||||
badge = badge + generate_tags(data['tags'])
|
badge = badge + generate_tags(data['tags'])
|
||||||
line = "|#{data['type']}|#{name}|#{data['description']}|#{popularity}|#{badge}|"
|
line = "|#{data['type']}|#{name}|#{data['description']}|#{popularity}|#{temp_tags.join ' '}|#{badge}#{lang_badge}|"
|
||||||
case data['category']
|
case data['category'].downcase
|
||||||
when 'tool'
|
when 'tool'
|
||||||
tools = tools + line + "\n"
|
tools = tools + line + "\n"
|
||||||
when 'tool-addon'
|
when 'tool-addon'
|
||||||
@ -123,7 +165,6 @@ Dir.entries("./weapons/").each do | name |
|
|||||||
puts e
|
puts e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
markdown = ERB.new(template, trim_mode: "%<>")
|
markdown = ERB.new(template, trim_mode: "%<>")
|
||||||
#puts markdown.result
|
#puts markdown.result
|
||||||
|
Loading…
Reference in New Issue
Block a user