mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Removing old file
This commit is contained in:
parent
87525d8bcb
commit
3d150233c5
|
@ -1,52 +0,0 @@
|
||||||
#! /usr/bin/env python
|
|
||||||
|
|
||||||
# Runs pylint on all python scripts found in a directory tree
|
|
||||||
# Reference: http://rowinggolfer.blogspot.com/2009/08/pylint-recursively.html
|
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
total = 0.0
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
__RATING__ = False
|
|
||||||
|
|
||||||
def check(module):
|
|
||||||
global total, count
|
|
||||||
|
|
||||||
if module[-3:] == ".py":
|
|
||||||
|
|
||||||
print("CHECKING ", module)
|
|
||||||
pout = os.popen("pylint --rcfile=/dev/null %s" % module, 'r')
|
|
||||||
for line in pout:
|
|
||||||
if re.match(r"\AE:", line):
|
|
||||||
print(line.strip())
|
|
||||||
if __RATING__ and "Your code has been rated at" in line:
|
|
||||||
print(line)
|
|
||||||
score = re.findall(r"\d.\d\d", line)[0]
|
|
||||||
total += float(score)
|
|
||||||
count += 1
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
try:
|
|
||||||
print(sys.argv)
|
|
||||||
BASE_DIRECTORY = sys.argv[1]
|
|
||||||
except IndexError:
|
|
||||||
print("no directory specified, defaulting to current working directory")
|
|
||||||
BASE_DIRECTORY = os.getcwd()
|
|
||||||
|
|
||||||
print("looking for *.py scripts in subdirectories of ", BASE_DIRECTORY)
|
|
||||||
for root, dirs, files in os.walk(BASE_DIRECTORY):
|
|
||||||
if any(_ in root for _ in ("extra", "thirdparty")):
|
|
||||||
continue
|
|
||||||
for name in files:
|
|
||||||
filepath = os.path.join(root, name)
|
|
||||||
check(filepath)
|
|
||||||
|
|
||||||
if __RATING__:
|
|
||||||
print("==" * 50)
|
|
||||||
print("%d modules found" % count)
|
|
||||||
print("AVERAGE SCORE = %.02f" % (total / count))
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.6.25"
|
VERSION = "1.3.6.26"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user