- UID
- 14878
注册时间2006-6-4
阅读权限30
最后登录1970-1-1
龙战于野
该用户从未签到
|
学破解这些天来,做注册写了一点字符串处理函数,现在拿出来与大家分享:
希望对你在写CrackMe或是写注册机有所帮助...
希望能起个抛砖引玉的作用~~~
- function StrToBack(s: string): string; //将字符串倒转过来
- var i:integer;
- begin
- for i:=1 to length(s) do
- begin
- result :=s[i]+result;
- end;
- end;
- function StrToASCII16(s: string): string; //字符串转换ascii码16进制
- var i:integer;
- begin
- for i:=1 to length(s) do
- begin
- result := result + IntToHex(ord(s[i]),2);
- end;
- end;
- function StrToASCII10(s: string): string; //字符串转换ascii码10进制
- var i:integer;
- begin
- for i:=1 to length(s) do
- begin
- result:= result + inttostr(ord(s[i]));
- end;
- end;
- function SiftStr(Str: string): string; //过滤字符串
- var i,j:integer;
- begin
- Result:='';
- j:=Length(str);
- for i:=0 to j do
- begin
- if str[i] in ['0'..'9','a'..'z','A'..'Z'] then
- Result:=Result+str[i];
- end;
- end;
- function DoubleStr(Str: string): string; //取字符串偶位数字符
- var
- i: Integer;
- begin
- Result := '';
- for i := 2 to Length(Str) do
- if i mod 2 = 0 then
- Result := Result + Str[i];
- end;
复制代码 |
|