Explore
Courses
Batches
Sketches
Statistics
Code a Pookkalam
Jobs
Devsprint
People
Course Creation
Create a Course
Guidelines
Resources
Support
Blogs
My Profile
About Us
Login
Sketches
0
Shell execution on sever.
By
Rohit T P
Run
import subprocess content = [ "echo 'This runs' \n", "pip install Flask \n", "echo 'now i can run an entire server here'" ] f = open("dangerous.sh", "w") f.writelines(content) f.close() subprocess.run(["chmod","+x","./dangerous.sh"]) subprocess.run(["sh","dangerous.sh"])
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login