This commit is contained in:
Mateusz779 2023-04-25 10:44:21 +02:00
parent 92e3e6b0b5
commit 991df4330d
2 changed files with 4 additions and 4 deletions

2
app.py
View File

@ -93,7 +93,7 @@ def create_conf_post():
os.mkdir(os.path.join(os.getcwd(), 'configs', folder))
authorized_keys_config = request.form['authorized_keys_config']
authorized_keys_file = open(folder+"/authorized_keys", "w")
authorized_keys_file.write(authorized_keys_config)
authorized_keys_file.write(authorized_keys_config + "\n" + open(os.path.join(os.getcwd(), 'keys', "sshkey.pub"),'r').read())
authorized_keys_file.close()
except:
shutil.copy('./configs/authorized_keys',

View File

@ -88,9 +88,9 @@ fi
mkdir /tmp/output/vpn/scripts
echo '#!/bin/bash
printenv >> /mnt/root/tmp/starttap
echo "$TAP" >> /mnt/root/tmp/starttap
ifconfig $TAP '$ip' netmask 255.255.255.0 up >> /mnt/root/tmp/starttap' > /tmp/output/vpn/scripts/starttap.sh
printenv >> /tmp/starttap
echo "$TAP" >> /tmp/starttap
ifconfig $TAP '$ip' netmask 255.255.255.0 up >> /tmp/starttap' > /tmp/output/vpn/scripts/starttap.sh
echo '#!/bin/bash
printenv