Skip to content

Commit

Permalink
#Reformat setup file
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav WEB committed Jun 14, 2017
1 parent c91c5e7 commit b0ba8c8
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 146 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea/
/tmp/
/syslog/
/build/
.coverage
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
include data/*.dat
include setup.cfg
include opendoor.py
include opendoor.conf
include opendoor.conf
include syslog/
include tmp/
21 changes: 0 additions & 21 deletions setup.cfg

This file was deleted.

120 changes: 0 additions & 120 deletions setup.py

This file was deleted.

3 changes: 3 additions & 0 deletions src/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

# noinspection PyPep8Naming
from .color import Color as colour
# noinspection PyPep8Naming
from .core import CoreConfig as core
# noinspection PyPep8Naming
from .decorators import execution_time
# noinspection PyPep8Naming
from .filesystem import FileSystem as filesystem
Expand Down
40 changes: 40 additions & 0 deletions src/core/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-

"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Development Team: Stanislav WEB
"""

CoreConfig = {
'info': {
'name': 'Opendoor scanner',
'repository': 'git@github.com:stanislav-web/OpenDoor.git',
'setup': 'https://raw.githubusercontent.com/stanislav-web/OpenDoor/master/setup.cfg',
'license': 'License: GNU General Public License',
'version': '3.3.36-rc',
},
'opendoor': {
'directories': 'data/directories.dat',
'ignored': 'data/ignored.dat',
'proxies': 'data/proxies.dat',
'subdomains': 'data/subdomains.dat',
'useragents': 'data/useragents.dat',
'tmplist': 'tmp/list.tmp',
'extensionlist': 'tmp/extensionlist.tmp',
'reports': 'reports/',
},
'system': {
'exceptions_log': 'syslog/exceptions.log',
}
}
1 change: 0 additions & 1 deletion src/core/filesystem/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def readcfg(filename):
:return: configparser.RawConfigParser
"""

#TODO : Win32/64 check this ^(([(\/|\)a-z].*?opendoor.*?)(\/|\\))
expression = '^([\/a-z].*?opendoor.*?)\/'
find_dir = re.search(expression, __file__, re.IGNORECASE)
if None is not find_dir:
Expand Down
5 changes: 3 additions & 2 deletions src/core/logger/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import os

from src.core import filesystem
from src.core import core


def exception_log():
Expand All @@ -27,8 +28,8 @@ def exception_log():
:return: string
"""

config = filesystem.readcfg('setup.cfg')
return filesystem.getabsname(config.get('system', 'exceptions_log'))
exception_log = core.get('system').get('exceptions_log')
return filesystem.getabsname(exception_log)


class Config(object):
Expand Down
1 change: 1 addition & 0 deletions src/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
from .reporter import Reporter as reporter, ReporterError
# noinspection PyPep8Naming
from .tpl import Tpl as tpl, TplError

1 change: 1 addition & 0 deletions syslog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore

0 comments on commit b0ba8c8

Please sign in to comment.