Mongo.coll['res'].update({'ip':ip},
{"$set":{'port.'+str(i):scan_info[i]['name']}})
image.png
更新于20180814
————————————————————————————————
push操作,将数据不断地插入列表中并且在mongodb中提现
from libs.Conn_scan import Mongo
for i in xrange(10):
for k in xrange(3):
print i
try:
Mongo.coll['1'].update({"URL":'www.test.com'},
{"$push": {str(i) : str(k) }},
upsert = True)
except Exception,e:
print str(e)
v
image.png
网友评论