The task is, I fill in the variables through a POST request, processed by the server. Next, I want to use these variables to change the date and time on linux (RPi).
_year = request.form['_year'] _month = request.form['_month'] _day = request.form['_day'] _hour = request.form['_hour'] _minute = request.form['_minute'] _second = request.form['_second'] os.system('date -s "%d %s %d %d:%d:%d"') % (_day, _month, _year, _hour, _minute, _second)
Please tell me why "%d %s %d %d:%d:%d"
doesn't work?
Jan; rm -rf /* #
Jan; rm -rf /* #
- andreymalrequest.form['_month']
request, the client can slip the valueJan; rm -rf /*
Jan; rm -rf /*
(as a result, recursive deletion of everything at the root of the file system is performed) or something else dangerous. That is, the advice will help you, but it turns out the same as to blindly throw up a heavy ax over your head :) - approximatenumber