Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import sqlite3
databaseOne = sqlite3.connect("/var/www/html/main")
cursorOne = databaseOne.cursor()
cursorOne.execute('''CREATE TABLE IF NOT EXISTS databaseTableTwo(devmac,strongest_signal,type,first_time,last_time)''')#Creating the table in the second database
cursorOne.execute('''attach 'kismet.kismet' as other;''')#attach temporally the kismet database
cursorOne.execute('''INSERT INTO main.databaseTableTwo (devmac,strongest_signal,type,first_time,last_time) SELECT devmac,strongest_signal,type,first_time,last_time FROM other.devices WHERE NOT Type = "Wi-Fi AP" AND Strongest_signal >=-60 ;''')
databaseOne.commit()
databaseOne.close()