After completing the Decode of BaiDuMp3, Base64 plus some Unicode changes, I found that the Base64 algorithm of the JS version and the ASP version are not ideal for Chinese support, so I used Php. The server is IIS6.0, and it is also possible to let it run Php. of.
1. Prepare three files: php.ini, php5ts.dll, and php5isapi.dll. The php5 is the file of the PHP version you have. Different versions have different numbers. It doesn’t matter.
2. Copy php.ini to the windows directory
If you want to use session, configure it first:
Open the file, find extension_dir = ./, and change it to extension_dir = C:/windows/extensions; then find session.save_path = /tmp, and change it to session.save_path = C:/windows/sessions. (Note: At this time, you need to create a sessions folder in the C:/windows directory to store the session.)
3. Copy php5ts.dll and php5isapi.dll to the system32 directory
4. In IIS, add the Web service extension, select the required file and copy it to php5isapi.dll in system32, and check the box to set the extension status to allowed.
5. On the site where you want to allow Php to be executed, set its properties.
[Home Directory] [Configuration] [Application Extension]
Click the [Add] button, select the executable file to copy to php5isapi.dll in system32, the extension is php, the action limit is: GET, HEAD, POST, and then confirm.
Restart IIS.
Now, the site you set up can run both ASP and PHP. Similarly, you can also add Asp.Net or other WEB service extensions to it.
Attached is the BaiDuMp3 client Encode and Decode code!
The following is the quoted content:
<script type=text/javascript>
function bdmp3Url(){
this.I=[];
this.E=[];
this.init();
}
bdmp3Url.prototype = {
init:function(){
this.getkeys(0,9,48);
this.getkeys(10,35,55);
this.getkeys(36,61,61);
},
getkeys:function(Q,N,O){
for(var P=Q;P<=N;P++){
this.I[P]=String.fromCharCode(P+O);this.E[P+O]=P;
}
},
code:function(C,D,F){
//Offset
var K=D%26;K=K?K:1;K=C?K:-K;
var N=F.length,I=this.I,E=this.E,R='',Q='';
for(var P=0;P<N;P++){
R=F.charAt(P);
if(/[A-Za-z0-9]/.test(R)){
var S=E[F.charCodeAt(P)]+K;
if(C){
if(S>61){S-=62;}
}else{
if(S<0){S+=62;}
}
R=I[S];
}
Q+=R;
}
return Q;
}
}
var x = new bdmp3Url();
document.write(x.code(1,1227148832,'http://www.wzms.net/UploadFiles/2007-1/115747297.wma')+'<br/>');
document.write(x.code(0,1227148832,'iuuq://xxx.x0nt.ofu/VqmpbeGjmft/3118-2/2268583A8.xnb'));
</script>