Created
June 25, 2025 13:45
-
-
Save oxagast/e1717000504d3fe2ff64879a0d18d1ec to your computer and use it in GitHub Desktop.
Exploit RSS Feed Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require "rss" | |
require "date" | |
urlbase = "https://oxasploits.com" | |
rss = RSS::Maker.make("atom") do |maker| | |
maker.channel.author = "Marshall Whittaker" | |
maker.channel.about = urlbase + "/exploits/" | |
maker.channel.title = "The Oxasploits Exploit Feed" | |
maker.channel.updated = Time.now.to_s | |
Dir.glob('sploits/*.md') do |md_filename| | |
maker.items.new_item do |item| | |
File.open(md_filename, "r") do |file| | |
file.each_line do |line| | |
if line.match(/permalink: /) | |
linkm = line.match(/permalink: (.*)/) | |
item.link = urlbase + linkm[1] | |
end | |
if line.match(/description: /) | |
titlem = line.match(/description: "(.*)"/) | |
item.title = titlem[1] | |
end | |
if line.match(/date: / ) | |
datet = line.match(/date: (\d{4})-(\d{2})-(\d{2})/) | |
item.updated = Time.new(datet[1].to_i, datet[2].to_i, datet[3].to_i).to_s | |
end | |
end | |
end | |
end | |
end | |
end | |
puts rss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment