-
-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* using debian for wheels and 10x faster build
- Loading branch information
Showing
11 changed files
with
91 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ exclude_lines = | |
if 0: | ||
if __name__ == .__main__.: | ||
|
||
ignore_errors = True | ||
ignore_errors = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.github | ||
.vscode | ||
.coveragerc | ||
.gitignore | ||
.landscape.yaml | ||
.travis.yaml | ||
Changelog.txt | ||
docker-compose.xml | ||
Dockerfile | ||
LICENSE.txt | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: XML Lint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
xmllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run XMLLint | ||
uses: ChristophWurst/xmllint-action@v1 | ||
with: | ||
xml-file: ./conpot/templates/default/template.xml | ||
xml-schema-file: ./conpot/tests/template_schemas/core.xsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,37 @@ | ||
language: python | ||
python: | ||
- '3.7' | ||
- "3.7" | ||
virtualenv: | ||
system_site_packages: false | ||
sudo: false | ||
cache: | ||
- apt | ||
- pip | ||
- apt | ||
- pip | ||
before_install: | ||
- export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)" | ||
- REPO=`pwd` | ||
- echo $REPO | ||
- echo $TRAVIS_TAG | ||
- pwd | ||
- export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)" | ||
- REPO=`pwd` | ||
- echo $REPO | ||
- echo $TRAVIS_TAG | ||
- pwd | ||
services: | ||
- mysql | ||
addons: | ||
apt: | ||
packages: | ||
- python3-pip | ||
- git | ||
- unzip | ||
- python-dev | ||
- libevent-dev | ||
- libxml2 | ||
- libxml2-dev | ||
- libxml2-utils | ||
- python-mysqldb | ||
- libmysqlclient-dev | ||
- ipmitool | ||
- ipmitool | ||
install: | ||
- export PYTHONIOENCODING=UTF8 | ||
- git show HEAD:conpot/__init__.py > docs/source/conpot_version.py | ||
- pip install coveralls | ||
- pip install tox | ||
- pip install -r requirements.txt | ||
- export PYTHONIOENCODING=UTF8 | ||
- git show HEAD:conpot/__init__.py > docs/source/conpot_version.py | ||
- pip install coveralls | ||
- pip install tox | ||
- pip install -r requirements.txt | ||
before_script: | ||
- mysql -e 'CREATE DATABASE IF NOT EXISTS conpot_unittest;' | ||
- chmod +x "$REPO/bin/conpot" | ||
- mysql -e 'CREATE DATABASE IF NOT EXISTS conpot_unittest;' | ||
- chmod +x "$REPO/bin/conpot" | ||
script: | ||
- tox | ||
- xmllint --schema conpot/tests/template_schemas/core.xsd conpot/templates/default/template.xml | ||
- tox | ||
after_success: | ||
- coveralls | ||
- coveralls | ||
notifications: | ||
irc: | ||
- irc.freenode.org#conpot-dev | ||
slack: | ||
secure: kNsZ0yGar7bcvU4xazqCeGf8zJ8PfbQ16X+Q4Fzu4mHNcnmmal80BHMwHKHfg5SBZViDVqZeA+yEGFAK4z93IXGKLhcCkXiw7qm9K29dP7DWgAFwDn42XNPjx5mQF9elr6T8AD0S1oQM4ML+0h1I+nYY+SK28UUjvDh65o9NHqA= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM python:3.8 AS conpot-builder | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libmariadb-dev \ | ||
gcc \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the app from the host folder (probably a cloned repo) to the container | ||
RUN adduser --disabled-password --gecos "" conpot | ||
|
||
COPY --chown=conpot:conpot . /opt/conpot/ | ||
|
||
# Install Conpot | ||
USER conpot | ||
ENV PATH=$PATH:/home/conpot/.local/bin | ||
RUN pip3 install --user --no-cache-dir /opt/conpot | ||
|
||
|
||
# Run container | ||
FROM python:3.8-slim | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN adduser --disabled-password --gecos "" conpot | ||
WORKDIR /home/conpot | ||
|
||
COPY --from=conpot-builder --chown=conpot:conpot /home/conpot/.local/ /home/conpot/.local/ | ||
RUN mkdir -p /etc/conpot /var/log/conpot /usr/share/wireshark \ | ||
&& wget https://github.com/wireshark/wireshark/raw/master/manuf -o /usr/share/wireshark/manuf | ||
|
||
# Create directories | ||
RUN mkdir -p /var/log/conpot/ \ | ||
&& mkdir -p /data/tftp/ \ | ||
&& chown conpot:conpot /var/log/conpot \ | ||
&& chown conpot:conpot -R /data | ||
|
||
USER conpot | ||
WORKDIR /home/conpot | ||
ENV USER=conpot | ||
ENTRYPOINT ["/home/conpot/.local/bin/conpot"] | ||
CMD ["--template", "default", "--logfile", "/var/log/conpot/conpot.log", "-f", "--temp_dir", "/tmp" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.PHONY: docker | ||
build-docker: | ||
docker build -t conpot docker/ | ||
docker build -t conpot:latest . | ||
|
||
run-docker: build-docker | ||
docker run -it -p 80:8800 -p 102:10201 -p 502:5020 -p 161:16100/udp -p 47808:47808/udp -p 623:6230/udp -p 21:2121 -p 69:6969/udp -p 44818:44818 --network=bridge conpot | ||
docker run -it -p 80:8800 -p 102:10201 -p 502:5020 -p 161:16100/udp -p 47808:47808/udp -p 623:6230/udp -p 21:2121 -p 69:6969/udp -p 44818:44818 --network=bridge conpot:latest |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ hpfeeds3 | |
modbus-tk | ||
stix-validator | ||
stix | ||
pycrypto | ||
cybox | ||
bacpypes==0.17.0 | ||
pyghmi==1.4.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters