Aug-30-2018, 10:07 AM
hello all ...
im trying to run this command on the system ( whoami ) and i need to result for the command to be saved in html page ...
this is my code ...
im trying to run this command on the system ( whoami ) and i need to result for the command to be saved in html page ...
this is my code ...
import os qassam = os.system("whoami") html_str = """ <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>test</h1> <============================================== i need to replace test with ( qassam = os.system("whoami") ) result !! <p>My first paragraph.</p> </body> </html> """ Html_file= open(r"C:\Users\adam\AppData\q.html","w") Html_file.write(html_str) Html_file.close()how i can do that ?