Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell committed Mar 21, 2024
1 parent 07f03c0 commit a78ad62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV GOROOT="/usr/local/go"
ENV GOPATH=$HOME/go
ENV PATH="${PATH}:${GOROOT}/bin:${GOPATH}/bin"
ENV PATH="${PATH}:${GOROOT}/bin:${GOPATH}/bin:/root/.local/share/pipx/venvs/secator/bin"

# Install Python
RUN apt update -y && \
Expand Down Expand Up @@ -39,6 +39,7 @@ RUN apt update -y && \
openssl \
proxychains \
proxychains-ng
RUN pip3 install pipx

# Install Metasploit framework
RUN curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
Expand All @@ -52,7 +53,7 @@ WORKDIR /code
# COPY scripts/download_cves.sh .
# RUN ./download_cves.sh

# Download and install go 1.19
# Download and install go
COPY scripts/install_go.sh .
RUN ./install_go.sh
ENV PATH="$PATH:/root/go/bin"
Expand All @@ -61,24 +62,16 @@ ENV PATH="$PATH:/root/go/bin"
COPY scripts/install_ruby.sh .
RUN ./install_ruby.sh

# Install secator tasks
# Install secator-supported commands
COPY scripts/install_commands.sh .
RUN ./install_commands.sh

# Install nuclei templates
RUN nuclei update-templates

# Install Python package and CLI
COPY requirements.txt .
RUN pip3 install wheel
RUN pip3 install --no-cache-dir -r requirements.txt

# Copy rest of the code
COPY . /code/

# Install secator
RUN pip3 uninstall httpx
RUN pip3 install --no-deps -e .
RUN pipx install .[dev,google]

# Set entrypoint
ENTRYPOINT ["secator"]
6 changes: 3 additions & 3 deletions secator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def unit(tasks, workflows, scans, test, coverage=False, debug=False):
os.environ['DEBUG'] = str(debug)
os.environ['STORE_HTTP_RESPONSES'] = '0'

cmd = 'coverage run --omit="*test*" -m unittest'
cmd = f'{sys.executable} -m coverage run --omit="*test*" -m unittest'
if test:
if not test.startswith('tests.unit'):
test = f'tests.unit.{test}'
Expand All @@ -610,7 +610,7 @@ def unit(tasks, workflows, scans, test, coverage=False, debug=False):
)
if coverage:
Command.run_command(
'coverage report -m',
f'{sys.executable} -m coverage report -m',
**DEFAULT_CMD_OPTS
)
sys.exit(result.return_code)
Expand All @@ -619,7 +619,7 @@ def unit(tasks, workflows, scans, test, coverage=False, debug=False):
@test.command()
def lint():
result = Command.run_command(
'flake8 secator/',
f'{sys.executable} -m flake8 secator/',
cwd=ROOT_FOLDER,
**DEFAULT_CMD_OPTS
)
Expand Down
2 changes: 1 addition & 1 deletion secator/tasks/nuclei.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class nuclei(VulnMulti):
}
}
ignore_return_code = True
install_cmd = 'go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest'
install_cmd = 'go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest && nuclei update-templates'
proxychains = False
proxy_socks5 = True # kind of, leaks data when running network / dns templates
proxy_http = True # same
Expand Down

0 comments on commit a78ad62

Please sign in to comment.