Skip to content

Commit 32833fc

Browse files
Merge pull request #1 from CrashCringle12/dev
Version 2.3 Bump
2 parents 7f5a064 + 0de74c9 commit 32833fc

13 files changed

Lines changed: 702 additions & 287 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ var defaultQueue = function () {
230230
if (config.onlyAlertOnLatest) {
231231
sendMessage = false
232232
}
233+
if (message) {
234+
chrome.runtime.sendMessage(message);
235+
}
233236
//console.log("Sending")
234-
chrome.runtime.sendMessage(message);
235237
} else {
236238
//console.log("Not sending");
237239
}
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Senti Buddy",
3-
"version": "2.1.1",
3+
"version": "2.3",
44
"description": "Browser Extension to enable Filtering & Desktop Notifications for Sentinel — Toggle with ALT+A . ALT+C to access config.",
55
"author": {
66
"email": "cringlebox@gmail.com"
@@ -36,6 +36,13 @@
3636
"mac": "Command+Shift+P"
3737
}
3838
},
39+
"search-hash": {
40+
"description": "Search Hash",
41+
"suggested_key": {
42+
"default": "Alt+H",
43+
"mac": "Command+Shift+H"
44+
}
45+
},
3946
"view-config": {
4047
"description": "Modify Configurations",
4148
"suggested_key": {
@@ -46,7 +53,7 @@
4653
},
4754
"content_scripts": [
4855
{
49-
"matches": ["https://portal.azure.com/*", "https://api.abuseipdb.com/*", "https://www.virustotal.com/*"],
56+
"matches": ["https://portal.azure.com/*", "https://api.abuseipdb.com/*", "https://www.virustotal.com/*", "https://api11.scamalytics.com/*"],
5057
"css": ["core.css"],
5158
"js": ["core.js"],
5259
"run_at": "document_end",
@@ -59,7 +66,7 @@
5966
"web_accessible_resources": [
6067
{
6168
"resources": ["_favicon/*", "options.html", "popup.html"],
62-
"matches": ["https://portal.azure.com/*","https://api.abuseipdb.com/*", "https://www.virustotal.com/*"],
69+
"matches": ["https://portal.azure.com/*","https://api.abuseipdb.com/*", "https://www.virustotal.com/*", "https://api11.scamalytics.com/*"],
6370
"extension_ids": ["*"]
6471
}
6572
],
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,20 @@ <h1>Extension Configuration</h1>
3737
</label>
3838
<br>
3939
<label>
40-
VT API Key (Unused):
40+
VT API Key:
4141
<input type="text" id="vtkey" />
4242
</label>
4343
<br>
44+
<label>
45+
Ip Info API Key:
46+
<input type="text" id="ipInfoKey" />
47+
</label>
48+
<br>
49+
<label>
50+
Scamalytics URL:
51+
<input type="text" id="scamalyticsURL" />
52+
</label>
53+
<br>
4454
<div id="status"></div>
4555
<button id="save">Save</button>
4656

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ const saveOptions = () => {
2222
const alertOnLatest = document.getElementById('alertOnLatest').checked;
2323
const desktopNotifications = document.getElementById('desktopNotifications').checked;
2424
const abuseipdbAPIkey = document.getElementById('abuseipdbAPIkey').value.trim();
25-
console.log(abuseipdbAPIkey)
25+
const ipInfoKey = document.getElementById('ipInfoKey').value.trim();
2626
const vtkey = document.getElementById('vtkey').value.trim();
27+
const scamalyticsURL = document.getElementById('scamalyticsURL').value.trim();
2728
chrome.storage.sync.set({
2829
doRemoveFromFilteredFromQueue: removeFromQueue,
2930
filterTitleRegexPatterns: titlePatterns,
3031
filterTagsRegexPatterns: tagPatterns,
3132
onlyAlertOnLatest: alertOnLatest,
3233
desktopNotifications: desktopNotifications,
3334
abuseipdbAPIkey: abuseipdbAPIkey,
34-
vtkey: vtkey
35+
vtkey: vtkey,
36+
ipInfoKey: ipInfoKey,
37+
scamalyticsURL: scamalyticsURL
3538
}, () => {
3639
const status = document.getElementById('status');
3740
status.textContent = 'Options saved.';
@@ -49,15 +52,20 @@ function restoreOptions() {
4952
onlyAlertOnLatest: false,
5053
desktopNotifications: true,
5154
abuseipdbAPIkey: '',
52-
vtkey: ''
55+
vtkey: '',
56+
ipInfoKey: '',
57+
scamalyticsURL: ''
5358
}, (items) => {
59+
5460
document.getElementById('removeFromQueue').checked = items.doRemoveFromFilteredFromQueue;
5561
document.getElementById('alertOnLatest').checked = items.onlyAlertOnLatest;
5662
document.getElementById('desktopNotifications').checked = items.desktopNotifications;
5763
items.filterTitleRegexPatterns.forEach(pattern => addPattern('titlePatterns', pattern));
5864
items.filterTagsRegexPatterns.forEach(pattern => addPattern('tagPatterns', pattern));
5965
document.getElementById('abuseipdbAPIkey').value = items.abuseipdbAPIkey;
6066
document.getElementById('vtkey').value = items.vtkey;
67+
document.getElementById('ipInfoKey').value = items.ipInfoKey;
68+
document.getElementById('scamalyticsURL').value = items.scamalyticsURL
6169
});
6270
}
6371

SentiBuddy/popup.css

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
body {
2+
max-width: 100%;
3+
/* Ensures body doesn't exceed the width of the viewport */
4+
min-width: 320px;
5+
/* Set the width you prefer */
6+
min-height: 420px;
7+
/* Set the height you prefer */
8+
font-family: Arial, sans-serif;
9+
padding: 10px;
10+
font-size: 14px;
11+
display: flex;
12+
flex-direction: column;
13+
align-items: center;
14+
justify-content: center;
15+
color: #333;
16+
background-color: #f4f4f4;
17+
}
18+
19+
h1,
20+
h2 {
21+
color: #333;
22+
margin-bottom: 10px;
23+
}
24+
25+
h1 {
26+
font-size: 18px;
27+
font-weight: bold;
28+
}
29+
30+
h2 {
31+
font-size: 16px;
32+
}
33+
34+
.key {
35+
font-weight: bold;
36+
/* Makes keys bold */
37+
color: #333;
38+
/* Adjust the color if needed */
39+
}
40+
41+
.key,
42+
.hash-value {
43+
display: inline-block;
44+
vertical-align: top;
45+
/* Keeps label and value aligned at the top */
46+
}
47+
48+
.content {
49+
margin-bottom: 10px;
50+
word-wrap: break-word;
51+
/* Allows long words to be broken and wrap onto the next line */
52+
overflow-wrap: break-word;
53+
/* Ensures overflow text is broken and wraps */
54+
overflow: hidden;
55+
/* Hide overflowed content */
56+
text-overflow: ellipsis;
57+
/* Show ellipsis when text overflows */
58+
white-space: nowrap;
59+
/* Keep the text in a single line */
60+
}
61+
62+
63+
#checkIp {
64+
padding: 10px 20px;
65+
border: none;
66+
background-color: #4CAF50;
67+
/* Green background */
68+
color: white;
69+
border-radius: 20px;
70+
/* Rounded corners */
71+
font-size: 16px;
72+
cursor: pointer;
73+
transition: background-color 0.3s, box-shadow 0.3s;
74+
/* Smooth transition for hover effects */
75+
}
76+
77+
#checkIp:hover {
78+
background-color: #45a049;
79+
/* Darker green on hover */
80+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
81+
/* Shadow effect on hover */
82+
}
83+
84+
#checkHash {
85+
padding: 10px 20px;
86+
border: none;
87+
background-color: #5ee0f4;
88+
/* Green background */
89+
color: white;
90+
border-radius: 20px;
91+
/* Rounded corners */
92+
font-size: 16px;
93+
cursor: pointer;
94+
transition: background-color 0.3s, box-shadow 0.3s;
95+
/* Smooth transition for hover effects */
96+
}
97+
98+
#checkHash:hover {
99+
background-color: #53c2d3;
100+
/* Darker green on hover */
101+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
102+
/* Shadow effect on hover */
103+
}
104+
105+
.score-red {
106+
color: #ff6347;
107+
/* Tomato red for high risk */
108+
}
109+
110+
.score-orange {
111+
color: #ffa500;
112+
/* Orange for medium risk */
113+
}
114+
115+
.score-yellow {
116+
color: #ffd700;
117+
/* Yellow for low risk */
118+
}
119+
120+
.score-green {
121+
color: #008000;
122+
/* Green for no risk */
123+
}
124+
125+
.progress-container {
126+
width: 90%;
127+
background-color: #ddd;
128+
border-radius: 10px;
129+
margin: 10px 0;
130+
overflow: hidden;
131+
}
132+
133+
.progress-bar {
134+
height: 20px;
135+
border-radius: 10px;
136+
text-align: center;
137+
line-height: 20px;
138+
color: white;
139+
transition: width 0.4s ease;
140+
}
141+
142+
.progress-bar.score-red {
143+
background-color: #ff6347;
144+
/* Tomato red for high risk */
145+
}
146+
147+
.progress-bar.score-orange {
148+
background-color: #ffa500;
149+
/* Orange for medium risk */
150+
}
151+
152+
.progress-bar.score-yellow {
153+
background-color: #ffd700;
154+
/* Yellow for low risk */
155+
}
156+
157+
.progress-bar.score-green {
158+
background-color: #8ae48a;
159+
/* Green for no risk */
160+
}
161+
162+
.hash-value {
163+
max-width: calc(100% - 60px);
164+
/* Subtracting the label width and some padding */
165+
word-wrap: break-word;
166+
/* Allows the text to wrap within the container */
167+
font-size: 12px;
168+
/* Smaller font size for long hashes */
169+
}
170+
171+
ul {
172+
list-style-type: none;
173+
padding: 0;
174+
}
175+
176+
/* Container to align the content properly */
177+
#results {
178+
margin: 0 auto;
179+
max-width: 90%; /* Adjust the width as needed */
180+
padding: 20px;
181+
background-color: #f8f9fa;
182+
border-radius: 8px;
183+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
184+
}
185+
.circle-container {
186+
position: relative;
187+
width: 120px;
188+
height: 120px;
189+
display: flex;
190+
align-items: center;
191+
justify-content: center;
192+
}
193+
194+
.progress-circle {
195+
transition: stroke-dashoffset 0.6s ease;
196+
transform: rotate(-90deg);
197+
transform-origin: 50% 50%;
198+
}
199+
200+
.progress-text {
201+
font-weight: bold;
202+
}
203+
204+
.collapse {
205+
display: none;
206+
overflow: hidden;
207+
transition: all 0.3s ease;
208+
margin-left: 20px; /* Adds indentation to the expanded content */
209+
}
210+
.content, .collapse {
211+
word-wrap: break-word; /* Ensures long words do not overflow their container */
212+
white-space: normal; /* Ensures text respects line breaks and whitespace */
213+
overflow-wrap: break-word; /* Breaks long words at the end of the line */
214+
}
215+
216+
.visible {
217+
display: block;
218+
}
219+
220+
.toggle-button {
221+
background-color: #007BFF;
222+
color: white;
223+
border: none;
224+
padding: 8px 16px; /* Smaller padding for less obtrusive buttons */
225+
margin: 5px 0; /* Reduced margin */
226+
cursor: pointer;
227+
font-size: 14px; /* Smaller font size for buttons */
228+
border-radius: 4px; /* Rounded corners for a modern look */
229+
}
230+
231+
.toggle-button:hover {
232+
background-color: #0056b3;
233+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
</head>
88
<body>
99
<button id="checkIp">Check IP in Clipboard</button>
10+
<br>
11+
<button id="checkHash">Check Hash in Clipboard</button>
1012
<div id="results"></div>
1113
<script src="popup.js"></script>
1214
</body>

0 commit comments

Comments
 (0)