123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-"
- # vim: set expandtab tabstop=4 shiftwidth=4:
- """
- This file is part of the XSSer project, https://xsser.03c8.net
- Copyright (c) 2010/2019 | psy <epsylon@riseup.net>
- xsser is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation version 3 of the License.
- xsser is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
- You should have received a copy of the GNU General Public License along
- with xsser; if not, write to the Free Software Foundation, Inc., 51
- Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- """
- import sys
- import os, datetime
- import math
- import socket
- import webbrowser
- import threading
- import gi
- gi.require_version('Gtk', '3.0')
- gi.require_version('Gdk', '3.0')
- from gi.repository import Gtk as gtk
- from gi.repository import Gdk as gdk
- from gi.repository import GLib as gobject
- from threading import Thread
- from xml.dom import minidom
- gdk.threads_init()
- use_twisted = False
- if use_twisted:
- from twisted.internet import gtk2reactor
- gtk2reactor.install()
- from twisted.internet import reactor
- else:
- reactor = None
- from core.main import xsser
- from core.globalmap import GlobalMap
- from core.reporter import XSSerReporter
- from core.mozchecker import MozChecker
- class Controller(XSSerReporter):
- def __init__(self, uifile, mothership, window='window1'):
- wTree = gtk.Builder()
- self.xsser = xsser()
- self.mothership = mothership
- self._flying = None
- self._quitting = False
- self.map = None
- self.wTree = wTree
- path = self.mothership.get_gtk_directory()
- wTree.add_from_file(os.path.join(path, uifile))
- self.fill_combos()
- wTree.connect_signals(self)
- window = wTree.get_object(window)
- window.set_size_request(800, 600)
- window.maximize()
- window.show()
- self._window = window
- self.output = wTree.get_object('textview_main')
- self.status = wTree.get_object('status_bar')
- self.output_wizard = wTree.get_object('textview_w_start')
- self._wizard_buffer = self.output_wizard.get_buffer()
- self.counters_label = wTree.get_object('counters_label')
- self._report_vulnerables = wTree.get_object('report_vulnerables').get_buffer()
- self._report_success = wTree.get_object('report_success').get_buffer()
- self._report_failed = wTree.get_object('report_failed').get_buffer()
- self._report_errors = wTree.get_object('report_errors').get_buffer()
- self._report_crawling = wTree.get_object('report_crawling').get_buffer()
- # GUI spinner inits
- threads_spin = self.wTree.get_object('threads')
- threads_spin.set_range(0,100)
- threads_spin.set_value(5)
- threads_spin.set_increments(1, 1)
- timeout_spin = self.wTree.get_object('timeout')
- timeout_spin.set_range(0,100)
- timeout_spin.set_value(30)
- timeout_spin.set_increments(1, 1)
- retries_spin = self.wTree.get_object('retries')
- retries_spin.set_range(0,10)
- retries_spin.set_value(1)
- retries_spin.set_increments(1, 1)
- delay_spin = self.wTree.get_object('delay')
- delay_spin.set_range(0,100)
- delay_spin.set_value(0)
- delay_spin.set_increments(1, 1)
- follow_spin = self.wTree.get_object('follow-limit')
- follow_spin.set_range(0,100)
- follow_spin.set_value(0)
- follow_spin.set_increments(1, 1)
- alive_spin = self.wTree.get_object('alive-limit')
- alive_spin.set_range(0,100)
- alive_spin.set_value(0)
- alive_spin.set_increments(1, 1)
- crawler2_spin = self.wTree.get_object('combobox5')
- crawler2_spin.set_range(1, 99999)
- crawler2_spin.set_value(50)
- crawler2_spin.set_increments(1, 1)
- window.connect("destroy", self.on_quit)
- # geoip + geomap inits
- self.domaintarget = ""
- # wizard options inits
- self.text_ascii = ""
- # step 1
- self.target_option = ""
- self.dork_option = ""
- self.dorkengine_option = ""
- self.combo_step1_choose = ""
- # step 2
- self.payload_option = ""
- self.combo_step2_choose = ""
- # step 3
- self.combo_step3_choose = ""
- self.proxy_option = ""
- self.useragent_option = ""
- self.referer_option = ""
- # step 4
- self.combo_step4_choose = ""
- self.cem_option = ""
- # step 5
- self.combo_step5_choose = ""
- self.scripts_option = ""
- self.mothership.add_reporter(self)
- # text buffered on wizard startup
- wizard_output = wTree.get_object('textview_w_start')
- buffer_wizard = wizard_output.get_buffer()
- file = self.open_wizard_file("wizard0")
- self.text_ascii = file.read()
- file.close()
- buffer_wizard.set_text(self.text_ascii)
- # text buffered on wizard1
- wizard1_output = wTree.get_object('textview_w_1')
- buffer = wizard1_output.get_buffer()
- file = self.open_wizard_file("wizard1")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- # text buffered on wizard2
- wizard2_output = wTree.get_object('textview_w_2')
- buffer = wizard2_output.get_buffer()
- file = self.open_wizard_file("wizard2")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- # text buffered on wizard3
- wizard3_output = wTree.get_object('textview_w_3')
- buffer = wizard3_output.get_buffer()
- file = self.open_wizard_file("wizard3")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
-
- # text buffered on wizard4
- wizard4_output = wTree.get_object('textview_w_4')
- buffer = wizard4_output.get_buffer()
- file = self.open_wizard_file("wizard4")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- # text buffered on wizard5
- wizard5_output = wTree.get_object('textview_w_5')
- buffer = wizard5_output.get_buffer()
- file = self.open_wizard_file("wizard5")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- # text buffered on wizard end
- wizard_end_output = wTree.get_object('textview_w_end')
- buffer = wizard_end_output.get_buffer()
- file = self.open_wizard_file("wizard6")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- # text buffered on wizard about
- index_output = wTree.get_object('textview_about')
- buffer = index_output.get_buffer()
- file = self.open_wizard_file("about")
- text_ascii = file.read()
- file.close()
- buffer.set_text(text_ascii)
- self.setup_mozembed()
- def open_wizard_file(self, name):
- path = self.mothership.get_gtk_directory()
- file = open(os.path.join(path, 'docs', name+'.txt'), 'r')
- return file
- def fill_with_options(self, combobox, options):
- model = gtk.ListStore(str)
- for option in options:
- model.append([option])
- combobox.set_active(0)
- combobox.set_model(model)
- cell = gtk.CellRendererText()
- combobox.pack_start(cell, True)
- combobox.add_attribute(cell, 'text', 0)
- def start_crawl(self, dest_url):
- gdk.threads_enter()
- self.status.set_text("scanning")
- self.status.pulse()
- gdk.threads_leave()
- self.add_report_text(self._report_crawling, dest_url)
- def add_checked(self, dest_url):
- self.add_report_text(self._report_success, dest_url)
- def add_success(self, dest_url):
- self.add_report_text(self._report_vulnerables, dest_url)
- totalhits = self.wTree.get_object('totalhits')
- totalhits.set_property("label", str(int(totalhits.get_property("label"))+1))
- successhits = self.wTree.get_object('successhits')
- successhits.set_property("label", str(int(successhits.get_property("label"))+1))
- def report_error(self, error_msg):
- self.add_report_text(self._report_failed, error_msg)
- def mosquito_crashed(self, dest_url, reason):
- self.add_report_text(self._report_errors, dest_url+" ["+reason+"]")
- def add_failure(self, dest_url):
- self.add_report_text(self._report_failed, dest_url)
- totalhits = self.wTree.get_object('totalhits')
- totalhits.set_property("label", str(int(totalhits.get_property("label"))+1))
- failedhits = self.wTree.get_object('failedhits')
- failedhits.set_property("label", str(int(failedhits.get_property("label"))+1))
- def add_report_text(self, gtkbuffer, text):
- gdk.threads_enter()
- iter = gtkbuffer.get_end_iter()
- gtkbuffer.insert(iter, text+'\n')
- gdk.threads_leave()
- def setup_mozembed(self):
- self.moz = MozChecker(self)
- self.mothership.set_webbrowser(self.moz)
- def fill_combos(self):
- # ui comboboxes
- dorker2_options_w = self.wTree.get_object('combobox4')
- dorker3_options_w = self.wTree.get_object('combobox6')
- crawlerdeep_options_w = self.wTree.get_object('combobox_deep1')
- connect_geomap_w = self.wTree.get_object('combobox7')
- checkmethod_options_w = self.wTree.get_object('combobox1')
- # wizard steps comboboxes
- step1_options_w = self.wTree.get_object('combobox_step1')
- step2_options_w = self.wTree.get_object('combobox_step2')
- step3_options_w = self.wTree.get_object('combobox_step3')
- step4_options_w = self.wTree.get_object('combobox_step4')
- step5_options_w = self.wTree.get_object('combobox_step5')
- # ui comboboxes content
- dorker_options = [ 'duck', 'startpage', 'yahoo', 'bing']
- crawlerdeep_options = ['1', '2', '3', '4', '5']
- checkmethod_options = ['GET', 'POST']
- connect_geomap = ['OFF', 'ON']
- # wizard comboboxes content
- step1_options = ['0', '1', '2']
- step2_options = ['0', '1', '2', '3', '4']
- step3_options = ['0', '1', '2', '3', '4']
- step4_options = ['0', '1', '2', '3', '4', '5']
- step5_options = ['0', '1', '2', '3']
- # all comboboxes handlered
- self.fill_with_options(dorker2_options_w, dorker_options)
- self.fill_with_options(dorker3_options_w, dorker_options)
- self.fill_with_options(crawlerdeep_options_w, crawlerdeep_options)
- self.fill_with_options(connect_geomap_w, connect_geomap)
- self.fill_with_options(checkmethod_options_w, checkmethod_options)
- self.fill_with_options(step1_options_w, step1_options)
- self.fill_with_options(step2_options_w, step2_options)
- self.fill_with_options(step3_options_w, step3_options)
- self.fill_with_options(step4_options_w, step4_options)
- self.fill_with_options(step5_options_w, step5_options)
- def on_set_clicked(self, widget):
- """
- Set your mosquito(s) options
- """
- # control authmode
- auth_none = self.wTree.get_object('auth_none')
- auth_cred = self.wTree.get_object('auth_cred')
- if auth_cred.get_property('text') == "":
- auth_none.set_property('active', True)
-
- commandsenter = self.wTree.get_object('commandsenter')
- targetenter = self.wTree.get_object('targetenter')
- explorer_enter = self.wTree.get_object('explorer_enter')
- if targetenter.get_text() == "" and explorer_enter.get_text() == "":
- pass
- else:
- cmd = self.generate_command()
- commandsenter.set_property("text"," ".join(cmd))
-
- app = xsser()
- options = app.create_options(cmd)
- app.set_options(options)
-
- app.set_reporter(self)
- pass
- # set visor counters to zero
- totalhits = self.wTree.get_object('totalhits')
- totalhits.set_property("label", "0")
- failedhits = self.wTree.get_object('failedhits')
- failedhits.set_property("label", "0")
- successhits = self.wTree.get_object('successhits')
- successhits.set_property("label", "0")
- def end_attack(self):
- gdk.threads_enter()
- self.status.set_text("idle")
- self.status.set_fraction(0.0)
- fly_button = self.wTree.get_object('fly')
- fly_button.set_label('FLY!!!')
- fly_button.set_sensitive(True)
- if self._quitting:
- pass
- else:
- gobject.timeout_add(0, self.park_mosquito)
- gdk.threads_leave()
- def park_mosquito(self):
- self._flying.join()
- self._flying = None
- def on_stop_attack(self):
- if self._flying:
- self._flying.app.land()
- def on_quit(self, widget, data=None):
- """
- Callback called when the window is destroyed (close button clicked)
- """
- if self._flying:
- print("[Info] Exiting... please wait until all mosquitoes return to mothership!\n")
- self._quitting = True
- self.on_stop_attack()
- self.do_quit()
- else:
- print("byezZZZzzzz!\n")
- self.do_quit()
- def do_quit(self):
- self.mothership.land(True)
- #if self.moz:
- # self.moz.shutdown()
- if reactor:
- threadpool = reactor.getThreadPool()
- threadpool.stop()
- reactor.stop()
- else:
- # doing it here doesnt seem to give time to
- # the mothership to land but should be ok
- gtk.main_quit()
- def start_token_check(self, dest_url):
- self.update_counters_label()
- def update_counters_label(self):
- rem = str(self.moz.remaining())
- th_count = str(threading.activeCount()-1)
- if self._flying:
- work_count = str(len(self._flying.app.pool.workRequests))
- app = self._flying.app
- crawled = str(len(app.crawled_urls))+"/"+str(app.options.crawling)
- else:
- work_count = ""
- crawled = "X"
- pars = [crawled, rem, th_count, work_count]
- gdk.threads_enter()
- self.counters_label.set_text(" ".join(pars))
- if pars[3]:
- pars[3] = "\nworks in queue: %s"%(pars[3],)
- self.counters_label.set_tooltip_text('crawled during last attack: %s\nremaining checks: %s\nalive threads: %s %s' % tuple(pars))
- gdk.threads_leave()
- def report_state(self, state, val=-1):
- if not gtk:
- # exiting..
- return
- gdk.threads_enter()
- self.status.set_text(state)
- if val == -1:
- self.status.pulse()
- else:
- self.status.set_fraction(val)
- gdk.threads_leave()
- self.update_counters_label()
- def on_fly_clicked(self, widget):
- """
- Fly your mosquito(s)
- """
- fly_button = self.wTree.get_object('fly')
- if self._flying:
- self.on_stop_attack()
- fly_button.set_label('LANDING!!!')
- fly_button.set_sensitive(False)
- return
- self.output.get_buffer().set_property("text", "")
- auth_none = self.wTree.get_object('auth_none')
- auth_cred = self.wTree.get_object('auth_cred')
- if auth_cred.get_property('text') == "":
- auth_none.set_property('active', True)
- commandsenter = self.wTree.get_object('commandsenter')
- cmd = self.generate_command()
- commandsenter.set_property("text"," ".join(cmd))
- t = XSSerThread(cmd, self.mothership)
- t.daemon = True
- t.add_reporter(self)
- t.set_webbrowser(self.moz)
- if self.map:
- t.add_reporter(self.map)
- self.mothership.add_reporter(self.map)
- targetenter = self.wTree.get_object('targetenter')
- explorer_enter = self.wTree.get_object('explorer_enter')
- if t.app.options == None:
- pass
- elif targetenter.get_text() == "" and explorer_enter.get_text() == "":
- pass
- else:
- t.start()
- self._flying = t
- fly_button.set_label('LAND!!!')
- # set visor counters to zero
- totalhits = self.wTree.get_object('totalhits')
- totalhits.set_property("label", "0")
- failedhits = self.wTree.get_object('failedhits')
- failedhits.set_property("label", "0")
- successhits = self.wTree.get_object('successhits')
- successhits.set_property("label", "0")
- # control on/off 'sensitive' switches
- def on_intruder_toggled(self, widget):
- """
- Active intruder mode
- """
- intruder = self.wTree.get_object('intruder')
- targetenter = self.wTree.get_object('targetenter')
- targetall = self.wTree.get_object('targetall')
- explorer_enter = self.wTree.get_object('explorer_enter')
- combobox4 = self.wTree.get_object('combobox4')
- if intruder.get_property('active') == True:
- targetenter.set_property('visible', True)
- targetall.set_property('visible', True)
- explorer_enter.set_property('visible', False)
- combobox4.set_property('visible', False)
- else:
- targetenter.set_property("text", "")
- targetenter.set_property('visible', False)
- targetall.set_property('visible', False)
- explorer_enter.set_property('visible', True)
- combobox4.set_property('visible', True)
- def on_explorer_toggled(self, widget):
- """
- Toggle ON/OFF explorer entry
- """
- explorer = self.wTree.get_object('explorer')
- targetenter = self.wTree.get_object('targetenter')
- targetall = self.wTree.get_object('targetall')
- explorer_enter = self.wTree.get_object('explorer_enter')
- combobox4 = self.wTree.get_object('combobox4')
- if explorer.get_property('active') == True:
- explorer_enter.set_property('visible', True)
- targetenter.set_property('visible', False)
- targetall.set_property('visible', False)
- combobox4.set_property('visible', True)
- else:
- explorer_enter.set_property("text", "")
- explorer_enter.set_property("visible", False)
- targetenter.set_property('visible', True)
- targetall.set_property('visible', True)
- combobox4.set_property('visible', False)
- def on_targetall_toggled(self, widget):
- """
- Autoconfigure XSSer options to perform an automatic XSS pentesting
- """
- targetall = self.wTree.get_object('targetall')
- crawler = self.wTree.get_object('crawler')
- crawler2_spin = self.wTree.get_object('combobox5')
- localonly1 = self.wTree.get_object('localonly1')
- statistics = self.wTree.get_object('statistics')
- threads_spin = self.wTree.get_object('threads')
- timeout_spin = self.wTree.get_object('timeout')
- retries_spin = self.wTree.get_object('retries')
- delay_spin = self.wTree.get_object('delay')
- followredirects = self.wTree.get_object('followredirects')
- no_head = self.wTree.get_object('no-head')
- reverse_check = self.wTree.get_object('reverse-check')
- automatic_payload = self.wTree.get_object('automatic_payload')
- cookie_injection = self.wTree.get_object('cookie_injection')
- xas = self.wTree.get_object('xas')
- xsr = self.wTree.get_object('xsr')
- dom = self.wTree.get_object('dom')
- dcp = self.wTree.get_object('dcp')
- induced = self.wTree.get_object('induced')
- save = self.wTree.get_object('save')
- exportxml = self.wTree.get_object('exportxml')
- if targetall.get_property('active') == True:
- crawler.set_property("active", True)
- localonly1.set_property("active", True)
- crawler2_spin.set_value(99999)
- statistics.set_property("active", True)
- threads_spin.set_value(10)
- timeout_spin.set_value(60)
- retries_spin.set_value(2)
- delay_spin.set_value(5)
- followredirects.set_property("active", True)
- no_head.set_property("active", True)
- reverse_check.set_property("active", True)
- automatic_payload.set_property("active", True)
- cookie_injection.set_property("active", True)
- xas.set_property("active", True)
- xsr.set_property("active", True)
- dom.set_property("active", True)
- dcp.set_property("active", True)
- induced.set_property("active", True)
- save.set_property("active", True)
- exportxml.set_property("active", True)
- else:
- crawler.set_property("active", False)
- localonly1.set_property("active", True)
- crawler2_spin.set_value(50)
- statistics.set_property("active", True)
- threads_spin.set_value(5)
- timeout_spin.set_value(30)
- retries_spin.set_value(1)
- delay_spin.set_value(0)
- followredirects.set_property("active", False)
- no_head.set_property("active", False)
- reverse_check.set_property("active", False)
- automatic_payload.set_property("active", False)
- cookie_injection.set_property("active", False)
- xas.set_property("active", False)
- xsr.set_property("active", False)
- dom.set_property("active", False)
- dcp.set_property("active", False)
- induced.set_property("active", False)
- save.set_property("active", False)
- exportxml.set_property("active", False)
- def on_torproxy_toggled(self, widget):
- """
- Sync tor mode with expert visor
- """
- torproxy = self.wTree.get_object('torproxy')
- proxy = self.wTree.get_object('proxy')
- if torproxy.get_property('active') == True:
- proxy.set_property('text', 'http://127.0.0.1:8118')
- else:
- proxy.set_property('text', "")
- def on_automatic_toggled(self, widget):
- """
- Sync automatic mode with expert visor
- """
- automatic = self.wTree.get_object('automatic')
- automatic_payload = self.wTree.get_object('automatic_payload')
- if automatic.get_property('active') == True:
- automatic_payload.set_property('active', True)
- else:
- automatic_payload.set_property('active', False)
- def on_automatic_payload_toggled(self, widget):
- """
- Syn. automatic_payload mode with other automatic switches
- """
- automatic = self.wTree.get_object('automatic')
- automatic_payload = self.wTree.get_object('automatic_payload')
- if automatic_payload.get_property('active') == True:
- automatic.set_property('active', True)
- else:
- automatic.set_property('active', False)
- def on_crawler_toggled(self, widget):
- """
- Toggle ON/OFF crawling on main visor
- """
- crawler = self.wTree.get_object('crawler')
- combobox5 = self.wTree.get_object('combobox5')
- combobox_deep1 = self.wTree.get_object('combobox_deep1')
- localonly1 = self.wTree.get_object('localonly1')
- if crawler.get_property('active') == True:
- combobox5.set_property('visible', True)
- combobox_deep1.set_property('visible', True)
- localonly1.set_property('visible', True)
- else:
- connection_none = self.wTree.get_object('connection_none')
- connection_none.set_property('active', True)
- combobox5.set_property("visible", False)
- combobox_deep1.set_property('visible', False)
- localonly1.set_property('visible', False)
- def on_get_toggled(self, widget):
- """
- Toggle ON/OFF payloading entry for GET
- """
- get = self.wTree.get_object('get')
- hbox41 = self.wTree.get_object('hbox41')
- if get.get_property('active') == True:
- hbox41.set_property('visible', True)
- else:
- hbox41.set_property("visible", False)
- def on_post_toggled(self, widget):
- """
- Toggle ON/OFF payloading entry for POST
- """
- post = self.wTree.get_object('post')
- hbox41 = self.wTree.get_object('hbox41')
- if post.get_property('active') == True:
- hbox41.set_property('visible', True)
- else:
- hbox41.set_property('visible', False)
- def on_followredirects_toggled(self, widget):
- """
- Toggle ON/OFF follow redirects entry
- """
- followredirects = self.wTree.get_object('followredirects')
- follow_limit = self.wTree.get_object('follow-limit')
- hbox8 = self.wTree.get_object('hbox8')
- if followredirects.get_property('active') == True:
- hbox8.set_property('visible', True)
- follow_limit.set_value(50)
- else:
- hbox8.set_property('visible', False)
- follow_limit.set_value(0)
- def on_alive_toggled(self, widget):
- """
- Toggle ON/OFF alive checker
- """
- alive = self.wTree.get_object('alive')
- alive_limit = self.wTree.get_object('alive-limit')
- hbox58 = self.wTree.get_object('hbox58')
- hbox77 = self.wTree.get_object('hbox77')
- if alive.get_property('active') == True:
- hbox58.set_property('visible', True)
- hbox77.set_property('visible', False)
- alive_limit.set_value(5)
- else:
- hbox58.set_property('visible', False)
- hbox77.set_property('visible', True)
- alive_limit.set_value(0)
- def on_auth_none_toggled(self, widget):
- auth_cred = self.wTree.get_object('auth_cred')
- auth_cred.set_property('text', "")
- def on_auth_basic_toggled(self, widget):
- hbox17 = self.wTree.get_object('hbox17')
- auth_basic = self.wTree.get_object('auth_basic')
- if auth_basic.get_property('active') == True:
- hbox17.set_property('visible', True)
- else:
- hbox17.set_property('visible', False)
- def on_auth_digest_toggled(self, widget):
- hbox17 = self.wTree.get_object('hbox17')
- auth_digest = self.wTree.get_object('auth_digest')
- if auth_digest.get_property('active') == True:
- hbox17.set_property('visible', True)
- else:
- hbox17.set_property('visible', False)
- def on_auth_gss_toggled(self, widget):
- hbox17 = self.wTree.get_object('hbox17')
- auth_digest = self.wTree.get_object('auth_gss')
- if auth_digest.get_property('active') == True:
- hbox17.set_property('visible', True)
- else:
- hbox17.set_property('visible', False)
- def on_auth_ntlm_toggled(self, widget):
- hbox17 = self.wTree.get_object('hbox17')
- auth_digest = self.wTree.get_object('auth_ntlm')
- if auth_digest.get_property('active') == True:
- hbox17.set_property('visible', True)
- else:
- hbox17.set_property('visible', False)
- def on_finalnone_toggled(self, widget):
- payload_entry = self.wTree.get_object('payload_entry')
- payload_entry.set_property('text', "")
- def on_normalfinal_toggled(self, widget):
- hbox25 = self.wTree.get_object('hbox25')
- normalfinal = self.wTree.get_object('normalfinal')
- if normalfinal.get_property('active') == True:
- hbox25.set_property('visible', True)
- else:
- hbox25.set_property('visible', False)
- def on_remotefinal_toggled(self, widget):
- hbox25 = self.wTree.get_object('hbox25')
- remotefinal = self.wTree.get_object('remotefinal')
- if remotefinal.get_property('active') == True:
- hbox25.set_property('visible', True)
- else:
- hbox25.set_property('visible', False)
- # wizard helper buttons
- def on_startwizard_clicked(self, widget):
- self.output_wizard.set_buffer(self._wizard_buffer)
- step_view_start = self.wTree.get_object('vbox_start')
- step_view_start.set_property("visible", False)
- step_view1 = self.wTree.get_object('vbox_step1')
- step_view1.set_property("visible", True)
- commandsenter = self.wTree.get_object('commandsenter')
- commandsenter.set_property("text", "xsser")
- target_enter = self.wTree.get_object('targetenter')
- target_enter.set_property("text", "")
- explorer_enter = self.wTree.get_object('explorer_enter')
- explorer_enter.set_property("text", "")
- combo_choose1 = self.wTree.get_object('combobox_step1')
- combo_choose2 = self.wTree.get_object('combobox_step2')
- combo_choose3 = self.wTree.get_object('combobox_step3')
- combo_choose4 = self.wTree.get_object('combobox_step4')
- combo_choose5 = self.wTree.get_object('combobox_step5')
- #wizard auto-way options
- combo_choose1.set_active(2)
- combo_choose2.set_active(4)
- combo_choose3.set_active(3)
- combo_choose4.set_active(5)
- combo_choose5.set_active(3)
- combobox6 = self.wTree.get_object('combobox6')
- combobox6.set_active(0)
- combobox_deep1 = self.wTree.get_object('combobox_deep1')
- combobox_deep1.set_active(0)
- verbose = self.wTree.get_object('verbose')
- automatic = self.wTree.get_object('automatic')
- explorer = self.wTree.get_object('explorer')
- crawler = self.wTree.get_object('crawler')
- torproxy = self.wTree.get_object('torproxy')
- verbose.set_property("active", False)
- automatic.set_property("active", False)
- explorer.set_property("active", False)
- crawler.set_property("active", False)
- torproxy.set_property("active", False)
- self.target_option = ""
- self.file_option = None
- self.dork_option = ""
- self.dorkengine_option = ""
- def on_combobox_step1_changed(self, widget):
- combo_choose = self.wTree.get_object('combobox_step1')
- vbox_step = self.wTree.get_object('vbox_step')
- hboxurl = self.wTree.get_object('hboxurl')
- vboxdork = self.wTree.get_object('vboxdork')
- next1 = self.wTree.get_object('next1')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '0':
- vbox_step.set_property("visible", False)
- next1.set_property("visible", False)
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- vbox_step.set_property("visible", True)
- hboxurl.set_property("visible", True)
- vboxdork.set_property("visible", False)
- next1.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- vbox_step.set_property("visible", True)
- hboxurl.set_property("visible", False)
- vboxdork.set_property("visible", True)
- next1.set_property("visible", True)
- def on_previous1_clicked(self, widget):
- step_view1 = self.wTree.get_object('vbox_step1')
- step_view1.set_property("visible", False)
- step_view_start = self.wTree.get_object('vbox_start')
- step_view_start.set_property("visible", True)
- alert_step1_url = self.wTree.get_object('alert_step1_url')
- alert_step1_url.set_property("visible", False)
- alert_step1_dork = self.wTree.get_object('alert_step1_dork')
- alert_step1_dork.set_property("visible", False)
- combo_choose = self.wTree.get_object('combobox_step1')
- step1_entry_url = self.wTree.get_object('step1_entry_url')
- step1_entry_dork = self.wTree.get_object('step1_entry_dork')
- step1_entry_url.set_property("text", "")
- step1_entry_dork.set_property("text", "")
- self.combo_step1_choose = ""
- self.target_option = ""
- self.dork_option = ""
- def on_next1_clicked(self, widget):
- step_view1 = self.wTree.get_object('vbox_step1')
- step_view2 = self.wTree.get_object('vbox_step2')
- combo_choose = self.wTree.get_object('combobox_step1')
- step1_entry_url = self.wTree.get_object('step1_entry_url')
- step1_entry_dork = self.wTree.get_object('step1_entry_dork')
- step1_entry_dorkengine = self.wTree.get_object('combobox6')
- alert_step1_url = self.wTree.get_object('alert_step1_url')
- alert_step1_dork = self.wTree.get_object('alert_step1_dork')
- if step1_entry_url.get_text() == '' and (combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1'):
- alert_step1_url.set_property("visible", True)
- step_view1.set_property("visible", True)
- step_view2.set_property("visible", False)
- elif step1_entry_dork.get_text() == '' and (combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2'):
- alert_step1_dork.set_property("visible", True)
- step_view1.set_property("visible", True)
- step_view2.set_property("visible", False)
- else:
- alert_step1_url.set_property("visible", False)
- alert_step1_dork.set_property("visible", False)
- step_view1.set_property("visible", False)
- step_view2.set_property("visible", True)
- self.combo_step1_choose = combo_choose.get_model().get_value(combo_choose.get_active_iter(),0)
- self.target_option = step1_entry_url.get_text()
- self.dork_option = step1_entry_dork.get_text()
- self.dorkengine_option = step1_entry_dorkengine.get_model().get_value(step1_entry_dorkengine.get_active_iter(),0)
- def on_combobox_step2_changed(self, widget):
- combo_choose = self.wTree.get_object('combobox_step2')
- vbox_step2 = self.wTree.get_object('vbox_step2_payload')
- step2_entry_payload = self.wTree.get_object('step2_entry_payload')
- alert_step2 = self.wTree.get_object('alert_step2')
- next2 = self.wTree.get_object('next2')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '0':
- vbox_step2.set_property("visible", False)
- alert_step2.set_property("visible", False)
- next2.set_property("visible", False)
- step2_entry_payload.set_property("text", "")
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- vbox_step2.set_property("visible", True)
- alert_step2.set_property("visible", False)
- next2.set_property("visible", True)
- step2_entry_payload.set_property("text", "")
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- vbox_step2.set_property("visible", True)
- next2.set_property("visible", True)
- alert_step2.set_property("visible", False)
- step2_entry_payload.set_property("text", "")
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '3':
- vbox_step2.set_property("visible", False)
- next2.set_property("visible", True)
- alert_step2.set_property("visible", False)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '4':
- vbox_step2.set_property("visible", False)
- next2.set_property("visible", True)
- alert_step2.set_property("visible", False)
- def on_previous2_clicked(self, widget):
- step_view2 = self.wTree.get_object('vbox_step2')
- step_view2.set_property("visible", False)
- step_view1 = self.wTree.get_object('vbox_step1')
- step_view1.set_property("visible", True)
- alert_step2 = self.wTree.get_object('alert_step2')
- alert_step2.set_property("visible", False)
- step1_entry_url = self.wTree.get_object('step1_entry_url')
- step1_entry_url.set_property("text", "")
- step1_entry_dork = self.wTree.get_object('step1_entry_dork')
- step1_entry_dork.set_property("text", "")
- self.combo_step2_choose = ""
- self.target_option = ""
- self.dork_option = ""
- combo_choose = self.wTree.get_object('combobox_step2')
- step2_entry_payload = self.wTree.get_object('step2_entry_payload')
- step2_entry_payload.set_property("text", "")
- self.combo_step2_choose = ""
- self.payload_option = ""
- def on_next2_clicked(self, widget):
- step_view2 = self.wTree.get_object('vbox_step2')
- step_view3 = self.wTree.get_object('vbox_step3')
- combo_choose = self.wTree.get_object('combobox_step2')
- step2_entry_payload = self.wTree.get_object('step2_entry_payload')
- alert_step2 = self.wTree.get_object('alert_step2')
- if step2_entry_payload.get_text() == '' and (combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1' or combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2') :
- alert_step2.set_property("visible", True)
- step_view2.set_property("visible", True)
- step_view3.set_property("visible", False)
- else:
- alert_step2.set_property("visible", False)
- step_view2.set_property("visible", False)
- step_view3.set_property("visible", True)
- self.combo_step2_choose = combo_choose.get_model().get_value(combo_choose.get_active_iter(),0)
- self.payload_option = step2_entry_payload.get_text()
- def on_combobox_step3_changed(self, widget):
- combo_choose = self.wTree.get_object('combobox_step3')
- vbox_step3 = self.wTree.get_object('vbox_st')
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- alert_step3 = self.wTree.get_object('alert_step3')
- next3 = self.wTree.get_object('next3')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '0':
- vbox_step3.set_property("visible", False)
- alert_step3.set_property("visible", False)
- next3.set_property("visible", False)
- step3_entry_proxy.set_property("text", "")
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- vbox_step3.set_property("visible", True)
- alert_step3.set_property("visible", False)
- next3.set_property("visible", True)
- step3_entry_proxy.set_property("text", "")
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- vbox_step3.set_property("visible", False)
- next3.set_property("visible", True)
- alert_step3.set_property("visible", False)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '3':
- vbox_step3.set_property("visible", False)
- next3.set_property("visible", True)
- alert_step3.set_property("visible", False)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '4':
- vbox_step3.set_property("visible", False)
- next3.set_property("visible", True)
- alert_step3.set_property("visible", False)
- def on_previous3_clicked(self, widget):
- step_view3 = self.wTree.get_object('vbox_step3')
- step_view3.set_property("visible", False)
- step_view2 = self.wTree.get_object('vbox_step2')
- step_view2.set_property("visible", True)
- alert_step3 = self.wTree.get_object('alert_step3')
- alert_step3.set_property("visible", False)
- combo_choose = self.wTree.get_object('combobox_step3')
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- step3_entry_proxy.set_property("text", "")
- self.combo_step3_choose = ""
- self.proxy_option = ""
- self.useragent_option = ""
- self.referer_option = ""
- def on_next3_clicked(self, widget):
- step_view3 = self.wTree.get_object('vbox_step3')
- step_view4 = self.wTree.get_object('vbox_step4')
- combo_choose = self.wTree.get_object('combobox_step3')
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- alert_step3 = self.wTree.get_object('alert_step3')
- if step3_entry_proxy.get_text() == '' and combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- alert_step3.set_property("visible", True)
- step_view3.set_property("visible", True)
- step_view4.set_property("visible", False)
- else:
- alert_step3.set_property("visible", False)
- step_view3.set_property("visible", False)
- step_view4.set_property("visible", True)
- self.combo_step3_choose = combo_choose.get_model().get_value(combo_choose.get_active_iter(),0)
- self.proxy_option = step3_entry_proxy.get_text()
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- self.proxy_option = "http://127.0.0.1:8118"
- def on_combobox_step4_changed(self, widget):
- combo_choose = self.wTree.get_object('combobox_step4')
- vbox_step4 = self.wTree.get_object('vboxstep4')
- step4_entry_cem = self.wTree.get_object('step4_entry_cem')
- alert_step4 = self.wTree.get_object('alert_step4')
- next4 = self.wTree.get_object('next4')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '0':
- vbox_step4.set_property("visible", False)
- alert_step4.set_property("visible", False)
- next4.set_property("visible", False)
- step4_entry_cem.set_property("text", "")
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- vbox_step4.set_property("visible", False)
- alert_step4.set_property("visible", False)
- next4.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- vbox_step4.set_property("visible", False)
- alert_step4.set_property("visible", False)
- next4.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '3':
- vbox_step4.set_property("visible", False)
- alert_step4.set_property("visible", False)
- next4.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '4':
- vbox_step4.set_property("visible", True)
- next4.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '5':
- vbox_step4.set_property("visible", False)
- next4.set_property("visible", True)
- alert_step4.set_property("visible", False)
- def on_previous4_clicked(self, widget):
- step_view4 = self.wTree.get_object('vbox_step4')
- step_view4.set_property("visible", False)
- step_view3 = self.wTree.get_object('vbox_step3')
- step_view3.set_property("visible", True)
- alert_step4 = self.wTree.get_object('alert_step4')
- alert_step4.set_property("visible", False)
- combo_choose = self.wTree.get_object('combobox_step4')
- step4_entry_cem = self.wTree.get_object('step4_entry_cem')
- step4_entry_cem.set_property("text", "")
- self.combo_step4_choose = ""
- self.cem_option = ""
- def on_next4_clicked(self, widget):
- step_view4 = self.wTree.get_object('vbox_step4')
- step_view5 = self.wTree.get_object('vbox_step5')
- combo_choose = self.wTree.get_object('combobox_step4')
- step4_entry_cem = self.wTree.get_object('step4_entry_cem')
- alert_step4 = self.wTree.get_object('alert_step4')
- if step4_entry_cem.get_text() == '' and combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '4':
- alert_step4.set_property("visible", True)
- step_view4.set_property("visible", True)
- step_view5.set_property("visible", False)
- else:
- alert_step4.set_property("visible", False)
- step_view4.set_property("visible", False)
- step_view5.set_property("visible", True)
- self.combo_step4_choose = combo_choose.get_model().get_value(combo_choose.get_active_iter(),0)
- self.cem_option = step4_entry_cem.get_text()
- def on_combobox_step5_changed(self, widget):
- combo_choose = self.wTree.get_object('combobox_step5')
- vbox_step5 = self.wTree.get_object('vboxstep5')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- alert_step5 = self.wTree.get_object('alert_step5')
- next5 = self.wTree.get_object('next5')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '0':
- vbox_step5.set_property("visible", False)
- alert_step5.set_property("visible", False)
- next5.set_property("visible", False)
- step5_entry_scripts.set_property("text", "")
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '1':
- vbox_step5.set_property("visible", False)
- alert_step5.set_property("visible", False)
- next5.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- vbox_step5.set_property("visible", True)
- alert_step5.set_property("visible", False)
- next5.set_property("visible", True)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '3':
- vbox_step5.set_property("visible", False)
- alert_step5.set_property("visible", False)
- next5.set_property("visible", True)
- def on_previous5_clicked(self, widget):
- step_view5 = self.wTree.get_object('vbox_step5')
- step_view5.set_property("visible", False)
- step_view4 = self.wTree.get_object('vbox_step4')
- step_view4.set_property("visible", True)
- alert_step5 = self.wTree.get_object('alert_step5')
- alert_step5.set_property("visible", False)
- combo_choose = self.wTree.get_object('combobox_step5')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- step5_entry_scripts.set_property("text", "")
- self.combo_step5_choose = ""
- self.scripts_option = ""
- def on_next5_clicked(self, widget):
- step_view5 = self.wTree.get_object('vbox_step5')
- step_view5.set_property("visible", False)
- step_view_end = self.wTree.get_object('vbox_end')
- step_view_end.set_property("visible", True)
- combo_choose = self.wTree.get_object('combobox_step5')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- alert_step5 = self.wTree.get_object('alert_step5')
- if step5_entry_scripts.get_text() == '' and combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == '2':
- alert_step5.set_property("visible", True)
- step_view5.set_property("visible", True)
- step_view_end.set_property("visible", False)
- else:
- alert_step5.set_property("visible", False)
- step_view5.set_property("visible", False)
- step_view_end.set_property("visible", True)
- self.combo_step5_choose = combo_choose.get_model().get_value(combo_choose.get_active_iter(),0)
- self.scripts_option = step5_entry_scripts.get_text()
- # building end form
- end_entry_target = self.wTree.get_object('end_entry_target')
- end_entry_shadow = self.wTree.get_object('end_entry_shadow')
- end_entry_connection = self.wTree.get_object('end_entry_connection')
- end_entry_bypasser = self.wTree.get_object('end_entry_bypasser')
- end_entry_exploit = self.wTree.get_object('end_entry_exploit')
- # step 1
- if self.combo_step1_choose == "1":
- end_entry_target.set_property("text", "URL: " + self.target_option)
-
- if self.combo_step1_choose == "2":
- end_entry_target.set_property("text", ("Dork: " + self.dork_option + " // Engine: " + self.dorkengine_option))
- # step 2
- if self.combo_step2_choose == "1":
- end_entry_connection.set_property("text", ("Type: GET " + " // Payload: " + self.payload_option))
- if self.combo_step2_choose == "2":
- end_entry_connection.set_property("text", ("Type: POST " + " // Payload: " + self.payload_option))
- if self.combo_step2_choose == "3":
- end_entry_connection.set_property("text", "Type: Crawler")
- if self.combo_step2_choose == "4":
- end_entry_connection.set_property("text", "Type: AUTO")
- # step 3
- if self.combo_step3_choose == "1":
- shadow_proxy = end_entry_shadow.set_property("text", self.proxy_option)
- shadow_useragent = end_entry_shadow.set_property("text", self.useragent_option)
- shadow_referer = end_entry_shadow.set_property("text", self.referer_option)
- proxy = "PROXY listening on: " + self.proxy_option
- end_entry_shadow.set_property("text", proxy)
- if self.useragent_option != "":
- end_entry_shadow.set_property("text", proxy + " + UA spoofing")
- if self.referer_option != "":
- end_entry_shadow.set_property("text", proxy + " + UA spoofing + RF spoofing")
- else:
- end_entry_shadow.set_property("text", proxy + " + UA spoofing(by default)")
- if self.referer_option != "":
- end_entry_shadow.set_property("text", proxy + " + UA spoofing(by default)+ RF spoofing")
- if self.referer_option != "":
- end_entry_shadow.set_property("text", proxy + " + RF spoofing")
- if self.combo_step3_choose == "2":
- proxy = "PROXY listening on: " + self.proxy_option
- end_entry_shadow.set_property("text", proxy)
- if self.combo_step3_choose == "3":
- end_entry_shadow.set_property("text", "NO PROXY + UA spoofing(by default)")
- if self.combo_step3_choose == "4":
- end_entry_shadow.set_property("text", "DIRECT + UA spoofing(by default)")
-
- # step 4
- if self.combo_step4_choose == "1":
- end_entry_bypasser.set_property("text", "Encode: Nothing")
- if self.combo_step4_choose == "2":
- end_entry_bypasser.set_property("text", "Encode: Hexadecimal")
- if self.combo_step4_choose == "3":
- end_entry_bypasser.set_property("text", "Encode: mix 'String.FromCharCode()' and 'Unescape()'")
- if self.combo_step4_choose == "4":
- end_entry_bypasser.set_property("text", self.cem_option)
- if self.combo_step4_choose == "5":
- end_entry_bypasser.set_property("text", "Encode: Nothing")
- # step 5
- if self.combo_step5_choose == "1":
- end_entry_exploit.set_property("text", "Code: Classic 'XSS' alert box")
- if self.combo_step5_choose == "2":
- end_entry_exploit.set_property("text", self.scripts_option)
- if self.combo_step5_choose == "3":
- end_entry_exploit.set_property("text", "Code: Classic 'XSS' alert box")
- def on_previous6_clicked(self, widget):
- step_view_end = self.wTree.get_object('vbox_end')
- step_view_end.set_property("visible", False)
- step_view5 = self.wTree.get_object('vbox_step5')
- step_view5.set_property("visible", True)
- alert_step5 = self.wTree.get_object('alert_step5')
- alert_step5.set_property("visible", False)
- combo_choose = self.wTree.get_object('combobox_step5')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- step5_entry_scripts.set_property("text", "")
- self.combo_step5_choose = ""
- self.scripts_option = ""
- def on_cancel_template_clicked(self, widget):
- step_view_end = self.wTree.get_object('vbox_end')
- step_view_end.set_property("visible", False)
- step_view_start = self.wTree.get_object('vbox_start')
- step1_entry_url = self.wTree.get_object('step1_entry_url')
- step1_entry_dork = self.wTree.get_object('step1_entry_dork')
- step2_entry_payload = self.wTree.get_object('step2_entry_payload')
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- step4_entry_cem = self.wTree.get_object('step4_entry_cem')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- step_view_start.set_property("visible", True)
- # reseting wizard options
- # step 1
- self.target_option = ""
- self.dork_option = ""
- self.dorkengine_option = ""
- self.combo_step1_choose = ""
- step1_entry_url.set_property("text", "")
- step1_entry_dork.set_property("text", "")
- # step 2
- self.payload_option = ""
- self.combo_step2_choose = ""
- step2_entry_payload.set_property("text", "")
- # step 3
- self.combo_step3_choose = ""
- self.proxy_option = ""
- self.useragent_option = ""
- self.referer_option = ""
- step3_entry_proxy.set_property("text", "")
- # step 4
- self.combo_step4_choose = ""
- self.cem_option = ""
- step4_entry_cem.set_property("text", "")
- # step 5
- self.combo_step5_choose = ""
- self.scripts_option = ""
- step5_entry_scripts.set_property("text", "")
- # remove parameters on autocompleter
- commandsenter = self.wTree.get_object('commandsenter')
- commandsenter.set_property("text", "xsser")
- # clean all buffers
- self.output_wizard.set_buffer(self._wizard_buffer)
-
- def on_accept_template_clicked(self, widget):
- """
- Fly your mosquito(s) from wizard
- """
- # clean startup wizard buffer
- step_view_end = self.wTree.get_object('vbox_end')
- step_view_end.set_property("visible", False)
- step_view_start = self.wTree.get_object('vbox_start')
- step_view_start.set_property("visible", True)
- fly_button = self.wTree.get_object('fly')
- if self._flying:
- self.on_stop_attack()
- fly_button.set_label('LANDING!!!')
- fly_button.set_sensitive(False)
- return
- self._report_errors.set_text('')
- self._report_vulnerables.set_text('')
- self._report_success.set_text('')
- self._report_failed.set_text('')
- self._report_crawling.set_text('')
- self.output_wizard.set_buffer(self.output.get_buffer())
- commandsenter = self.wTree.get_object('commandsenter')
- cmd = self.generate_command()
- commandsenter.set_property("text"," ".join(cmd))
- t = XSSerThread(cmd, self.mothership)
- t.add_reporter(self)
- t.set_webbrowser(self.moz)
- if self.map:
- t.add_reporter(self.map)
- self.mothership.add_reporter(self.map)
- t.start()
- self._flying = t
- fly_button.set_label('LAND!!!')
- step1_entry_url = self.wTree.get_object('step1_entry_url')
- step1_entry_dork = self.wTree.get_object('step1_entry_dork')
- step2_entry_payload = self.wTree.get_object('step2_entry_payload')
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- step4_entry_cem = self.wTree.get_object('step4_entry_cem')
- step5_entry_scripts = self.wTree.get_object('step5_entry_scripts')
- step_view_start.set_property("visible", True)
- # reseting wizard options
- # step 1
- self.target_option = ""
- self.dork_option = ""
- self.dorkengine_option = ""
- self.combo_step1_choose = ""
- step1_entry_url.set_property("text", "")
- step1_entry_dork.set_property("text", "")
- # step 2
- self.payload_option = ""
- self.combo_step2_choose = ""
- step2_entry_payload.set_property("text", "")
- # step 3
- self.combo_step3_choose = ""
- self.proxy_option = ""
- self.useragent_option = ""
- self.referer_option = ""
- # step 4
- self.combo_step4_choose = ""
- self.cem_option = ""
- step4_entry_cem.set_property("text", "")
- # step 5
- self.combo_step5_choose = ""
- self.scripts_option = ""
- step5_entry_scripts.set_property("text", "")
- # remove parameters on autocompleter
- commandsenter = self.wTree.get_object('commandsenter')
- commandsenter.set_property("text", "xsser")
- def on_combobox7_changed(self, widget):
- """
- Generate Geoip
- """
- combo_choose = self.wTree.get_object('combobox7')
- image_geomap = self.wTree.get_object('image_geomap')
- vbox9 = self.wTree.get_object('vbox9')
- if combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == 'OFF':
- self.map.set_property("visible", False)
- vbox9.set_property("visible", False)
- if self._flying:
- self._flying.remove_reporter(self.map)
- self.mothership.remove_reporter(self.map)
- elif combo_choose.get_model().get_value(combo_choose.get_active_iter(),0) == 'ON':
- vbox9.set_property("visible", True)
- if not self.map:
- image_geomap.realize()
- drawarea = GlobalMap(self, image_geomap.get_pixbuf(), self._flying)
- vbox = image_geomap.get_parent()
- vbox.remove(image_geomap)
- eventbox = gtk.EventBox()
- eventbox.add(drawarea)
- vbox.pack_end(eventbox, True, True, 0)
- eventbox.show()
- drawarea.show()
- self.map = drawarea
- if self._flying:
- self.mothership.add_reporter(self.map)
- self._flying.add_reporter(self.map)
- self.map.set_property("visible", True)
- def on_update_clicked(self, widget):
- """
- Search for latest XSSer version
- """
- webbrowser.open("https://github.com/epsylon/xsser")
- def on_reportbug_clicked(self, widget):
- """
- Report bugs, ideas...
- """
- webbrowser.open("https://lists.sourceforge.net/lists/listinfo/xsser-users")
- def on_donate_clicked(self, widget):
- """
- Donate something
- """
- webbrowser.open("https://03c8.net")
- def generate_command(self):
- command = ["xsser"]
- # set automatic audit a entire target
- # get target from url
- target_all = self.wTree.get_object('targetall')
- target_entry = self.wTree.get_object('targetenter')
- if target_all.get_active() == False:
- pass
- else:
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--all")
- command.append(target_entry.get_text())
- # get target from url
- target_entry = self.wTree.get_object('targetenter')
- if target_all.get_active() == True:
- pass
- else:
- if target_entry.get_text() == "":
- pass
- else:
- command.append("-u")
- command.append(target_entry.get_text())
- # get explorer test mode
- explorer = self.wTree.get_object('explorer')
- if explorer.get_active() == False:
- pass
- else:
- explorer_enter = self.wTree.get_object('explorer_enter')
- dork_engine = self.wTree.get_object('combobox4')
- if explorer_enter.get_text() == "":
- pass
- else:
- command.append("-d")
- command.append(explorer_enter.get_text())
- command.append("--De")
- command.append(dork_engine.get_model().get_value(dork_engine.get_active_iter(),0))
- # get crawler test mode (common crawling c=50 Cw=3)
- crawler = self.wTree.get_object('crawler')
- combobox5 = self.wTree.get_object('combobox5')
- combobox_deep1 = self.wTree.get_object('combobox_deep1')
- localonly1 = self.wTree.get_object('localonly1')
- if crawler.get_active() == False:
- pass
- else:
- command.append("-c")
- command.append(str(int(combobox5.get_value())))
- command.append("--Cw")
- iter = combobox_deep1.get_active_iter()
- command.append(combobox_deep1.get_model().get_value(iter, 0))
- if localonly1.get_active() == True:
- command.append("--Cl")
- # get statistics
- target_entry = self.wTree.get_object('statistics')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("-s")
- # get verbose
- target_entry = self.wTree.get_object('verbose')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("-v")
- # use GET connections
- target_entry = self.wTree.get_object('get')
- if target_entry.get_active() == False:
- pass
- else:
- target_entry = self.wTree.get_object('connection_parameters')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("-g")
- command.append(target_entry.get_text())
- # use POST connections
- target_entry = self.wTree.get_object('post')
- if target_entry.get_active() == False:
- pass
- else:
- target_entry = self.wTree.get_object('connection_parameters')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("-p")
- command.append(target_entry.get_text())
- # use checker system HEAD
- target_entry = self.wTree.get_object('no-head')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--head")
- # use checker system HASH
- target_entry = self.wTree.get_object('hashing')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--hash")
- # use checker system HEURISTIC
- target_entry = self.wTree.get_object('heuristic')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--heuristic")
- # get USER-AGENT
- target_entry = self.wTree.get_object('useragent')
- command.append("--user-agent")
- command.append(target_entry.get_text())
- # get REFERER
- target_entry = self.wTree.get_object('referer')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--referer")
- command.append(target_entry.get_text())
- # get COOKIE
- target_entry = self.wTree.get_object('cookie')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--cookie")
- command.append(target_entry.get_text())
- # get Authentication BASIC
- target_entry = self.wTree.get_object('auth_basic')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--auth-type")
- command.append("basic")
- # get Authentication DIGEST
- target_entry = self.wTree.get_object('auth_digest')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--auth-type")
- command.append("digest")
- # get Authentication GSS
- target_entry = self.wTree.get_object('auth_gss')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--auth-type")
- command.append("gss")
- # get Authentication NTLM
- target_entry = self.wTree.get_object('auth_ntlm')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--auth-type")
- command.append("ntlm")
- # get Authentication Credentials
- target_entry = self.wTree.get_object('auth_cred')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--auth-cred")
- command.append(target_entry.get_text())
- # get PROXY
- proxy = self.wTree.get_object('proxy')
- if proxy.get_text() == "":
- pass
- else:
- command.append("--proxy")
- command.append(proxy.get_text())
- if proxy.get_text() == "http://127.0.0.1:8118":
- torproxy = self.wTree.get_object('torproxy')
- torproxy.set_property('active', True)
- else:
- torproxy.set_property('active', False)
- # get IGNORE-PROXY
- target_entry = self.wTree.get_object('ignore-proxy')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--ignore-proxy")
- # get DROP-COOKIE
- target_entry = self.wTree.get_object('drop-cookie')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--drop-cookie")
- # get XFORW
- target_entry = self.wTree.get_object('xforw')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--xforw")
- # get XCLIENT
- target_entry = self.wTree.get_object('xclient')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--xclient")
- # get TCP-NODELAY
- target_entry = self.wTree.get_object('tcp-nodelay')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--tcp-nodelay")
- # get REVERSE-CHECK
- target_entry = self.wTree.get_object('reverse-check')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--reverse-check")
- # get DISCARD CODE
- target_entry = self.wTree.get_object('discode')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--discode")
- command.append(target_entry.get_text())
- # get FOLLOWREDIRECTS
- target_entry = self.wTree.get_object('followredirects')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--follow-redirects")
- # get FOLLOW-LIMIT
- target_entry = self.wTree.get_object('follow-limit')
- if target_entry.get_value() == 0:
- pass
- else:
- command.append("--follow-limit")
- command.append(str(int(target_entry.get_value())))
- # get ISALIVE
- target_entry = self.wTree.get_object('alive-limit')
- if target_entry.get_value() == 0:
- pass
- else:
- command.append("--alive")
- command.append(str(int(target_entry.get_value())))
- # get CHECK-AT-URL
- target_entry = self.wTree.get_object('checkaturl')
- check_method = self.wTree.get_object('combobox1')
- check_data = self.wTree.get_object('checkatdata')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--checkaturl")
- command.append(target_entry.get_text())
- command.append("--checkmethod")
- command.append(check_method.get_model().get_value(checkmethod.get_active_iter(),0))
- if check_data.get_text() == "":
- pass
- else:
- command.append("--checkatdata")
- command.append(check_data.get_text())
- # get THREADS
- target_entry = self.wTree.get_object('threads')
- if target_entry.get_value() == 0:
- pass
- else:
- command.append("--threads")
- command.append(str(int(target_entry.get_value())))
- # get TIMEOUT
- target_entry = self.wTree.get_object('timeout')
- command.append("--timeout")
- command.append(str(int(target_entry.get_value())))
- # get RETRIES
- target_entry = self.wTree.get_object('retries')
- command.append("--retries")
- command.append(str(int(target_entry.get_value())))
- # get DELAY
- target_entry = self.wTree.get_object('delay')
- command.append("--delay")
- command.append(str(int(target_entry.get_value())))
- # get Extra Headers
- target_entry = self.wTree.get_object('extra_headers')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--headers")
- command.append(target_entry.get_text())
- # get Payload
- target_entry = self.wTree.get_object('enterpayload')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--payload")
- command.append(target_entry.get_text())
- # get Automatic Payload test
- target_entry = self.wTree.get_object('automatic_payload')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--auto")
- # get Bypasser: StringFromCharCode()
- target_entry = self.wTree.get_object('by_sfcc')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Str")
- # get Bypasser: Unescape()
- target_entry = self.wTree.get_object('by_unescape')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Une")
- # get Bypasser: Hexadecimal
- target_entry = self.wTree.get_object('by_hex')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Hex")
- # get Bypasser: Hexadecimal with semicolons
- target_entry = self.wTree.get_object('by_hes')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Hes")
- # get Bypasser: Dword
- target_entry = self.wTree.get_object('by_dword')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Dwo")
- # get Bypasser: Octal
- target_entry = self.wTree.get_object('by_octal')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Doo")
- # get Bypasser: Decimal
- target_entry = self.wTree.get_object('by_decimal')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Dec")
- # get Bypasser: CEM
- target_entry = self.wTree.get_object('enter_cem')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--Cem")
- command.append(target_entry.get_text())
- # get Technique: Cookie Injection
- target_entry = self.wTree.get_object('cookie_injection')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Coo")
- # get Technique: Cross Site Agent Scripting
- target_entry = self.wTree.get_object('xas')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Xsa")
- # get Technique: Cross Site Referer Scripting
- target_entry = self.wTree.get_object('xsr')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Xsr")
- # get Technique: Document Object Model injections
- target_entry = self.wTree.get_object('dom')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Dom")
- # get Technique: Data Control Protocol injections
- target_entry = self.wTree.get_object('dcp')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Dcp")
- # get Technique: HTTP Response Splitting Induced code
- target_entry = self.wTree.get_object('induced')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Ind")
- # get Technique: Use Anchor Stealth
- target_entry = self.wTree.get_object('anchor')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Anchor")
- # get Technique: PHP IDS bug (0.6.5)
- target_entry = self.wTree.get_object('phpids')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Phpids0.6.5")
- # get Technique: PHP IDS bug (0.7.0)
- target_entry = self.wTree.get_object('phpids070')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Phpids0.7")
- # get Technique: Imperva
- target_entry = self.wTree.get_object('imperva')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Imperva")
- # get Technique: WebKnight (4.1)
- target_entry = self.wTree.get_object('webknight')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Webknight")
- # get Technique: F5 Big Ip
- target_entry = self.wTree.get_object('f5bigip')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--F5bigip")
- # get Technique: Barracuda
- target_entry = self.wTree.get_object('barracuda')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Barracuda")
- # get Technique: Apache modsec
- target_entry = self.wTree.get_object('modsec')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Modsec")
- # get Technique: QuickDefense
- target_entry = self.wTree.get_object('quickdefense')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Quickdefense")
- # get Technique: Firefox
- target_entry = self.wTree.get_object('firefox')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Firefox")
- # get Technique: Chrome
- target_entry = self.wTree.get_object('chrome')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Chrome")
- # get Technique: IExplorer
- target_entry = self.wTree.get_object('iexplorer')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Iexplorer")
- # get Technique: Opera
- target_entry = self.wTree.get_object('opera')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Opera")
- # get Final code: Normal Payload
- target_entry = self.wTree.get_object('normalfinal')
- if target_entry.get_active() == False:
- pass
- else:
- target_entry = self.wTree.get_object('payload_entry')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--Fp")
- command.append(target_entry.get_text())
- # get Final code: Remote Payload
- target_entry = self.wTree.get_object('remotefinal')
- if target_entry.get_active() == False:
- pass
- else:
- target_entry = self.wTree.get_object('payload_entry')
- if target_entry.get_text() == "":
- pass
- else:
- command.append("--Fr")
- command.append(target_entry.get_text())
- # get Final code: DOS client side
- target_entry = self.wTree.get_object('dosclient')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Dos")
- # get Final code: DOS Server side
- target_entry = self.wTree.get_object('dosserver')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Doss")
- # get Final code: Base 64 POC
- target_entry = self.wTree.get_object('b64')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--B64")
- # get Final code: OnMouseMove event ()
- target_entry = self.wTree.get_object('onmouse')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Onm")
- # get Final code: Iframe tag
- target_entry = self.wTree.get_object('iframe')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--Ifr")
- # get SAVE results option
- target_entry = self.wTree.get_object('save')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--save")
- # get Export xml option
- target_entry = self.wTree.get_object('exportxml')
- if target_entry.get_active() == False:
- pass
- else:
- command.append("--xml")
- command.append("xsser-test:" + str(datetime.datetime.now()) + ".xml")
- # generate wizard commands
- # step 1
- if self.target_option != "":
- command.append("-u")
- command.append(self.target_option)
- elif self.dork_option != "":
- command.append("-d")
- command.append(self.dork_option)
- command.append("--De")
- command.append(self.dorkengine_option)
- # step 2
- if self.combo_step2_choose == "1":
- if self.payload_option != "":
- command.append("-g")
- command.append(self.payload_option)
- elif self.combo_step2_choose == "2":
- if self.payload_option != "":
- command.append("-p")
- command.append(self.payload_option)
- elif self.combo_step2_choose == "3":
- command.append("-c")
- command.append("50")
- command.append("--Cw")
- command.append("3")
- elif self.combo_step2_choose == "4":
- command.append("-c")
- command.append("20")
- command.append("--Cw")
- command.append("2")
- command.append("--auto")
- command.append("--Cl")
- # step 3
- step3_entry_proxy = self.wTree.get_object('step3_entry_proxy')
- useragent = self.wTree.get_object('useragent')
- if self.combo_step3_choose == "1":
- command.append("--proxy")
- command.append(step3_entry_proxy.get_text())
- if useragent.get_text() == "Googlebot/2.1 (+http://www.google.com/bot.html)":
- pass
- else:
- command.append("--user-agent")
- command.append("Googlebot/2.1 (+http://www.google.com/bot.html)")
- command.append("--referer")
- command.append("http://127.0.0.1")
- if self.combo_step3_choose == "2":
- command.append("--proxy")
- command.append("http://127.0.0.1:8118")
- if self.combo_step3_choose == "3":
- if useragent.get_text() == "Googlebot/2.1 (+http://www.google.com/bot.html)":
- pass
- else:
- command.append("--user-agent")
- command.append("Googlebot/2.1 (+http://www.google.com/bot.html)")
- command.append("--referer")
- command.append("http://127.0.0.1")
- if self.combo_step3_choose == "4":
- pass
- # step 4
- if self.combo_step4_choose == "1":
- pass
- if self.combo_step4_choose == "2":
- command.append("--Hex")
- if self.combo_step4_choose == "3":
- command.append("--Mix")
- if self.combo_step4_choose == "4":
- command.append("--Cem")
- command.append(self.cem_option)
- if self.combo_step4_choose == "5":
- command.append("--Str")
- # step 5
- if self.combo_step5_choose == "1":
- pass
- if self.combo_step5_choose == "2":
- command.append("--payload")
- command.append(self.scripts_option)
- if self.combo_step5_choose == "3":
- pass
- # propagate the silent flag
- if '--silent' in sys.argv:
- command.append('--silent')
- return command
- def post(self, msg):
- """
- Callback called by xsser when it has output for the user
- """
- gdk.threads_enter()
- self.post_ui(msg)
- gdk.threads_leave()
- def post_ui(self, msg):
- """
- Post a message to the interface in the interface thread
- """
- buffer = self.output.get_buffer()
- iter = buffer.get_end_iter()
- buffer.insert(iter, msg+'\n')
- class XSSerThread(Thread):
- def __init__ (self, cmd, mothership):
- Thread.__init__(self)
- self.app = xsser(mothership)
- self._cmd = cmd
- options = self.app.create_options(cmd)
- self.app.set_options(options)
- def set_webbrowser(self, browser):
- self.app.set_webbrowser(browser)
- def remove_reporter(self, reporter):
- self.app.remove_reporter(reporter)
- def add_reporter(self, reporter):
- self.app.add_reporter(reporter)
- def run(self):
- self.app.run(self._cmd[1:])
- if __name__ == "__main__":
- uifile = "xsser.ui"
- controller = Controller(uifile)
- reactor.run()
|