import sqlite3

conn = sqlite3.connect("dnsDB.db")
c = conn.cursor()
c.execute("CREATE TABLE dnsDB (datedns TEXT, timedns TEXT, ampm TEXT, protocol TEXT, direction TEXT, address TEXT, dnsname TEXT)")
readlist = list()
with open("dnstextsample.txt") as file:
	for line in file:
		line = line.replace("\n", "")
		line = line.replace("\r", "")
		linearr = line.split(" ")
		for i in range(0, linearr.count('')):
			linearr.remove('')
		for i in range(0, len(linearr)):
			print str(i) + "  " + linearr[i]
		print"      "
		readlist.append((linearr[0],linearr[1],linearr[2],linearr[6],linearr[7],linearr[8],linearr[-1]))
c.executemany("INSERT INTO dnsDB VALUES (?,?,?,?,?,?,?)", readlist)
for row in c.execute("SELECT * FROM dnsDB"):
	print row
conn.commit()
conn.close()

@@ -289,55 +289,14 @@
 ne.r
-eplace(%22%5Cn%22, %22%22)%0A%09%09line = line.replace(%22%5Cr%22, %22%22
+strip(
 )%0A%09%09
@@ -387,95 +387,8 @@
 '')%0A
-%09%09for i in range(0, len(linearr)):%0A%09%09%09print str(i) + %22  %22 + linearr%5Bi%5D%0A%09%09print%22      %22%0A
 %09%09re
@@ -482,16 +482,16 @@
 r%5B-1%5D))%0A
+
 c.execut
@@ -554,64 +554,8 @@
 st)%0A
-for row in c.execute(%22SELECT * FROM dnsDB%22):%0A%09print row%0A
 conn

Update dnsreader.py