Skip to content
Snippets Groups Projects
Commit 7382bf0d authored by Timmy Chan's avatar Timmy Chan
Browse files

Change prompt messages

parent 390271fd
No related branches found
No related tags found
Loading
......@@ -4,10 +4,9 @@ import re
def qemu_vm_setup(vuln, app_path, vuln_type):
print(vuln, "\n-----------------\n", app_path, "\n-----------------\n", vuln_type)
description = vuln['description']
print("Qemu VM setup")
print("Running Qemu VM setup")
arch = None
kernel_version = None
......@@ -16,7 +15,7 @@ def qemu_vm_setup(vuln, app_path, vuln_type):
if len(version_list) == 0:
print("There are no version numbers explicitly mentioned in the vulnerability description.")
print("Retry using EDB id instead or build manually")
print("Please try again using EDB id instead or build manually")
elif len(version_list) == 1:
# If only one version number found, use it as kernel version number.
valid_version_number = get_kernel_release_number(version_list[0])
......@@ -39,7 +38,7 @@ def qemu_vm_setup(vuln, app_path, vuln_type):
# TODO: Suggest using the oldest version closest to 4.x in the list.
valid_version_number = get_kernel_release_number(version_list[0])
user_input = input(f"Is it okay to use version {valid_version_number}?").lower()
user_input = input(f"Is it okay to use version {valid_version_number}? ([yes]/no)").lower()
if user_input in ["y", "yes", ""]:
kernel_version = valid_version_number
......@@ -52,7 +51,7 @@ def qemu_vm_setup(vuln, app_path, vuln_type):
arch = archs[0]
else:
print("It looks like the vulnerability depends on architecture " + archs[0])
user_input = input("Is it correct? [yes]/no").lower()
user_input = input("Is it correct? ([yes]/no)").lower()
if user_input in ["y", "yes", ""]:
arch = archs[0]
......@@ -60,7 +59,7 @@ def qemu_vm_setup(vuln, app_path, vuln_type):
# Run full automatic qemu vm setup
setup(arch=arch, kernel_version=kernel_version)
else:
user_input = input(f"Do you want to manually enter specifications?").lower()
user_input = input(f"Do you want to manually enter specifications? ([yes]/no)").lower()
if user_input in ["y", "yes", ""]:
qemu_manual_setup()
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment