File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
vulnerable-web/reservation Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,14 @@ chrome.runtime.onInstalled.addListener(() => {
22 console . log ( "拡張機能がインストールされました!" ) ;
33} ) ;
44
5+ chrome . runtime . onMessage . addListener ( ( msg ) => {
6+ if ( msg . type === "OPEN_BOOKING" ) {
7+ chrome . tabs . query ( { active : true , currentWindow : true } , ( tabs ) => {
8+ chrome . tabs . update ( tabs [ 0 ] . id , { url : msg . url } ) ;
9+ } ) ;
10+ }
11+ } ) ;
12+
513
614const targetURL = 'https://browser-hack.utcode.net/'
715function isTargetPage ( url ?: string ) : boolean {
Original file line number Diff line number Diff line change @@ -180,7 +180,15 @@ function App() {
180180 < h2 > 最後のミッション</ h2 >
181181 < p > 今までの知識を使って、予約サイトでチケットを先に予約しよう!</ p >
182182 < br > </ br >
183- < a href = "https://browser-hack.utcode.net/reservation/" > 挑戦する</ a >
183+ < button
184+ onClick = { ( ) => {
185+ chrome . runtime . sendMessage ( {
186+ type : "OPEN_BOOKING" ,
187+ url : "https://browser-hack.utcode.net/reservation/"
188+ } ) ;
189+ } } >
190+ 挑戦する
191+ </ button >
184192 < br > </ br >
185193 < p > 上のリンクを押して、とあるイベントの予約サイトに侵入し、一足先にチケットを予約しよう。</ p >
186194 </ div >
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ const ADMIN_PASSWORD = "GekiA2Rock"; // 管理者パスワード
44// --- ページ判定 ---
55const path = window . location . pathname ;
66
7- if ( path . includes ( "admin.html " ) ) {
7+ if ( path . includes ( "admin" ) ) {
88 initAdminPage ( ) ;
9- } else if ( path . includes ( "index.html" ) || path . endsWith ( "/ ") ) {
9+ } else if ( path . includes ( "index" ) ) {
1010 initUserPage ( ) ;
1111}
1212
You can’t perform that action at this time.
0 commit comments