How to use the pathlib2.Path.joinpath function in pathlib2

To help you get started, we’ve selected a few pathlib2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github melbadry9 / ScanApi / run.py View on Github external
from pathlib2 import Path
from flask import Flask, jsonify, render_template

from Core.db import DatabaseHandler
from Core.vtotal_censys import PLUS
from sublist3r.sublist3r import main as SubList


THREADS = 50
SRC_PATH =  Path(os.path.abspath(os.path.dirname(__file__)))

SUBOVER = Path.joinpath(SRC_PATH,"subover")
SUBOVER_EXE = Path.joinpath(SUBOVER,"subover")

GOBUSTER = Path.joinpath(SRC_PATH,"Gobuster")
GOBUSTER_EXE = Path.joinpath(GOBUSTER,"gobuster")
GOBUSTER_LST = Path.joinpath(GOBUSTER,"all.txt")

Scan = Flask(__name__)
Scan.secret_key = "anything_12456547_1524556"


def sub(domain):
    #sublist3r enurmation
    return SubList(domain, THREADS, savefile=None, ports=None, silent=False, verbose=True, enable_bruteforce=False, engines=None)

def plu(domain):
    #virustotal and censys
    return PLUS(domain)

def subover(file):
    print("[-] started subover")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
import os
from pathlib2 import Path

__all__ = [
    'CONFIG_FILE', 'DIR_LONG', 'DIR_SMALL', 'DIR_MEDIUM',
    'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
import os
from pathlib2 import Path

__all__ = [
    'CONFIG_FILE', 'DIR_LONG', 'DIR_SMALL', 'DIR_MEDIUM',
    'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")
github melbadry9 / ScanApi / run.py View on Github external
from flask import Flask, jsonify, render_template

from Core.db import DatabaseHandler
from Core.vtotal_censys import PLUS
from sublist3r.sublist3r import main as SubList


THREADS = 50
SRC_PATH =  Path(os.path.abspath(os.path.dirname(__file__)))

SUBOVER = Path.joinpath(SRC_PATH,"subover")
SUBOVER_EXE = Path.joinpath(SUBOVER,"subover")

GOBUSTER = Path.joinpath(SRC_PATH,"Gobuster")
GOBUSTER_EXE = Path.joinpath(GOBUSTER,"gobuster")
GOBUSTER_LST = Path.joinpath(GOBUSTER,"all.txt")

Scan = Flask(__name__)
Scan.secret_key = "anything_12456547_1524556"


def sub(domain):
    #sublist3r enurmation
    return SubList(domain, THREADS, savefile=None, ports=None, silent=False, verbose=True, enable_bruteforce=False, engines=None)

def plu(domain):
    #virustotal and censys
    return PLUS(domain)

def subover(file):
    print("[-] started subover")
    pat = r"\[31\;1\;4m(\D+)\u001b\[0m\] Takeover Possible At (\S+)"
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
import os
from pathlib2 import Path

__all__ = [
    'CONFIG_FILE', 'DIR_LONG', 'DIR_SMALL', 'DIR_MEDIUM',
    'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
import os
from pathlib2 import Path

__all__ = [
    'CONFIG_FILE', 'DIR_LONG', 'DIR_SMALL', 'DIR_MEDIUM',
    'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")
github melbadry9 / ScanApi / lib / paths / helper.py View on Github external
'CONFIG_FILE', 'DIR_LONG', 'DIR_SMALL', 'DIR_MEDIUM',
    'DNS_LONG', 'DNS_SMALL', 'DNS_MEDUIM', 'DB_FILE'
]

SRC_PATH = Path.joinpath(Path(os.path.abspath(os.path.dirname(__file__))), "../")

# config
CONFIG_FILE = Path.joinpath(SRC_PATH, "../config.ini")

# Dirs bruteforce
DIR_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dir.txt")
DIR_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dir.txt")
DIR_MEDIUM = Path.joinpath(SRC_PATH, "wordlist/medium_dir.txt")

# DNS bruteforce
DNS_LONG = Path.joinpath(SRC_PATH, "wordlist/long_dns.txt")
DNS_SMALL = Path.joinpath(SRC_PATH, "wordlist/small_dns.txt")
DNS_MEDUIM = Path.joinpath(SRC_PATH, "wordlist/medium_dns.txt")

# Datanbases
DB_FOLDER = Path.joinpath(SRC_PATH, "db/")
DB_FILE = Path.joinpath(DB_FOLDER, "scan.db")