Manual:Protect.php

Details
protect.php file is a maint-script>Special:MyLanguage/Manual:Maintenance scripts|maintenance script that handles protecting and unprotecting a page.

Options/Arguments
This script takes title as their first argument on which you want to do action.

This script accepts following five others options as well.

Doing action with username "Foo"
if you don't pass --user option to script then it will do action with user User:Maintenance script.