Skip to content

Commit

Permalink
BeVigil Source Added
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-glitch committed Jul 19, 2022
1 parent 5f07a52 commit 038c0fb
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions resources/scripts/api/bevigil.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
local json = require("json")

name = "BeVigil"
type = "api"

function start()
set_rate_limit(2)
end

function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end

if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end

function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end

-- if (c == nil or c.key == nil or c.key == "") then
-- return
-- end

local vurl = "http://osint.bevigil.com/api/" .. domain .. "/subdomains/"
local resp, err = request(ctx, {
url=vurl,
headers={['X-Access-Token']=c.key},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
return
end

local d = json.decode(resp)
if (d == nil or #(d.subdomains) == 0) then
return
end

for i, v in pairs(d.subdomains) do
new_name(ctx, v)
end

end

0 comments on commit 038c0fb

Please sign in to comment.