calebstewart / python-htb

A Python API for Hack the Box platform interaction
63 stars 13 forks source link

Fix OpenVPN import issue #7

Open Daviey opened 3 years ago

Daviey commented 3 years ago

Previously, the command htb lab import would fail. This is because it was writing an empty file, as the write() would be buffered and not flush to file before the nmcli import was called.

This change explicitly calls flush() to commit the changes to the file, meaning the contents is written to the file.

Fixes: calebstewart/python-htb#6 Signed-off-by: Dave Walker (Daviey) email@daviey.com