diff --git a/__pycache__/config.cpython-311.pyc b/__pycache__/config.cpython-311.pyc
new file mode 100644
index 0000000..886b585
Binary files /dev/null and b/__pycache__/config.cpython-311.pyc differ
diff --git a/db.db b/db.db
new file mode 100644
index 0000000..31f1d46
Binary files /dev/null and b/db.db differ
diff --git a/functions/__pycache__/fbackup.cpython-311.pyc b/functions/__pycache__/fbackup.cpython-311.pyc
new file mode 100644
index 0000000..5627093
Binary files /dev/null and b/functions/__pycache__/fbackup.cpython-311.pyc differ
diff --git a/functions/__pycache__/fedit.cpython-311.pyc b/functions/__pycache__/fedit.cpython-311.pyc
new file mode 100644
index 0000000..80091c2
Binary files /dev/null and b/functions/__pycache__/fedit.cpython-311.pyc differ
diff --git a/functions/__pycache__/fhost.cpython-311.pyc b/functions/__pycache__/fhost.cpython-311.pyc
new file mode 100644
index 0000000..12b365d
Binary files /dev/null and b/functions/__pycache__/fhost.cpython-311.pyc differ
diff --git a/functions/__pycache__/fiso.cpython-311.pyc b/functions/__pycache__/fiso.cpython-311.pyc
new file mode 100644
index 0000000..21de786
Binary files /dev/null and b/functions/__pycache__/fiso.cpython-311.pyc differ
diff --git a/functions/__pycache__/flxc.cpython-311.pyc b/functions/__pycache__/flxc.cpython-311.pyc
new file mode 100644
index 0000000..7a48ce0
Binary files /dev/null and b/functions/__pycache__/flxc.cpython-311.pyc differ
diff --git a/functions/__pycache__/fpool.cpython-311.pyc b/functions/__pycache__/fpool.cpython-311.pyc
new file mode 100644
index 0000000..b806b4d
Binary files /dev/null and b/functions/__pycache__/fpool.cpython-311.pyc differ
diff --git a/functions/__pycache__/fscreen.cpython-311.pyc b/functions/__pycache__/fscreen.cpython-311.pyc
new file mode 100644
index 0000000..840f385
Binary files /dev/null and b/functions/__pycache__/fscreen.cpython-311.pyc differ
diff --git a/functions/__pycache__/fvm.cpython-311.pyc b/functions/__pycache__/fvm.cpython-311.pyc
new file mode 100644
index 0000000..a2f0063
Binary files /dev/null and b/functions/__pycache__/fvm.cpython-311.pyc differ
diff --git a/functions/__pycache__/fvnc.cpython-311.pyc b/functions/__pycache__/fvnc.cpython-311.pyc
new file mode 100644
index 0000000..0abe216
Binary files /dev/null and b/functions/__pycache__/fvnc.cpython-311.pyc differ
diff --git a/functions/fedit.py b/functions/fedit.py
new file mode 100644
index 0000000..fa16bf0
--- /dev/null
+++ b/functions/fedit.py
@@ -0,0 +1,33 @@
+from config import *
+import base64
+
+#memory = Memory in Mo
+def set_memory(vm_name,memory_new):
+ dom = conn.lookupByName(vm_name)
+ dom.setMemory(memory_new)
+
+def set_vcpu(vm_name,vcpu_new):
+ dom = conn.lookupByName(vm_name)
+ dom.setVcpus(vcpu_new)
+
+def get_info_vm(vm_name):
+ dom = conn.lookupByName(vm_name)
+ state, maxmem, mem, cpus, cput = dom.info()
+ return state, maxmem, mem, cpus, cput
+
+def get_screenshot(vm_name):
+ dom = conn.lookupByName(vm_name)
+ stream = conn.newStream()
+ imageType = dom.screenshot(stream,0)
+ file = "tmp_screen_" + dom.name()
+ fileHandler = open(file, 'wb')
+ streamBytes = stream.recv(262120)
+ while streamBytes != b'':
+ fileHandler.write(streamBytes)
+ streamBytes = stream.recv(262120)
+ fileHandler.close()
+ stream.finish()
+ with open(file, "rb") as f:
+ data = base64.b64encode(f.read())
+ os.remove(file)
+ return data
diff --git a/templates/edit.html b/templates/edit.html
index 29b5fc7..a9469b5 100644
--- a/templates/edit.html
+++ b/templates/edit.html
@@ -12,15 +12,14 @@