i:=1;
loop
if i<=length(m) then
if instr(′1234567890′,substr(m,i,1),1,1)>0 then
kk:=kk||chr(100+to_number(substr(m,i,1)));
elseif instr(‘wxyz‘,substr(m,i,1),1,1)>0 then
kk:=kk||chr(-8+ascii(substr(m,i,1)));
else
kk:=kk||chr(4+ascii(substr(m,i,1)));
end if;
else
exit;
end if;
i:=i+1;
end loop;
return kk;
exception
when others then
return ′-1′;
end;
·在test用户下建表mmtest并插入记录:
create table mmtest
(usnamevarchar2(6),------用户名称
mimavarchar2(6)------加密前的密码);
insert into mmtest values( ‘sfyy‘,‘eds2‘);
commit;
·执行以下语句
SQL>select mmtranslate(‘eds2‘) from dual;
MMTRANSLATE(‘EDS2‘)
----------------------------------------
ihwf
利用DBA权限更改sfyy的密码为上面语句的执行结果:
alter user sffy
identified by ihwf; ;
文章来源于领测软件测试网 https://www.ltesting.net/