Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #392

Merged
merged 7 commits into from Aug 29, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -1,4 +1,4 @@
FROM python:3
FROM python:3.5

ENV DEBIAN_FRONTEND noninteractive

@@ -22,11 +22,10 @@ RUN pip install --no-cache-dir coverage
RUN pip install --no-cache-dir -r requirements.txt

# Run test cases
RUN tox
RUN tox -e run -- conpot -f --template default
RUN py.test -v

# Install the Conpot application
RUN python setup.py install
RUN python3.5 setup.py install
RUN rm -rf /opt/conpot /tmp/* /var/tmp/*

# Create directories
@@ -36,4 +35,4 @@ VOLUME /var/log/conpot/

EXPOSE 80 102 161/udp 502 21 69/udp

CMD ["/usr/local/bin/conpot", "--template", "default", "--logfile", "/var/log/conpot/conpot.log"]
CMD ["/usr/local/bin/conpot", "--template", "default", "--logfile", "/var/log/conpot/conpot.log"]
@@ -18,6 +18,10 @@ The build of the documentations [source](https://github.com/mushorg/conpot/tree/

## Easy install using Docker

![Docker Build Status](https://img.shields.io/docker/build/honeynet/conpot.svg)
![Docket Image Size](https://img.shields.io/microbadger/image-size/honeynet/conpot.svg?style=flat-square)
![Docker Pulls](https://img.shields.io/docker/pulls/honeynet/conpot.svg?style=flat-square)

#### Via a pre-built image

1. Install [Docker](https://docs.docker.com/engine/installation/)
@@ -359,7 +359,13 @@ def main():
protocol_name, server_class = protocol
protocol_template = os.path.join(root_template_directory, protocol_name, '{0}.xml'.format(protocol_name))
if os.path.isfile(protocol_template):
xsd_file = os.path.join(package_directory, 'protocols', protocol_name, '{0}.xsd'.format(protocol_name))
if 'kamstrup' in protocol_name:
kamstrup_dir, kamstrup_protocol = os.path.split((protocol_name.replace('_', '/')) + '_protocol')
xsd_file = os.path.join(package_directory, 'protocols', kamstrup_dir, kamstrup_protocol,
'{0}.xsd'.format(protocol_name))
else:
xsd_file = os.path.join(package_directory, 'protocols', protocol_name,
'{0}.xsd'.format(protocol_name))
validate_template(protocol_template, xsd_file)
dom_protocol = etree.parse(protocol_template)
if dom_protocol.xpath('//{0}'.format(protocol_name)):
@@ -114,16 +114,16 @@ def test_user_list(self):

def test_channel_get_access(self):
result, _ = run_cmd(cmd=['channel', 'getaccess', '1', '3'], port=str(self.ipmi_server.server.server_port))
self.assertEqual(result,
b'Maximum User IDs : 5\n'
b'Enabled User IDs : 3\n\n'
b'User ID : 3\n'
b'User Name : User1\n'
b'Fixed Name : Yes\n'
b'Access Available : call-in / callback\n'
b'Link Authentication : enabled\n'
b'IPMI Messaging : enabled\n'
b'Privilege Level : USER\n')
self.assertIn(b'Maximum User IDs : 5\n'
b'Enabled User IDs : 3\n\n'
b'User ID : 3\n'
b'User Name : User1\n'
b'Fixed Name : Yes\n'
b'Access Available : call-in / callback\n'
b'Link Authentication : enabled\n'
b'IPMI Messaging : enabled\n'
b'Privilege Level : USER\n',
result)

def test_misc(self):
# change the session pass
@@ -210,7 +210,7 @@ def test_copydir(self):
self.assertEqual(self.test_vfs.getinfo('/data_move', namespaces=['access']).permissions, _perms)
self.assertEqual(self.test_vfs.getinfo('/data_move', namespaces=['access']).user, _user)
self.assertEqual(self.test_vfs.getinfo('/data_move', namespaces=['access']).group, _group)
self.assertEqual(self.test_vfs.listdir('/'), ['data', 'data_move'])
self.assertEqual(set(self.test_vfs.listdir('/')), {'data', 'data_move'})

@freeze_time("2028-07-15 17:51:17")
def test_copyfile(self):
@@ -1,4 +1,5 @@
gevent>=1.0
cffi
pysnmp
pysmi
lxml
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.