Syhunt = extensionpack:new()
Syhunt.filename = 'Syhunt.scx'
Syhunt.msg_restart = 'This change will take effect when you restart the Sandcat Browser.'
function Syhunt:init()
local csmenu = [[
Ruby Console
]]
local pagemenu = [[
Search Source...
Run JavaScript
View Cached Version
View Cookie
View Headers
View Images
Whois
]]
local extmenu = [[
Brute Force
]]
browser.navbar:addhtml('#csmenu-list',csmenu)
browser.navbar:inserthtml(5,'#pagemenu-list',pagemenu)
browser.navbar:inserthtml(2,'#navbarmenu-list',"New Editor Tab")
browser.navbar:inserthtml(0,'#ext-list',extmenu)
browser.navbar:inserthtmlfile(0,'#toolbar','Syhunt.scx#Navbar.html')
browser.navbar:inserthtmlfile(1,'#searcheng-list','Syhunt.scx#Searcheng.html')
if browser.info.initmode == 'sandcat' then
browser.tabbar:inserthtml("#newtab",'#tabmenuext',"New Editor Tab")
end
self:dofile('Scripts/Tor.lua')
self:dofile('Scripts/NirSoft.lua')
Tor:Startup()
NirSoft:Startup()
end
function Syhunt:afterinit()
browser.addlibinfo('Pascal Script library','3.0.3.57','RemObjects Software','Sandcat:ShowLicense(Syhunt.filename,[[Docs\\License_PascalScript.txt]])')
browser.addlibinfo('CodeRay','1.0.9','Kornelius Kalnbach','Sandcat:ShowLicense(Syhunt.filename,[[Docs\\License_CodeRay.txt]])')
browser.addlibinfo('PHP','5.3.1.0','The PHP Group')
browser.addlibinfo('RegExpr library','0.944','Andrey V. Sorokin','Sandcat:ShowLicense(Syhunt.filename,[[Docs\\License_RegExpr.txt]])')
browser.addlibinfo('Ruby','file:msvcrt-ruby18.dll','Yukihiro Matsumoto')
--browser.addlibinfo('Tor','0.2.2.39','The Tor Project, Inc.','Sandcat:ShowLicense(Syhunt.filename,[[Docs\\License_Tor.txt]])')
self:dofile('Scripts/URLGet.lua')
self:dofile('Scripts/CodeEditor.lua')
self:dofile('Scripts/ScriptRunner.lua')
self:dofile('Scripts/Encoder.lua')
self:dofile('Scripts/quickinject/quickinject.lua')
self:dofile('Commands.lua')
quickinject:add()
SyCommands:Add()
ScriptRunner:start()
end
function Syhunt:shutdown()
if Tor ~= nil then
Tor:Shutdown()
end
end
function Syhunt:CrackMD5()
if MD5CrackPHP == nil then
self:dofile('Scripts/bruteforce/md5crack.lua')
end
MD5CrackPHP:load()
end
function Syhunt:EditRequest()
if XHREditor == nil then
self:dofile('Scripts/XHREditor.lua')
end
XHREditor:load(tab.url)
end
function Syhunt:EditRequestLow()
if ReqEditorLow == nil then
self:dofile('Scripts/ReqEditorLow.lua')
end
ReqEditorLow:vieweditor()
end
function Syhunt:PageFind()
self:dofile('Scripts/SearchSource.lua')
SearchSource:load()
end
function Syhunt:LoadPageInfoTab(name)
if PageInfo == nil then
self:dofile('Scripts/PageInfo.lua')
end
if name == 'explorer' then
PageInfo:load()
end
if name == 'images' then
PageInfo:viewimages()
end
end
function Syhunt:ViewRequestLoader()
if ReqLoader == nil then
self:dofile('Scripts/ReqLoader.lua')
end
ReqLoader:viewloader()
end
function Syhunt:NewHTTPRequest()
local c = scl.httprequest:new()
if browser.info.proxy == Tor.proxyserver then
-- Tor is enabled
Tor:ConfigureHTTPClient(c,true)
end
return c
end
function Syhunt:OpenWithAgent(navigator)
if UAChanger == nil then
self:dofile('Scripts/UAChanger.lua')
end
UAChanger:OpenWithAgent(navigator)
end
function Syhunt:SetUserAgent(navigator)
if UAChanger == nil then
self:dofile('Scripts/UAChanger.lua')
end
if navigator == 'Custom' then
UAChanger:DisplayUserAgentList()
else
UAChanger:SetUserAgent(navigator)
end
end
function Syhunt:ViewPageCookies()
if CookieView == nil then
self:dofile('Scripts/CookieView.lua')
end
CookieView:load()
end
function Syhunt:ViewCachedPage(url)
if ReqViewer == nil then
self:dofile('Scripts/ReqViewer.lua')
end
ReqViewer:viewcached(url)
end
function Syhunt:ViewCGIScanner()
if CGIScanner == nil then
self:dofile('Scripts/CGIScanner.lua')
end
CGIScanner:load()
end
function Syhunt:ViewHTTPBruteForce()
if HTTPAuthForce == nil then
self:dofile('Scripts/HTTPAuthForce.lua')
end
HTTPAuthForce:load()
end
function Syhunt:ViewPageHeaders()
if HeadView == nil then
self:dofile('Scripts/HeadView.lua')
end
HeadView:load()
end
function Syhunt:ViewFuzzer()
if Fuzzer == nil then
self:dofile('Scripts/Fuzzer.lua')
end
Fuzzer:view()
end
function Syhunt:ViewFuzzerLow()
if Fuzzer == nil then
self:dofile('Scripts/Fuzzer.lua')
end
Fuzzer:view_lowlevel()
end
function Syhunt:ViewMultiEncoder()
if MultiEncoder == nil then
self:dofile('Scripts/EncoderMulti.lua')
end
MultiEncoder:viewencoders()
end
function Syhunt:ViewUserAgent()
if UAChanger == nil then
self:dofile('Scripts/UAChanger.lua')
end
UAChanger:DisplayUserAgent()
end
function Syhunt:Whois(url)
if Sandcat:IsURLLoaded(true) then
self:dofile("Scripts/commands/whois.lua")
browser.setactivepage('log')
tab.logtext = getwhois(url)
else
app.showmessage("No URL loaded.")
end
end