mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2024-12-20 21:24:37 -05:00
y
This commit is contained in:
parent
71c13bf8a3
commit
23377146a3
@ -1,5 +1,6 @@
|
|||||||
require 'json'
|
require 'json'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
require "uri"
|
||||||
|
|
||||||
def get_os install
|
def get_os install
|
||||||
lst = []
|
lst = []
|
||||||
@ -15,6 +16,10 @@ def get_os install
|
|||||||
return lst
|
return lst
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_urls str
|
||||||
|
return URI.extract(str).uniq
|
||||||
|
end
|
||||||
|
|
||||||
file = File.read('./data.json')
|
file = File.read('./data.json')
|
||||||
data_hash = JSON.parse(file)
|
data_hash = JSON.parse(file)
|
||||||
|
|
||||||
@ -24,7 +29,7 @@ data_hash.each do | name, obj |
|
|||||||
new_obj = {}
|
new_obj = {}
|
||||||
new_obj['name'] = name
|
new_obj['name'] = name
|
||||||
new_obj['description'] = obj['Description']
|
new_obj['description'] = obj['Description']
|
||||||
new_obj['url'] = '' # parse DATA
|
new_obj['urls'] = get_urls obj['Data']
|
||||||
new_obj['category'] = 'tool'
|
new_obj['category'] = 'tool'
|
||||||
new_obj['types'] = []
|
new_obj['types'] = []
|
||||||
if obj['Install'] != nil
|
if obj['Install'] != nil
|
||||||
|
Loading…
Reference in New Issue
Block a user