Skip to content

Commit 6ada5dc

Browse files
committed
post merge cleanups
1 parent cb865c0 commit 6ada5dc

File tree

6 files changed

+15
-25
lines changed

6 files changed

+15
-25
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ omit =
77
conpot/core/loggers/sqlite_log.py
88
conpot/core/loggers/stix_transform.py
99
conpot/core/loggers/taxii_log.py
10-
conpot/utils/mac_addr.py
1110
.tox/*
1211

1312

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
.gitignore
55
.landscape.yaml
66
.travis.yaml
7+
.venv
8+
.pytest_cache
9+
10+
**/__pycache__
11+
712
Changelog.txt
813
docker-compose.xml
914
Dockerfile

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ WORKDIR /opt/conpot
1515
COPY . .
1616

1717
# Install specific dependencies
18-
RUN pip3 install --no-cache-dir pysnmp==4.4.12 \
19-
&& pip3 install --no-cache-dir pysmi==0.3.2 \
20-
&& pip3 install --no-cache-dir pyasn1==0.4.8 \
21-
&& pip3 install --no-cache-dir cryptography==3.4.8 \
22-
&& pip3 install --no-cache-dir .
18+
RUN pip3 install --no-cache-dir .
2319

2420
# Stage 2: Runtime stage
2521
FROM python:3.8-slim

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build-docker:
33
docker build -t conpot:latest .
44

55
run-docker:
6-
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 --name conpot conpot:latest
6+
docker run --rm -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 --name conpot conpot:latest
77

88
format:
99
black .

bin/conpot

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ from conpot.core.log_worker import LogWorker
3939
from conpot.protocols.proxy.proxy import Proxy
4040
from conpot.utils import ext_ip
4141
from conpot.utils.greenlet import spawn_startable_greenlet
42-
from conpot.utils import mac_addr
4342
from conpot.utils.networking import fix_sslwrap
4443

4544
logger = logging.getLogger()
@@ -365,8 +364,6 @@ def main():
365364
if config.getboolean("fetch_public_ip", "enabled"):
366365
public_ip = ext_ip.get_ext_ip(config)
367366

368-
369-
370367
for protocol_name, server_class in protocols.name_mapping.items():
371368
protocol_template = os.path.join(
372369
root_template_directory, protocol_name, "{0}.xml".format(protocol_name)
@@ -384,9 +381,7 @@ def main():
384381
if ast.literal_eval(
385382
dom_protocol.xpath("//{0}/@enabled".format(protocol_name))[0]
386383
):
387-
host = dom_protocol.xpath("//{0}/@host".format(protocol_name))[
388-
0
389-
]
384+
host = dom_protocol.xpath("//{0}/@host".format(protocol_name))[0]
390385
# -- > Are we running on testing config?
391386
if "testing.cfg" in args.config:
392387
if "127." not in host:
@@ -405,15 +400,11 @@ def main():
405400
greenlet.link_exception(on_unhandled_greenlet_exception)
406401
servers.append((server, greenlet))
407402
logger.info(
408-
"Found and enabled {} protocol.".format(
409-
protocol_name, server
410-
)
403+
"Found and enabled {} protocol.".format(protocol_name, server)
411404
)
412405
else:
413406
logger.info(
414-
"{} available but disabled by configuration.".format(
415-
protocol_name
416-
)
407+
"{} available but disabled by configuration.".format(protocol_name)
417408
)
418409
else:
419410
logger.debug(
@@ -430,9 +421,7 @@ def main():
430421
# TODO: Line up Proxy init with other protocols
431422
template_proxy = os.path.join(root_template_directory, "proxy", "proxy.xml")
432423
if os.path.isfile(template_proxy):
433-
xsd_file = os.path.join(
434-
os.path.dirname(inspect.getfile(Proxy)), "proxy.xsd"
435-
)
424+
xsd_file = os.path.join(os.path.dirname(inspect.getfile(Proxy)), "proxy.xsd")
436425
validate_template(template_proxy, xsd_file)
437426
dom_proxy = etree.parse(template_proxy)
438427
if dom_proxy.xpath("//proxies"):

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
gevent>=1.0
2-
pysnmp
2+
pysnmp==4.4.12
33
pysnmp-mibs
4-
pysmi
4+
pysmi==0.3.2
5+
pyasn1==0.4.8
56
lxml
67
requests
78
sphinx
@@ -25,6 +26,6 @@ tftpy
2526
# some freezegun versions broken
2627
freezegun!=0.3.13
2728
pytest
28-
cryptography
29+
cryptography==3.4.8
2930
sphinx_rtd_theme
3031
psutil

0 commit comments

Comments
 (0)