Skip to content

Commit ab748e4

Browse files
committed
add config file
1 parent e620ac0 commit ab748e4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ipscan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
import nmap
33
from m_mysql import *
44
import json
5-
my=mysql('172.17.21.156','root','wtt@564','mb',3306)
5+
from mysql_conf import *
6+
7+
my=mysql(host,user,password,database,port)
68
def portscan():
79
ipaddr= my.select('select ipdir,id from polls_task;')
810
tempip=[]

mysql_conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
# coding=utf-8
3+
host='dbhost'
4+
user='root'
5+
password='your password'
6+
port='dbport'
7+
database='yourdatabase'

0 commit comments

Comments
 (0)