Esempio n. 1
0
 def __init__(self):
     "Starts zkit with those beautiful menues"
     # Printing A Banner More Coming Soon
     _, red, green, yellow, blue, magenta, cyan, _, reset = Color().GetAllColors()
     init()
     print_banner()
     updater().check_for_updates()
     print("\t " * 5 + f"Hacking is {red}C {green}O {blue}L {yellow}O {magenta}R {green}F {red}U {magenta}L {reset}")
     print("Available options:\n"
           f"{red}{{1}} --> Create a rootKit\n"
           f"{green}{{2}} --> Create a ransomware\n"
           f"{blue}{{3}} --> Create a keyLogger \n"
           f"{yellow}{{4}} --> Run a DOS attack\n"
           f"{magenta}{{5}} --> Connect to a victim\n"
           f"{red}{{6}} --> Generate your user payloads\n"
           f"{cyan}{{000}} --> Exit ZKit-Framework\n{reset}")
Esempio n. 2
0
async def gitlab_webhook(req):
    if req.headers.get('X-Gitlab-Token') != req.app['config']['gitlab-webhook-token']:
        return web.Response(text='Permission denied', status=401)

    git_log.info('Received update from webhook, trying to pull ...')
    asyncio.ensure_future(updater(req.app))
    return web.Response()
Esempio n. 3
0
    def on_start(self):
        update = updater.updater()
        #v= update.version
        #if v != self.tftv:
        #    toast("Updating To %s" % v)
        #    update.update_items()

        self.main_widget.ids.nav_drawer.add_widget(
            MDCustomIconItem(text="News",
                             icon='images/menu/items.png',
                             on_release=lambda x: self.callbackMenu('news')))
        self.main_widget.ids.nav_drawer.add_widget(
            MDCustomIconItem(text="Items",
                             icon='images/menu/items.png',
                             on_release=lambda x: self.callbackMenu('items')))
        self.main_widget.ids.nav_drawer.add_widget(
            MDCustomIconItem(text="Champions",
                             icon='images/menu/champs.png',
                             on_release=lambda x: self.callbackMenu('champs')))
        self.main_widget.ids.nav_drawer.add_widget(
            MDCustomIconItem(text="Tier List",
                             icon='images/menu/tier.png',
                             on_release=lambda x: self.callbackMenu('tier')))
        #self.set_news()
        self.set_all_champs()
        self.set_all_items()
Esempio n. 4
0
 def on_change2(self):
     text = self.out_epsg.text()
     try:
         self.out_epsg_label.setText(updater(text))
     except:
         self.out_epsg_label.setText("invalid EPSG code")
     self.out_epsg_label.adjustSize()
Esempio n. 5
0
	def update(self):
		self.update = update.updater()

		if eval(str(self.positions.parse(_SETTINGS, 'update', 'auto')[0])):
			self.update.check()
		else:
			print "[+] Auto Update disabled"
Esempio n. 6
0
 def __init__(self,db,matchId):
     self.db = db
     self.updater = updater(db)
     self.matchId = int(matchId)
     self.iplPoints = iplPoints(db)
     self.time = 0
     self.interval = 0
     self.scoreType = None
     Thread.__init__(self)
Esempio n. 7
0
def updating(message):
    if not check_user(message): return

    bot.send_message(chat_id, "Updating Robot Mark ...")

    update_code = updater()
    if update_code == 124:
        bot.send_message(chat_id, "Robot Mark update failed ... \nRequires manual intervention.")
    else:
        bot.send_message(chat_id, "Robot Mark at latest version. \nUpdate Code : {}\n\nRebooting in 5 seconds ...".format(update_code))
        bot.stop_polling()
        bot.stop_bot()
        return
Esempio n. 8
0
def ir_vol_update():
    """
    From BloombergDate.xlsm, retrieve swaption and cap vol.
    Then, it inserts into database FICC_SWAPTION_ATM_VOL and FICC_CAP_ATM_VOL
    """
    wb = xw.Book.caller()
    ws = wb.sheets("IR_VOL")

    # Declare connection object
    swaption_vol = ws.range("SwaptionVol").value
    cap_vol = ws.range("CapVol").value
    engine = utils.db_engine(database='otcora',
                             schema='OTCUSER',
                             password='******')
    Session = sessionmaker(bind=engine)
    session = Session()
    # The code below inputs swaption vol data
    updater.updater(data=swaption_vol,
                    table_name='ficc_swaption_atm',
                    head_nullable_data=4,
                    date_index=0,
                    factor=0.0001,
                    data_name='swaption vol/premium data',
                    engine=engine,
                    session=session)
    # The code below inputs cap vol data
    updater.updater(data=cap_vol,
                    table_name='ficc_cap_atm',
                    head_nullable_data=3,
                    date_index=0,
                    factor=0.0001,
                    data_name='cap vol/premium data',
                    engine=engine,
                    session=session)
    session.close()
    engine.dispose()
Esempio n. 9
0
def main() -> None:
    print(f"{Colors.BOLD}Running update-script:{Colors.RESET}")

    updater()

    print(f"\n\n{Colors.BOLD}Pushing updates if required:{Colors.RESET}")

    print("==> Staging hook-file.")
    subprocess.run(
        ["git", "add", HOOKS_FILE],
        stdout=subprocess.DEVNULL,
    )

    changed = bool(
        subprocess.run(
            ["git", "diff-index", "--exit-code", "HEAD", HOOKS_FILE],
            stdout=subprocess.DEVNULL,
        ).returncode, )

    if not changed:
        print(
            f"{Colors.GREEN}==> No changes have been performed.{Colors.RESET}")
        return

    current_version = _get_current_version()
    next_version = _get_next_version(current_version)

    print("==> Configuring git.")
    subprocess.run(
        ["git", "config", "--global", "user.name", "GitHub Actions"],
        stdout=subprocess.DEVNULL,
    )
    subprocess.run(
        ["git", "config", "--global", "user.email", "*****@*****.**"],
        stdout=subprocess.DEVNULL,
    )

    print("==> Committing changes.")
    subprocess.run(
        ["git", "commit", "--message", "updated packages"],
        stdout=subprocess.DEVNULL,
    )

    commit_sha = (subprocess.run(
        ["git", "rev-parse", "HEAD"],
        stdout=subprocess.PIPE,
    ).stdout.decode().strip())
    commit_date = (subprocess.run(
        [
            "git", "show", "--no-patch", "--no-notes", "--pretty='%aI'",
            commit_sha
        ],
        stdout=subprocess.PIPE,
    ).stdout.decode().strip())

    print(f"==> Adding tag v{next_version} to commit {commit_sha}.")
    subprocess.run(
        [
            "git",
            "tag",
            "--annotate",
            f"v{next_version}",
            commit_sha,
            "--message",
            f"Version {next_version}",
        ],
        env={
            "GIT_COMMITTER_DATE": commit_date,
            **os.environ,
        },
        stdout=subprocess.DEVNULL,
    )

    print("==> Pushing changes and tags.")
    subprocess.run(["git", "push"])
    subprocess.run(["git", "push", "--tags"])

    print(
        f"{Colors.GREEN}==> Pushed changes ({current_version} → {next_version}){Colors.RESET}"
    )
Esempio n. 10
0
def main():
    global log
    log.info("ioxclientd version "+ constants.VERSION +" started")
    modbusRs2mqttPublisher = Queue()
    #modbusRs2mqttPublisher = PersistentQueue("/tmp/modbusRs2mqttPublisher")
    if modbusRs2mqttPublisher.qsize() > 0:
        log.warn("Trying to recover (%d) items from modbusRs2mqttPublisher queue." % modbusRs2mqttPublisher.qsize())
    mqttSubscriber2modbusRs = Queue()
    modbusRs2modbusTcp = Queue()
    modbusTcp2modbusRs = Queue()
    mqttSubscriber2updater = Queue()
    updater2mqttPublisher = Queue()
    #gpsReader2mqttPublisher = Queue()
    gpsReader2mqttPublisher = PersistentQueue("/tmp/gpsReader2mqttPublisher")
    if gpsReader2mqttPublisher.qsize() > 0:
        log.warn("Trying to recover (%d) items from gpsReader2mqttPublisher queue." % gpsReader2mqttPublisher.qsize())
    #tempReader2mqttPublisher = Queue()
    tempReader2mqttPublisher = PersistentQueue("/tmp/tempReader2mqttPublisher")
    if tempReader2mqttPublisher.qsize() > 0:
        log.warn("Trying to recover (%d) items from tempReader2mqttPublisher queue." % tempReader2mqttPublisher.qsize())

    threads = []

    # Wystartuj serialowego czytacza modbusa
    if("modbusRs" in configuration["modules"]):
        thread = modbusRs(1, "modbusRs", configuration["modbusRs"],
                      modbusRs2mqttPublisher, mqttSubscriber2modbusRs, modbusRs2modbusTcp, modbusTcp2modbusRs)
        thread.start()
        threads.append(thread)
    if("modbusTcp" in configuration["modules"]):
        thread = modbusTcp(2,"modbusTcp", configuration,
                       modbusRs2modbusTcp,modbusTcp2modbusRs)
        thread.start()
        threads.append(thread)

    if("mqttPublisher" in configuration["modules"]):
        thread = mqttPublisher(3, "mqttPublisher", configuration["mqttPublisher"],
                           modbusRs2mqttPublisher,gpsReader2mqttPublisher,tempReader2mqttPublisher)
        thread.start()
        threads.append(thread)

    if("mqttSubscriber" in configuration["modules"]):
        thread = mqttSubscriber(4, "mqttSubscriber", configuration["mqttSubscriber"],
                            mqttSubscriber2modbusRs, mqttSubscriber2updater)
        thread.start()
        threads.append(thread)

#    if("mqttInfluxdb" in configuration["modules"]):
#        thread = mqttInfluxdb(5,"mqttInfluxdb",configuration["mqttInfluxdb"])
#        thread.start()
#        threads.append(thread)

    if("updater" in configuration["modules"]):
        thread = updater(5,"updater", configuration["updater"], mqttSubscriber2updater, updater2mqttPublisher)
        thread.start()
        threads.append(thread)

    if("gpsReader" in configuration["modules"]):
        thread = gpsReader(6, "gpsReader", configuration["gpsReader"], gpsReader2mqttPublisher)
        thread.start()
        threads.append(thread)

    if("tempReader" in configuration["modules"]):
        thread = tempReader(7, "tempReader", configuration["tempReader"], tempReader2mqttPublisher)
        thread.start()
        threads.append(thread)

    while len(threads) > 0:
        try:
            # Join all threads using a timeout so it doesn't block
            # Filter out threads which have been joined or are None
            for t in threads:
                if t is not None and t.isAlive():
                    t.join(1)
        except KeyboardInterrupt:
            log.info("Ctrl-c received! Sending kill to threads...")
            for t in threads:
                t.exitFlag = True
            exit(2)
Esempio n. 11
0
from updater import updater
from plaidClient import creds

fetched, total = updater(creds.access_token)
print(fetched, " ", total)

while fetched < total:
    fetched += updater(creds.access_token, offset=fetched, txOnly=True)[0]
    print(fetched, " ", total)
Esempio n. 12
0
import updater
import scrapper

#s = scrapper.Scrapper()
#for i in s.get_champs():
#    print(i)
u = updater.updater()
u.update_champs()
#by their ref id (column 0) and stores the output
#files in the TE_ids dir
import updater
import time
F = open("TE_annotations.gff3","r")
D = {}
JU = 0
X = 0
while True:
    now = time.time()
    if not int(now)%5:
        if not JU:
            rs = ""
            for key in D:
                rs += key + " " + str(D[key][1]) + "\n"
            updater.updater("Lines read {}/{}".format(X,201762),rs,"Percent complete {:.2f}%".format(X/201762*100))
            JU = 1
    else:
        JU = 0
    L = F.readline()
    if not L:
        break
    name = L.split("\t")[0]
    if not name in D:
        D[name] = [open("TE_ids/"+name+".te","w"),0]
    D[name][0].write(L)
    D[name][1] += 1
    X += 1

F.close()
for key in D:
Esempio n. 14
0
def destructor():
    app.exec_()
    if not updaterThread.isAlive() and not scanFilesThread.isAlive():
        updater.close()
    return 0

if __name__ == "__main__":
    config = configparser.ConfigParser()
    config.read('server-config.cfg')

    app = QtGui.QApplication(sys.argv)
    Form = QtGui.QWidget()
    ui = Ui_Form()
    ui.setupUi(Form)

    updater = updater(ui)
    loginResponse = updater.login(config)

    QtCore.QObject.connect(ui.updateButton, QtCore.SIGNAL("clicked()"), startUpdaterThread)
    QtCore.QObject.connect(ui.scanButton, QtCore.SIGNAL("clicked()"), startScanThread)

    Form.show()

    checkDifferThread = threading.Thread( target=checkDiffer, args=( ) )
    statusThread = threading.Thread( target=ui.labelStatus, args=( ) )
    updaterThread = threading.Thread( target=updateFiles, args=( ) )
    scanFilesThread = threading.Thread( target=scanFiles , args=( ) )
    checkDifferThread.setDaemon(True)
    statusThread.setDaemon(True)
    updaterThread.setDaemon(True)
    scanFilesThread.setDaemon(True)
Esempio n. 15
0
def ir_vol_history_update(ws=None):
    """
    ir_vol_his_update()
    From BloombergDate.xlsm, retrieve swaption and cap vol data
    from start_dt to end_dt.
    """
    wb = xw.Book.caller()
    ws = wb.sheets("IR_VOL")
    #
    period_range = "ir_vol_period"
    date_range = "ir_vol_date"
    # To pause for collecting data from bloomberg
    time_to_sleep = 2  # seconds
    # get range of date
    st_dt, end_dt = ws.range(period_range).value
    date = utils.str2qldate(st_dt)
    end_dt = utils.str2qldate(end_dt)
    day1 = ql.Period(1, ql.Days)
    # change ql.Date to str
    str_converter = utils.qldate2str
    # calendar to deal with holidays
    cKR = custom_calendar.cKR
    # DB connection engine
    engine = utils.db_engine(database='otcora',
                             schema='OTCUSER',
                             password='******')
    Session = sessionmaker(bind=engine)
    session = Session()
    while date <= end_dt:
        if cKR.isBusinessDay(date):
            ws.range(date_range).value = str_converter(date)

            checking = utils.check_bloomberg_error
            checker = 0
            swaption_vol = ws.range("SwaptionVol").value
            cap_vol = ws.range("CapVol").value
            while checking(swaption_vol, time_to_sleep):
                checker = checker + 1
                if checker > 3:
                    raise utils.JbException("hello")
            """
                
                pythoncom.PumpWaitingMessages()
                time.sleep(0.01)
                
            """
            #
            updater.updater(data=swaption_vol,
                            table_name='ficc_swaption_atm_vol',
                            head_nullable_data=4,
                            date_index=0,
                            factor=0.0001,
                            data_name='swaption vol data',
                            engine=engine,
                            session=session)
            #
            updater.updater(data=cap_vol,
                            table_name='ficc_cap_atm_vol',
                            head_nullable_data=3,
                            date_index=0,
                            factor=0.0001,
                            data_name='cap vol data',
                            engine=engine,
                            session=session)
        date = date + day1

    #ms = wb.app.api()
    # from xlwings.constants import Calculation
    # xw.constants.CalculationState
    #
    #

    session.close()
    engine.dispose()

    utils.Mbox("", "swaption & cap vol done", 0)
Esempio n. 16
0
import threading
from time import sleep
from extras import calc_dist_km as dist
from flask import Flask, request, make_response, jsonify
import pandas as pd
from updater import updater
import json

app = Flask(__name__)
log = app.logger

data = pd.read_pickle('database1.csv')

data = updater(data)
#print(data)
#rt = RepeatedTimer(300, updater, data) # it auto-starts, no need of rt.start()
# def update():
#     global data
#     while True:
#         data = updater(data)
#         sleep(60)
# thread = threading.Thread(target=updater,args=(data,))
# # thread = threading.Thread(target=update)
# thread.start()


@app.route("/", methods=["GET"])
def main():
    lat = float(request.args.get("lat"))
    lon = float(request.args.get("lon"))
    #     print("*****************************")
#by their ref id (column 0) and stores the output
#files in the GENE_ids dir
import updater
import time
F = open("Gene_annotations_sorted.gff3","r")
D = {}
JU = 0
X = 0
while True:
    now = time.time()
    if not int(now)%5:
        if not JU:
            rs = ""
            for key in D:
                rs += key + " " + str(D[key][1]) + "\n"
            updater.updater("Lines read {}/{}".format(X,2908539),rs,"Percent complete {:.2f}%".format(X/2908539*100))
            JU = 1
    else:
        JU = 0
    L = F.readline()
    if not L:
        break
    name = L.split("\t")[0]
    if not name in D:
        D[name] = [open("GENE_ids/"+name+".gene","w"),0]
    D[name][0].write(L)
    D[name][1] += 1
    X += 1

F.close()
for key in D:
#by their ref id (column 1) and stores the output
#files in the RNA_ids dir
import updater
import time
F = open("maizegenome_ALLBLASTS_SORTED.out","r")
D = {}
JU = 0
X = 0
while True:
    now = time.time()
    if not int(now)%5:
        if not JU:
            rs = ""
            for key in D:
                rs += key + " " + str(D[key][1]) + "\n"
            updater.updater("Lines read {}/{}".format(X,796026151),rs,"Percent complete {:.2f}%".format(X/796026151*100))
            JU = 1
    else:
        JU = 0
    L = F.readline()
    if not L:
        break
    name = L.split("\t")[1]
    if not name in D:
        D[name] = [open("RNA_ids/"+name+".rna","w"),0]
    D[name][0].write(L)
    D[name][1] += 1
    X += 1

F.close()
for key in D: