RbCafe

Shell Example 2

Posted in Codex by RbCafe on the October 2nd, 2005

Hi

This shell example was found on RB Nug

function check_sudo_password(password as string) as boolean

dim sh as shell
sh=new shell
sh.execute “echo ‘”+password+”‘ | sudo echo ‘working’”
return instr(sh.result,”working”)<>0

end function

Test it to know if it works

Cya 8)


Leave a Reply

You must be logged in to post a comment.