rc4 encryption

I am writing a script for login logout scenario for a weeb application it uses the rc4 encryption for password field and i am not able to login into the applicaation through script.
Any idea how to solve the problem,