主頁 >  其他 > Oracle12c與Oracle11g采用觸發器與存盤程序實作同步更新(代碼+圖解)

Oracle12c與Oracle11g采用觸發器與存盤程序實作同步更新(代碼+圖解)

2020-10-25 05:10:40 其他

一、保證兩臺筆記本網路互通

本文已同步到:http://www.bithachi.cn/posts/198e6f50.html

關于連接,詳情見之前寫的:WIFI網路,兩臺筆記本互聯Oracle,一臺是11g,一臺是12c

現在測驗的ip地址:

  • A: 10.65.252.84
  • B: 10.82.156.248

二、用戶簡單架構圖及權限設計

  • A機的DBA賬戶是shj_dba,B機的DBA賬戶是c##hachi
  • 中間的為連接名,標明連接的名字,對應權限的用戶使用對方跟自己權限相同的賬號,通過連接名訪問對方資料庫,

  • 各個用戶的權限

三、表結構

  • 這里雙方都采用以下陳述句創建表,表就建立在各自sys創建的DBA的模式下,不建立任何外鍵和索引,以免發生同步觸發器更新例外,初學先入個門吧!

/*==============================================================*/
/* Table: "part"                                                */
/*==============================================================*/
create table "part" 
(
   "p_id"               INTEGER              not null,
   "p_name"             VARCHAR2(10),
   "p_size"             VARCHAR2(10),
   "p_price"            FLOAT(10),
   "p_desc"             VARCHAR2(50),
   constraint PK_PART primary key ("p_id")
);

/*==============================================================*/
/* Table: "project"                                             */
/*==============================================================*/
create table "project" 
(
   "pj_id"              INTEGER              not null,
   "pj_money"           FLOAT(10),
   "pj_date"            DATE,
   constraint PK_PROJECT primary key ("pj_id")
);

/*==============================================================*/
/* Table: "staff"                                               */
/*==============================================================*/
create table "staff" 
(
   "sf_id"              INTEGER              not null,
   "s_id"               INTEGER,
   "sta_sf_id"          INTEGER,
   "sf_name"            VARCHAR2(10),
   "sf_age"             SMALLINT,
   "sf_xname"           VARCHAR2(10),
   constraint PK_STAFF primary key ("sf_id")
);

/*==============================================================*/
/* Table: "storage"                                             */
/*==============================================================*/
create table "storage" 
(
   "s_id"               INTEGER              not null,
   "s_area"             FLOAT(10),
   "s_phone"            VARCHAR2(11),
   constraint PK_STORAGE primary key ("s_id")
);

/*==============================================================*/
/* Table: "storage_info"                                        */
/*==============================================================*/
create table "storage_info" 
(
   "s_id"               INTEGER              not null,
   "p_id"               INTEGER              not null,
   "sf_num"             INTEGER,
   constraint PK_STORAGE_INFO primary key ("s_id", "p_id")
);

/*==============================================================*/
/* Table: "supplier"                                            */
/*==============================================================*/
create table "supplier" 
(
   "sp_id"              INTEGER              not null,
   "sp_name"            VARCHAR2(10),
   "sp_address"         VARCHAR2(30),
   "sp_phone"           VARCHAR2(11),
   "sp_acount"          VARCHAR2(15),
   constraint PK_SUPPLIER primary key ("sp_id")
);

/*==============================================================*/
/* Table: "supply_info"                                         */
/*==============================================================*/
create table "supply_info" 
(
   "p_id"               INTEGER              not null,
   "pj_id"              INTEGER              not null,
   "sp_id"              INTEGER              not null,
   "sp_num"             INTEGER,
   constraint PK_SUPPLY_INFO primary key ("p_id", "pj_id", "sp_id")
);

四、sys授予系統權限,創建DBA賬戶

--------------------------   一些可能用得上的查詢除錯陳述句   ------------------------------------------ 
-- 命令列查看是否有遠程連接權限
select * from user_sys_privs where privilege like upper('%DATABASE LINK%'); 
-- 命令列視窗使用system管理員去grant授權遠程連接
grant CREATE DATABASE LINK to public; 
-- 查看遠程連接
select * from dba_db_links;  
 -- 創建同義詞
create public synonym stu for student;
select * from stu;	
--洗掉同義詞
drop  synonym remote ;
-- 洗掉遠程連接
drop database link linkname;
-- ORACLE 查找所有同義詞
SELECT * FROM SYS.ALL_SYNONYMS t WHERE t.owner in ('C##HACHI');
---------------------------------------------------------------------------------- 
------------------------------------   A機   ---------------------------------------------- 
conn sys/a123456 as sysdba; 
-- 授予所有用戶連接權限
grant connect to public;
-- 授予所有用戶創建遠程連接權限,這樣所有用戶都可以創建和洗掉遠程連接 database link
grant CREATE DATABASE LINK to public;
-- 授予所有用戶創建同義詞的權限,這樣所有用戶都可以創建和洗掉同義詞 synonym
grant CREATE synonym to public;
-- DBA用戶創建及授權
create user shj_dba IDENTIFIED by a123456;
grant dba,connect,resource to shj_dba;
commit;

 
------------------------------------   B機   ---------------------------------------------- 
conn sys/a123456 as sysdba; 
-- 授予所有用戶連接權限
grant connect to public;
-- 授予所有用戶創建遠程連接權限,這樣所有用戶都可以創建和洗掉遠程連接 database link
grant CREATE DATABASE LINK to public;
-- 授予所有用戶創建同義詞的權限,這樣所有用戶都可以創建和洗掉同義詞 synonym
grant CREATE synonym to public;
-- DBA用戶創建及授權
create user c##hachi IDENTIFIED by a123456;
grant dba,connect,resource to c##hachi;

五、雙方各自創建的DBA賬戶再創建其他用戶,以及私有同義詞

------------------------------------   B機   ---------------------------------------------- 
conn c##hachi/a123456;
-- 供應商用戶創建及授權
create user c##supplier IDENTIFIED by a123456 ;
grant SELECT,INSERT,DELETE,UPDATE on  "supplier" to c##supplier;
grant SELECT,INSERT,DELETE,UPDATE on "supply_info" to c##supplier;
grant SELECT on "part" to c##supplier;
grant SELECT on "project" to c##supplier;

-- 領導用戶創建及授權
create user c##leader IDENTIFIED by a123456 ;
grant SELECT,INSERT,DELETE,UPDATE on "staff" to c##leader;
grant SELECT  on "supplier" to c##leader;
grant SELECT  on "supply_info" to c##leader;
grant SELECT  on "project" to c##leader;
grant SELECT,INSERT,DELETE,UPDATE  on "part" to c##leader;
grant SELECT,UPDATE  on "storage" to c##leader;
grant SELECT,INSERT,DELETE,UPDATE  on "storage_info" to c##leader;

-- 職工用戶創建及授權
create user c##staff IDENTIFIED by a123456;
grant SELECT on "staff" to c##staff;
grant SELECT on "storage" to c##staff;

-- 創建4個不同用戶權限的遠程連接

conn c##hachi/a123456;
-- 本機DBA用戶c##hachi,使用對方的DBA賬戶登錄遠程連接
create  database link  shj0dba   connect to shj_dba identified by "a123456" using '10.65.252.84/orcl';
-- 創建同義詞
create  synonym remote_part for "part"@shj0dba;
create  synonym remote_project for "project"@shj0dba;
create  synonym remote_staff for "staff"@shj0dba;
create  synonym remote_storage for "storage"@shj0dba;
create  synonym remote_storage_info for "storage_info"@shj0dba;
create  synonym remote_supplier for "supplier"@shj0dba;
create  synonym remote_supply_info for "supply_info"@shj0dba;
select * from remote_supply_info;
commit;

 
conn c##leader/a123456;
-- 本機領導用戶c##leader,使用對方的領導賬戶登錄遠程連接
create  database link  shj0leader   connect to shj_leader identified by "a123456" using '10.65.252.84/orcl';
create  synonym remote_part for shj_dba."part"@shj0leader;
create  synonym remote_project for shj_dba."project"@shj0leader;
create  synonym remote_staff for shj_dba."staff"@shj0leader;
create  synonym remote_storage for shj_dba."storage"@shj0leader;
create  synonym remote_storage_info for shj_dba."storage_info"@shj0leader;
create  synonym remote_supplier for shj_dba."supplier"@shj0leader;
create  synonym remote_supply_info for shj_dba."supply_info"@shj0leader;
select * from remote_supply_info;
 commit;

conn c##supplier/a123456;
-- 本機供應商用戶c##supplier,使用對方的供應商賬戶登錄遠程連接
create  database link  shj0supplier   connect to shj_supplier identified by "a123456" using '10.65.252.84/orcl';
create  synonym remote_part for shj_dba."part"@shj0supplier;
create  synonym remote_project for shj_dba."project"@shj0supplier;
create  synonym remote_supplier for shj_dba."supplier"@shj0supplier;
create  synonym remote_supply_info for shj_dba."supply_info"@shj0supplier;
select * from remote_supply_info;
 commit;
 
conn c##staff/a123456;
-- 本機員工用戶c##staff,使用對方的員工賬戶登錄遠程連接
create  database link  shj0staff   connect to shj_staff identified by "a123456" using '10.65.252.84/orcl';
create  synonym remote_staff for shj_dba."staff"@shj0staff ;
create  synonym remote_storage for shj_dba."storage"@shj0staff;
select * from remote_staff;
commit;

------------------------------------   A機   ---------------------------------------------- 
conn shj_dba/a123456;
-- 供應商用戶創建及授權
create user shj_supplier IDENTIFIED by a123456 ;
grant SELECT,INSERT,DELETE,UPDATE on  "supplier" to shj_supplier;
grant SELECT,INSERT,DELETE,UPDATE on "supply_info" to shj_supplier;
grant SELECT on "part" to shj_supplier;
grant SELECT on "project" to shj_supplier;

-- 領導用戶創建及授權
create user shj_leader IDENTIFIED by a123456 ;
grant SELECT,INSERT,DELETE,UPDATE on "staff" to shj_leader;
grant SELECT  on "supplier" to shj_leader;
grant SELECT  on "supply_info" to shj_leader;
grant SELECT  on "project" to shj_leader;
grant SELECT,INSERT,DELETE,UPDATE  on "part" to shj_leader;
grant SELECT,UPDATE  on "storage" to shj_leader;
grant SELECT,INSERT,DELETE,UPDATE  on "storage_info" to shj_leader;

-- 職工用戶創建及授權
create user shj_staff IDENTIFIED by a123456;
grant SELECT on "staff" to shj_staff;
grant SELECT on "storage" to shj_staff;
 commit;
 
 -- 洗掉同名同義詞與連接
DROP SYNONYM remote_part;
DROP SYNONYM remote_project;
DROP SYNONYM remote_staff;
DROP SYNONYM remote_storage;
DROP SYNONYM remote_storage_info;
DROP SYNONYM remote_supplier;
DROP SYNONYM remote_supply_info;
drop database link c##0hachi;

-- 創建4個不同用戶權限的遠程連接

conn shj_dba/a123456;

-- 本機DBA用戶shj_dba,使用對方的DBA賬戶登錄遠程連接
create  database link  c##0hachi connect to "c##hachi" identified by "a123456" using '10.82.156.248/orcl';
-- 創建同義詞
create  synonym remote_part for "part"@c##0hachi;
create  synonym remote_project for "project"@c##0hachi;
create  synonym remote_staff for "staff"@c##0hachi;
create  synonym remote_storage for "storage"@c##0hachi;
create  synonym remote_storage_info for "storage_info"@c##0hachi;
create  synonym remote_supplier for "supplier"@c##0hachi;
create  synonym remote_supply_info for "supply_info"@c##0hachi;
select * from remote_supply_info;
commit;

 
conn shj_leader/a123456;
-- 本機領導用戶shj_leader,使用對方的領導賬戶登錄遠程連接
create  database link  c##0leader   connect to "c##leader" identified by "a123456" using '10.82.156.248/orcl';
create  synonym remote_part for c##hachi."part"@c##0leader;
create  synonym remote_project for c##hachi."project"@c##0leader;
create  synonym remote_staff for c##hachi."staff"@c##0leader;
create  synonym remote_storage for c##hachi."storage"@c##0leader;
create  synonym remote_storage_info for c##hachi."storage_info"@c##0leader;
create  synonym remote_supplier for c##hachi."supplier"@c##0leader;
create  synonym remote_supply_info for c##hachi."supply_info"@c##0leader;
select * from remote_supply_info;
 commit;

conn shj_supplier/a123456;
-- 本機供應商用戶shj_supplier,使用對方的供應商賬戶登錄遠程連接
create  database link  c##0supplier   connect to "c##supplier" identified by "a123456" using '10.82.156.248/orcl';
create  synonym remote_part for c##hachi."part"@c##0supplier;
create  synonym remote_project for c##hachi."project"@c##0supplier;
create  synonym remote_supplier for c##hachi."supplier"@c##0supplier;
create  synonym remote_supply_info for c##hachi."supply_info"@c##0supplier;
select * from remote_supply_info;
 commit;
 
conn shj_staff/a123456;
-- 本機員工用戶shj_staff,使用對方的員工賬戶登錄遠程連接
create  database link  c##0staff   connect to "c##staff" identified by "a123456" using '10.82.156.248/orcl';
create  synonym remote_staff for c##hachi."staff"@c##0staff ;
create  synonym remote_storage for c##hachi."storage"@c##0staff;
select * from remote_staff;
commit;

因為使用的wifi網路,采用DHCP協議動態分配IP地址,所以每一次兩臺筆記本的IP地址是不一樣的,所以連接得刪了再重新建立,同義詞不用刪了重新建立,重新創建一下database link連接就行了,
我這里建的都是私有連接,私有同義詞,只有創建該連接的用戶才可以使用,其他用戶沒有使用權限,是透明的,所以設定同名的同義詞不影響,

  • 同義詞創建后就可以使用同義詞去增刪改查對方的表了,這里貼兩張圖,各自私有建的連接,不影響各自的同名同義詞,

六、創建同步觸發器與存盤程序

  1. 可能由于版本問題,B機12C可以創建觸發器同步備份A機的上的表,而A機不行,同時B機創建存盤程序,執行存盤程序,會觸發B機的觸發器去同步更新A機上的表,
  2. A機可以使用連接更新B機的資料,同時觸發觸發器更新A機自己的表,

下面以圖文結合方式說明以上兩點,

這里觸發器和存盤程序都建在c##hachi用戶模式下,

6.1 觸發器

觸發器代碼:

------------------------------------   B機 c##hachi模式下創建   ---------------------------------------------- 
-- 增刪改part
drop trigger insert_update_delete_part;

create or replace trigger insert_update_delete_part after insert or update or delete
on  "part" for each row  
begin
	if inserting then
			 insert into remote_part("p_id","p_name","p_size","p_price","p_desc") values(:new."p_id",:new."p_name",:new."p_size",:new."p_price",:new."p_desc");
	elsif updating then
			  update remote_part set  remote_part."p_name"=:new."p_name",remote_part."p_size"=:new."p_size",remote_part."p_price"=:new."p_price",remote_part."p_desc"=:new."p_desc" where remote_part."p_id"=:new."p_id";
	elsif deleting then 
			 delete from remote_part where remote_part."p_id"=:old."p_id";
	end if;
end;

insert into "part" values(9,'eeeee',22,12,'eeeeee');
update "part" set "p_name"='abc',"p_size"=11,"p_price"=11,"p_desc"='abc' where "p_id"=9;
delete from "part" where "p_id"=9;

 
-- 增刪改project
drop trigger insert_update_delete_project;

create or replace trigger insert_update_delete_project after insert or update or delete
on  "project" for each row
begin
	if inserting then
			 insert into remote_project("pj_id","pj_money","pj_date") values(:new."pj_id",:new."pj_money",:new."pj_date");
	elsif updating then
			  update remote_project set  remote_project."pj_money"=:new."pj_money",remote_project."pj_date"=:new."pj_date" where remote_project."pj_id"=:new."pj_id";
	elsif deleting then 
			 delete from remote_project where remote_project."pj_id"=:old."pj_id";
	end if;
end;

insert into "project" values(1,100,null);
update "project" set "pj_money"=200,"pj_date"=null where "pj_id"=1;
delete from "project" where "pj_id"=1;


-- 增刪改staff
drop trigger insert_update_delete_staff;

create or replace trigger insert_update_delete_staff after insert or update or delete
on  "staff" for each row
begin
	if inserting then
			 insert into remote_staff("sf_id","s_id","sta_sf_id","sf_name","sf_age","sf_xname") values(:new."sf_id",:new."s_id",:new."sta_sf_id",:new."sf_name",:new."sf_age",:new."sf_xname");
	elsif updating then
			  update remote_staff set  remote_staff."sf_name"=:new."sf_name",remote_staff."sf_age"=:new."sf_age",remote_staff."sf_xname"=:new."sf_xname" where remote_staff."sf_id"=:new."sf_id";
	elsif deleting then 
			 delete from remote_staff where remote_staff."sf_id"=:old."sf_id";
	end if;
end;

insert into "staff" values(1,1,1,'Hachi',10,'Bit');
update "staff" set "sf_name"='BitHachi',"sf_xname"='bithachi' where "sf_id"=1;
delete from "staff" where "sf_id"=1;

-- 增刪改storage
drop trigger insert_update_delete_storage;

create or replace trigger insert_update_delete_storage after insert or update or delete
on  "storage" for each row
begin
	if inserting then
			 insert into remote_storage("s_id","s_area","s_phone") values(:new."s_id",:new."s_area",:new."s_phone");
	elsif updating then
			  update remote_storage set  remote_storage."s_area"=:new."s_area",remote_storage."s_phone"=:new."s_phone" where remote_storage."s_id"=:new."s_id";
	elsif deleting then 
			 delete from remote_storage where remote_storage."s_id"=:old."s_id";
	end if;
end;

insert into "storage" values(1,100,'17683738511');
update "storage" set "s_area"=200,"s_phone"='17683838555' where "s_id"=1;
delete from "storage" where "s_id"=1;

-- 增刪改storage_info
drop trigger insert_update_delete_storage_info;

create or replace trigger insert_update_delete_storage_info after insert or update or delete
on  "storage_info" for each row
begin
	if inserting then
			 insert into remote_storage_info("s_id","p_id","sf_num") values(:new."s_id",:new."p_id",:new."sf_num");
	elsif updating then
			  update remote_storage_info set  remote_storage_info."sf_num"=:new."sf_num"  where remote_storage_info."s_id"=:new."s_id" and remote_storage_info."p_id"=:new."p_id";
	elsif deleting then 
			 delete from remote_storage_info where remote_storage_info."s_id"=:old."s_id" and remote_storage_info."p_id"=:old."p_id";
	end if;
end;

insert into "storage_info" values(1,1,100);
update "storage_info" set "sf_num"=200  where "s_id"=1 and "p_id"=1;
delete from "storage_info" where "s_id"=1 and "p_id"=1;


-- 增刪改supplier
drop trigger insert_update_delete_supplier;

create or replace trigger insert_update_delete_supplier after insert or update or delete
on  "supplier" for each row
begin
	if inserting then
			 insert into remote_supplier("sp_id","sp_name","sp_address","sp_phone","sp_acount") values(:new."sp_id",:new."sp_name",:new."sp_address",:new."sp_phone",:new."sp_acount");
	elsif updating then
			  update remote_supplier set  remote_supplier."sp_name"=:new."sp_name"  where remote_supplier."sp_id"=:new."sp_id";
	elsif deleting then 
			 delete from remote_supplier where remote_supplier."sp_id"=:old."sp_id" ;
	end if;
end;

insert into "supplier" values(1,'BitHachi','中國湖北','17683738511','1000001');
update "supplier" set "sp_name"='Hachi'  where "sp_id"=1  ;
delete from "supplier" where  "sp_id"=1;


-- 增刪改supply_info
drop trigger insert_update_delete_supply_info;

create or replace trigger insert_update_delete_supply_info after insert or update or delete
on  "supply_info" for each row
begin
	if inserting then
			 insert into remote_supply_info("p_id","pj_id","sp_id","sp_num") values(:new."p_id",:new."pj_id",:new."sp_id",:new."sp_num");
	elsif updating then
			  update remote_supply_info set  remote_supply_info."sp_num"=:new."sp_num"  where remote_supply_info."p_id"=:new."p_id" and remote_supply_info."pj_id"=:new."pj_id" and remote_supply_info."sp_id"=:new."sp_id";
	elsif deleting then 
			 delete from remote_supply_info where remote_supply_info."p_id"=:old."p_id" and remote_supply_info."pj_id"=:old."pj_id" and remote_supply_info."sp_id"=:old."sp_id";
	end if;
end;

insert into "supply_info" values(1,1,1,100);
update "supply_info" set "sp_num"=200  where "p_id"=1 and "pj_id"=1 and "sp_id"=1 ;
delete from "supply_info" where "p_id"=1 and "pj_id"=1 and "sp_id"=1 ;
  • 這里觸發器很多,我就演示一個,見下圖:

    這張圖是B機創建一個觸發器實作remote_part同義詞表示的A機的part表的同步更新,

現在我們在A機上使用同義詞進行插入、修改、洗掉,會觸發B機的觸發器同步更新B機和A機的表資料,

6.3 存盤程序

這里B機創建了一個存盤程序,B機呼叫存盤程序可以實作B機和A機的同步更新,

先貼代碼再放截圖流程

-- 查詢資料
drop procedure select_data;
create procedure select_data 
(var_datas out sys_refcursor) AS  
begin 
	OPEN var_datas for select * from "part"; 
end select_data;
var datas refcursor;
exec select_data(:datas);
print:datas;

-- 增加資料
drop procedure insert_data;
create procedure insert_data
(var_id "part"."p_id"%TYPE,var_name "part"."p_name"%TYPE,var_size "part"."p_size"%TYPE,var_price "part"."p_price"%TYPE,var_desc "part"."p_desc"%TYPE) 
AS   
begin  
	INSERT INTO "part" values(var_id,var_name,var_size,var_price,var_desc);
end insert_data;
exec insert_data(2,'ANIVJO',22,15,'DFGDG');

-- 修改資料
drop procedure update_data;
create procedure update_data
(var_id "part"."p_id"%TYPE,var_name "part"."p_name"%TYPE)  
AS  
begin  
	UPDATE "part" SET "p_name"=var_name  WHERE "p_id"=var_id;
end update_data;
exec update_data(2,'BitHachi');


-- 洗掉資料
drop procedure delete_data;
create procedure delete_data
(var_id "part"."p_id"%TYPE)  
AS  
begin  
	DELETE FROM "part" WHERE "p_id"=var_id;
end delete_data;
exec delete_data(2);

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/189787.html

標籤:其他

上一篇:吊打MySQL:21性能優化實踐+學習導圖+55面試+筆記+20高頻知識點

下一篇:MySQL事務

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more