File tree Expand file tree Collapse file tree 4 files changed +50
-11
lines changed
src/Resources/app/administration/src/module/tinect-redirects Expand file tree Collapse file tree 4 files changed +50
-11
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,35 @@ export default {
9191 this . total = total ;
9292 } ,
9393
94- openAbuseIPDB ( ipAddress ) {
95- const url = `https://www.abuseipdb.com/check/${ ipAddress } ` ;
96- window . open ( url , '_blank' ) ;
97- }
94+ getIPCheckers ( ) {
95+ return {
96+ abuseipdb : {
97+ label : this . $tc ( 'tinect-redirects.requests.ipCheckers.abuseipdb' ) ,
98+ url ( ipAddress ) { return 'https://www.abuseipdb.com/check/' + ipAddress ; } ,
99+ } ,
100+ pulsedrive : {
101+ label : this . $tc ( 'tinect-redirects.requests.ipCheckers.pulsedrive' ) ,
102+ url ( ipAddress ) { return 'https://pulsedive.com/indicator/?ioc=' + window . btob ( ipAddress ) ; } ,
103+ } ,
104+ whois : {
105+ label : this . $tc ( 'tinect-redirects.requests.ipCheckers.whois' ) ,
106+ url ( ipAddress ) { return 'https://www.whois.com/whois/' + ipAddress ; } ,
107+ } ,
108+ shodan : {
109+ label : this . $tc ( 'tinect-redirects.requests.ipCheckers.shodan' ) ,
110+ url ( ipAddress ) { return 'https://www.shodan.io/host/' + ipAddress ; } ,
111+ } ,
112+ } ;
113+ } ,
114+
115+ openCheckIP ( ipAddress , type ) {
116+ let detail = this . getIPCheckers ( ) [ type ] ;
117+
118+ if ( ! detail ) {
119+ console . error ( `Unknown type: ${ type } ` ) ;
120+ }
121+
122+ window . open ( detail . url ( ipAddress ) , '_blank' ) ;
123+ } ,
98124 }
99125}
Original file line number Diff line number Diff line change 2323 </template >
2424
2525 <template #more-actions =" { item }" >
26- <sw -context-menu-item
27- @click =" openAbuseIPDB(item.ipAddress)"
28- >
29- {{ $tc(' tinect-redirects.requests.openAbuseIPDB' ) }}
30- </sw -context-menu-item >
26+ <template v-for =" (checker, key) in getIPCheckers()" >
27+ <sw -context-menu-item
28+ @click =" openCheckIP(item.ipAddress, key)"
29+ >
30+ {{ $tc(' tinect-redirects.requests.openCheckIP.' + key ) }}
31+ </sw -context-menu-item >
32+ </template >
3133 </template >
3234 </sw -entity-listing >
35+
3336 <sw -empty-state
3437 v-else
3538 :absolute =" false"
Original file line number Diff line number Diff line change 4949 "requests" : {
5050 "title" : " Aufrufe | 1 Aufruf | {count} Aufrufe" ,
5151 "empty" : " Keine Aufrufe gefunden" ,
52- "openAbuseIPDB" : " Bei AbuseIPDB prüfen"
52+ "openCheckIP" : {
53+ "abuseipdb" : " Bei AbuseIPDB prüfen" ,
54+ "pulsedrive" : " Bei Pulsedrive prüfen" ,
55+ "whois" : " Whois-Abfrage" ,
56+ "shodan" : " Bei Shodan prüfen"
57+ }
5358 },
5459 "sidebar" : {
5560 "refresh" : " Neuladen" ,
Original file line number Diff line number Diff line change 4949 "requests" : {
5050 "title" : " Requests | 1 request | {count} requests" ,
5151 "empty" : " No requests found" ,
52- "openAbuseIPDB" : " Check on AbuseIPDB"
52+ "openCheckIP" : {
53+ "abuseipdb" : " Check on AbuseIPDB" ,
54+ "pulsedrive" : " Check on Pulsedrive" ,
55+ "whois" : " Whois lookup" ,
56+ "shodan" : " Check on Shodan"
57+ }
5358 },
5459 "sidebar" : {
5560 "refresh" : " Refresh" ,
You can’t perform that action at this time.
0 commit comments