Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-script #123

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/caido.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 16 additions & 14 deletions scripts/erb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def generate_badge array
badge = badge + "![chrome](/images/chrome.png)"
when 'burpsuite'
badge = badge + "![burp](/images/burp.png)"
when 'caido'
badge = badge + "![caido](/images/caido.png)"
when 'zap'
badge = badge + "![zap](/images/zap.png)"
end
Expand Down Expand Up @@ -55,9 +57,9 @@ def generate_tags array
<br>
<a href=""><img src="https://user-images.githubusercontent.com/13212227/104400969-9f3d9280-5596-11eb-80f4-864effae95fc.png" alt="" width="500px;"></a>
<br>
<img src="https://img.shields.io/github/last-commit/hahwul/WebHackersWeapons?style=flat">
<img src="https://img.shields.io/github/last-commit/hahwul/WebHackersWeapons?style=flat">
<img src="https://img.shields.io/badge/PRs-welcome-cyan">
<img src="https://github.com/hahwul/WebHackersWeapons/actions/workflows/deploy.yml/badge.svg">
<img src="https://github.com/hahwul/WebHackersWeapons/actions/workflows/cd.yml/badge.svg">
<a href="https://twitter.com/intent/follow?screen_name=hahwul"><img src="https://img.shields.io/twitter/follow/hahwul?style=flat&logo=twitter"></a>
</h1>
A collection of awesome tools used by Web hackers. Happy hacking , Happy bug-hunting
Expand All @@ -72,7 +74,7 @@ def generate_tags array
- [Bookmarklets](#bookmarklets)
- [Browser Addons](#browser-addons)
- [Burp and ZAP Addons](#burpsuite-and-zap-addons)
- [Contribute](CONTRIBUTING.md)
- [Contribute](CONTRIBUTING.md)
- [Thanks to contributor](#thanks-to-contributor)

## Weapons
Expand Down Expand Up @@ -131,7 +133,7 @@ def generate_tags array
data = YAML.load(File.open("./weapons/#{name}"))

if data['type'] != "" && data['type'] != nil
if weapons_obj[data['type'].downcase] != nil
if weapons_obj[data['type'].downcase] != nil
weapons_obj[data['type'].downcase].push data
else
weapons_obj[data['type'].downcase] = []
Expand All @@ -140,7 +142,7 @@ def generate_tags array
else
weapons_obj['etc'].push data
end
rescue => e
rescue => e
puts e
end
end
Expand Down Expand Up @@ -169,10 +171,10 @@ def generate_tags array
end
rescue
end

popularity = ""

if data['url'].length > 0
if data['url'].length > 0
name = "[#{name}](#{data['url']})"
end

Expand All @@ -182,7 +184,7 @@ def generate_tags array
end
badge = generate_badge(data['platform'])
line = "|#{data['type']}|#{name}|#{data['description']}|#{popularity}|#{temp_tags.join ' '}|#{badge}#{lang_badge}|"
case data['category'].downcase
case data['category'].downcase
when 'tool'
tools = tools + line + "\n"
when 'tool-addon'
Expand All @@ -198,7 +200,7 @@ def generate_tags array
tmp_lang = data['lang']
tmp_tags = data['tags']

if tmp_tags != nil
if tmp_tags != nil
tmp_tags.each do |t|
if categorize_tags[t] == nil
categorize_tags[t] = line + "\n"
Expand All @@ -207,16 +209,16 @@ def generate_tags array
end
end
end

if tmp_lang != nil
if categorize_langs[tmp_lang] == nil
if categorize_langs[tmp_lang] == nil
categorize_langs[tmp_lang] = line + "\n"
else
categorize_langs[tmp_lang] = categorize_langs[tmp_lang] + line + "\n"
end
end

rescue => e
rescue => e
puts e
end
end
Expand All @@ -236,11 +238,11 @@ def generate_tags array
end

categorize_langs.each do |key,value|
if key != nil && key != ""
if key != nil && key != ""
@ct_lang = key
@ct_head = head + "\n"
@ct_data = value
lang_markdown = ERB.new(categorize_template_langs, trim_mode: "%<>")
File.write "./categorize/langs/#{@ct_lang}.md", lang_markdown.result
end
end
end
Loading