b64_md5 算法,作者:Paul Johnston,网址:http://pajhome.org.uk/crypt/md5
我正在尝试使用 phpcurl 来获取网上银行交易。不幸的是,银行使用 b64_md5 算法将用户名和密码传递到此脚本 md5.js 完成的服务器。我用 google 搜索了一个 php 函数来模拟这个。但我可以找到一些帮助。
这是他们生成密码的代码,
function checkScript(){
pCheckScript.innerHTML = "";
document.form_000001.pSubmit.disabled = false;
document.form_000001.pCancel.disabled = false;
document.form_000001.challenge.value = "[B@6be16be1"
document.form_000001.login_name.focus();}
function submitForm(){
var vPassword = "";
for (var i = 0; i < document.form_000001.password.value.length; i++)vPassword = vPassword + "*";
document.form_000001.login_name.size = 1;
document.form_000001.password.size = 1;
document.form_000001.login_name.style.visibility = "hidden";
document.form_000001.password.style.visibility = "hidden";
textLoginName.innerHTML = document.form_000001.login_name.value;
textLoginPassword.innerHTML = vPassword;
document.form_000001.login_name.value = b64_md5(document.form_000001.login_name.value.toLowerCase());
document.form_000001.password.value = b64_md5(b64_md5(document.form_000001.password.value) + document.form_000001.challenge.value);
return true;}
问题是,如何构建 php 函数来模拟这个。
i'm trying to use php curl to grab internet banking transaction. unfortunately the bank uses b64_md5 algorithm to pass the username and password to the server done by this script md5.js . i've googled a php function to simulate this. but i can find something help.
here is their code to generate the password
function checkScript(){
pCheckScript.innerHTML = "";
document.form_000001.pSubmit.disabled = false;
document.form_000001.pCancel.disabled = false;
document.form_000001.challenge.value = "[B@6be16be1"
document.form_000001.login_name.focus();}
function submitForm(){
var vPassword = "";
for (var i = 0; i < document.form_000001.password.value.length; i++)vPassword = vPassword + "*";
document.form_000001.login_name.size = 1;
document.form_000001.password.size = 1;
document.form_000001.login_name.style.visibility = "hidden";
document.form_000001.password.style.visibility = "hidden";
textLoginName.innerHTML = document.form_000001.login_name.value;
textLoginPassword.innerHTML = vPassword;
document.form_000001.login_name.value = b64_md5(document.form_000001.login_name.value.toLowerCase());
document.form_000001.password.value = b64_md5(b64_md5(document.form_000001.password.value) + document.form_000001.challenge.value);
return true;}
the queston is, how to build php function to simulate this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是使用
base64_encode
和md5
。Here's an example that uses
base64_encode
andmd5
.