shell 解码url url decode
发布时间:2020-12-15 16:55:54 所属栏目:安全 来源:网络整理
导读:文件名:url_decode.sh#/bin/shawk'BEGIN{for(i=0;i10;i++)hex[i]=i;hex["A"]=hex["a"]=10;hex["B"]=hex["b"]=11;hex["C"]=hex["c"]=12;hex["D"]=hex["d"]=13;hex["E"]=hex["e"]=14;hex["F"]=hex["f"]=15;}{gsub(/+/,"");i=$0;while(match(i,/%../)){if(RST
文件名:url_decode.sh #/bin/sh awk'BEGIN{ for(i=0;i<10;i++) hex[i]=i; hex["A"]=hex["a"]=10; hex["B"]=hex["b"]=11; hex["C"]=hex["c"]=12; hex["D"]=hex["d"]=13; hex["E"]=hex["e"]=14; hex["F"]=hex["f"]=15; } { gsub(/+/,""); i=$0; while(match(i,/%../)){ if(RSTART>1); printf"%s",substr(i,1,RSTART-1); printf"%c",hex[substr(i,RSTART+1,1)]*16+hex[substr(i,RSTART+2,1)]; i=substr(i,RSTART+RLENGTH); } printi; }' echo $url | ./url_decode.sh (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |