mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2024-12-18 04:04:29 -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)
|
||||
|
||||
## Weapons
|
||||
- OS: Linux(![](./images/linux.png)) macOS(![](./images/apple.png)) Windows(![](./images/windows.png))
|
||||
- Browser-Addon: Firefox(![](./images/firefox.png)) Safari(![](./images/safari.png)) Chrome(![](./images/chrome.png))
|
||||
- Tool-Addon: ZAP(![](./images/zap.png)) BurpSuite(![](./images/burp.png))
|
||||
*Attributes*
|
||||
| | Attributes |
|
||||
|-------|---------------------------------------------------|
|
||||
| Types | `Recon` `Fuzzer` `Scanner` `Exploit` `Utils` `Etc`|
|
||||
| Tags | <%= tags.uniq.join ' ' %> |
|
||||
| Langs | <%= langs.uniq.join ' ' %> |
|
||||
|
||||
### Tools
|
||||
<%= tools %>
|
||||
@ -82,19 +85,58 @@ I would like to thank everyone who helped with this project 👍😎
|
||||
|
||||
}.gsub(/^ /, '')
|
||||
|
||||
head = "| Type | Name | Description | Star | Badges |\n"
|
||||
head = head + "| --- | --- | --- | --- | --- |"
|
||||
tags = []
|
||||
langs = []
|
||||
head = "| Type | Name | Description | Star | Tags | Badges |\n"
|
||||
head = head + "| --- | --- | --- | --- | --- | --- |"
|
||||
tools = head + "\n"
|
||||
bookmarklets = head + "\n"
|
||||
browser_addons = head + "\n"
|
||||
tool_addons = head + "\n"
|
||||
|
||||
weapons = []
|
||||
weapons_obj = {
|
||||
"recon"=> [],
|
||||
"fuzzer"=> [],
|
||||
"scanner"=> [],
|
||||
"exploit"=> [],
|
||||
"utils"=> [],
|
||||
"etc"=> []
|
||||
}
|
||||
|
||||
Dir.entries("./weapons/").each do | name |
|
||||
if name != '.' && name != '..'
|
||||
begin
|
||||
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']
|
||||
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
|
||||
name = "[#{name}](#{data['url']})"
|
||||
@ -106,8 +148,8 @@ Dir.entries("./weapons/").each do | name |
|
||||
end
|
||||
badge = generate_badge(data['platform'])
|
||||
badge = badge + generate_tags(data['tags'])
|
||||
line = "|#{data['type']}|#{name}|#{data['description']}|#{popularity}|#{badge}|"
|
||||
case data['category']
|
||||
line = "|#{data['type']}|#{name}|#{data['description']}|#{popularity}|#{temp_tags.join ' '}|#{badge}#{lang_badge}|"
|
||||
case data['category'].downcase
|
||||
when 'tool'
|
||||
tools = tools + line + "\n"
|
||||
when 'tool-addon'
|
||||
@ -122,7 +164,6 @@ Dir.entries("./weapons/").each do | name |
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
markdown = ERB.new(template, trim_mode: "%<>")
|
||||
|
Loading…
Reference in New Issue
Block a user