|
@@ -949,7 +949,7 @@ def getcan(ip, name):
|
|
|
elif(n):
|
|
elif(n):
|
|
|
return 1
|
|
return 1
|
|
|
else:
|
|
else:
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)", ip)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))", ip)
|
|
|
if(b):
|
|
if(b):
|
|
|
results = b.groups()
|
|
results = b.groups()
|
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
@@ -1014,7 +1014,7 @@ def getcan(ip, name):
|
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
|
def getban(ip):
|
|
def getban(ip):
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)", ip)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))", ip)
|
|
|
if(b):
|
|
if(b):
|
|
|
results = b.groups()
|
|
results = b.groups()
|
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
@@ -1037,7 +1037,7 @@ def getban(ip):
|
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
|
def getdiscuss(ip, name, sub):
|
|
def getdiscuss(ip, name, sub):
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)", ip)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))", ip)
|
|
|
if(b):
|
|
if(b):
|
|
|
results = b.groups()
|
|
results = b.groups()
|
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
@@ -2300,7 +2300,7 @@ def ban(name = None):
|
|
|
block(name, '해제', getnow(), ip, '')
|
|
block(name, '해제', getnow(), ip, '')
|
|
|
curs.execute("delete from ban where block = '" + pymysql.escape_string(name) + "'")
|
|
curs.execute("delete from ban where block = '" + pymysql.escape_string(name) + "'")
|
|
|
else:
|
|
else:
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)$", name)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))$", name)
|
|
|
if(b):
|
|
if(b):
|
|
|
block(name, request.form["end"], getnow(), ip, request.form["why"])
|
|
block(name, request.form["end"], getnow(), ip, request.form["why"])
|
|
|
curs.execute("insert into ban (block, end, why, band) value ('" + pymysql.escape_string(name) + "', '" + pymysql.escape_string(request.form["end"]) + "', '" + pymysql.escape_string(request.form["why"]) + "', 'O')")
|
|
curs.execute("insert into ban (block, end, why, band) value ('" + pymysql.escape_string(name) + "', '" + pymysql.escape_string(request.form["end"]) + "', '" + pymysql.escape_string(request.form["why"]) + "', 'O')")
|
|
@@ -2318,7 +2318,7 @@ def ban(name = None):
|
|
|
if(row):
|
|
if(row):
|
|
|
now = '차단 해제'
|
|
now = '차단 해제'
|
|
|
else:
|
|
else:
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)$", name)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))$", name)
|
|
|
if(b):
|
|
if(b):
|
|
|
now = '대역 차단'
|
|
now = '대역 차단'
|
|
|
else:
|
|
else:
|
|
@@ -2441,7 +2441,7 @@ def aban():
|
|
|
else:
|
|
else:
|
|
|
end = '영구 차단 상태 입니다. / 사유 : ' + rows[0]['why']
|
|
end = '영구 차단 상태 입니다. / 사유 : ' + rows[0]['why']
|
|
|
else:
|
|
else:
|
|
|
- b = re.search("^([0-9](?:[0-9][0-9])?\.[0-9](?:[0-9][0-9])?)", ip)
|
|
|
|
|
|
|
+ b = re.search("^([0-9](?:[0-9]?[0-9]?)\.[0-9](?:[0-9]?[0-9]?))", ip)
|
|
|
if(b):
|
|
if(b):
|
|
|
results = b.groups()
|
|
results = b.groups()
|
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|
|
curs.execute("select * from ban where block = '" + pymysql.escape_string(results[0]) + "' and band = 'O'")
|