Ejemplo n.º 1
0
 def scan(self, scan_speed):
     print 'Obtaining active GSM frequencies.'
     identified_arfcns_power = full_frequency_scan(scan_speed)
     identified_powers = {}
     for p in identified_arfcns_power:
         identified_powers[p[0]] = p[1]
     identified_arfcns = [x[0] for x in identified_arfcns_power]
     if len(identified_arfcns) <= 0:
         print 'No active frequencies found'
         return
     identified_arfcns.sort()
     print identified_arfcns
     bts_info = {}
     print 'Scaning single frequencies/ARFCNs.'
     for arfcn in identified_arfcns:
         info_pkts = liveshark.scan_frequency2(arfcn)
         if len(info_pkts) == 4:
             info_pkts['power'] = identified_powers[arfcn]
             bts_info[arfcn] = info_pkts
         else:
             print "Could not capture info about ARFCN: "+ str(arfcn)
     print "End single scans"
     return bts_info
Ejemplo n.º 2
0
    #init = subprocess.call(['./setup'])
    #if init != 0:
    #   print "Failed to initialize"
    #  sys.exit

    # Wait for connection
    bts_client = receive_connection()
    message = bts_client.recv(256)
    arguments = get_scan_arguments(message)
    print arguments

    scan_start = time.time()

    # Scan for gsm frequencies
    print "Liveshark has accepted connection, starting scan."
    arfcns_power = grgsm_scanner_tweak.full_frequency_scan(
        int(arguments['speed']))

    if len(arfcns_power):
        print "Nearby ARFCN(s) identified:"
        print[x[0] for x in arfcns_power]

    else:
        print "No nearby GSM signals identified"
        bts_client.send('Failure, no nearby GSM signals identified.')
        bts_client.close()
        sys.exit(0)

    # Scan the identified frequencies
    bts_info_power = {}
    print "Scanning the identified frequencies"
    for arfcn in arfcns_power:
Ejemplo n.º 3
0
    #init = subprocess.call(['./setup'])
    #if init != 0:
     #   print "Failed to initialize"
      #  sys.exit

    # Wait for connection
    bts_client = receive_connection()
    message = bts_client.recv(256)
    arguments = get_scan_arguments(message)
    print arguments

    scan_start = time.time()

    # Scan for gsm frequencies
    print "Liveshark has accepted connection, starting scan."
    arfcns_power = grgsm_scanner_tweak.full_frequency_scan(int(arguments['speed']))

    if len(arfcns_power):
        print "Nearby ARFCN(s) identified:"
        print [x[0] for x in arfcns_power]

    else:
        print "No nearby GSM signals identified"
        bts_client.send('Failure, no nearby GSM signals identified.')
        bts_client.close()
        sys.exit(0)


    # Scan the identified frequencies
    bts_info_power = {}
    print "Scanning the identified frequencies"