Skip to content

Commit

Permalink
Merge pull request #40 from vincenzocaputo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vincenzocaputo authored Mar 18, 2023
2 parents 57237b9 + a519226 commit e2345bd
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.14.0] - 2023-03
## [0.14.1] - 2023-03-18
### Added
- PolySwarm sandbox web resource

### Fixed
- Email regex does not accept upper case and special characters (%+-)

## [0.14.0] - 2023-03-12
### Added
- New popup main page reporting the number of indicators for each type found in the current visiting webpage
- Each button on the popup main page can be clicked to display indicators of the corresponding type
Expand Down
Binary file added assets/tools-icons/polyswarm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/popup.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "FoxyRecon",
"version": "0.14.0",
"version": "0.14.1",
"description": "A Firefox add-on for OSINT investigations",

"icons": {
Expand Down
3 changes: 2 additions & 1 deletion src/content_scripts/catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const regexes = {
'ip': new RegExp(/(?!0)((2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)(?:(\[\.\]|\.))){3}(2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)/,'g'),
'url': new RegExp(/(?:h(xx|XX|tt)p[s]?):\/\/((?:www(?:(\[\.\]|\.)))?[-a-zA-Z0-9@:%._\+~#=]{2,256}(?:(\[\.\]|\.))[a-z]{2,6})\b(?:[-a-zA-Z0-9@:%_\+.~#?&//=]*)/,'g'),
'hash': new RegExp(/([a-z0-9]{64})|([a-z0-9]{40})|([a-z0-9]{32})/,'g'),
'email': new RegExp(/[a-z0-9]+(\.[_a-z0-9]+)*(\[at\]|@)([a-z0-9-]+((?:(\[\.\]|\.))[a-z0-9-]+)*((?:(\[\.\]|\.))[a-z]{2,15}))/,'g'),
'email': new RegExp(/[a-zA-Z0-9]+((?:\[\.\]|\.)[_a-zA-Z0-9_%+-]+)*(\[at\]|@)([a-zA-Z0-9-]+((?:(\[\.\]|\.))[a-zA-Z0-9-]+)*((?:(\[\.\]|\.))[a-zA-Z]{2,15}))/,'g'),
'cve': new RegExp(/CVE-\d{4}-\d{4,7}/,'g')
}

Expand All @@ -14,6 +14,7 @@ function catchIndicators() {
let indicators = [];
for(indicatorType of ['domain', 'ip', 'url', 'hash', 'email', 'cve']) {
let matches = bodyContent.matchAll(regexes[indicatorType]);
console.log(matches);
let match = matches.next();
while(!match.done) {
let value = match.value[0];
Expand Down
11 changes: 11 additions & 0 deletions src/json/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,17 @@
"types": ["ip"],
"tags": ["rep", "screenshot"]
},
{
"name": "Polyswarm",
"url": {
"hash": "https://polyswarm.network/search/hash?limit=25&page=0&term=%s"
},
"desc": "Scan Files or URLs for threats",
"icon": "polyswarm.png",
"color": "#6D3AEC",
"types": ["hash"],
"tags": ["sandbox"]
},
{
"name": "Pulsedive",
"url": {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/indicatorparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class IndicatorParser {
this.ip = new RegExp(/^(?!0)(?!.*\.$)((2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)\.){3}(2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)$/);
this.def_ip = new RegExp(/^(?!0)(?!.*\.$)((2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)(?:(\[\.\]|\.))){3}(2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9][0-9]|\d)$/);
this.hash = new RegExp(/(^[a-z0-9]{32}$)|(^[a-z0-9]{40}$)|(^[a-z0-9]{64}$)/);
this.email = new RegExp(/^[a-z0-9]+(\.[_a-z0-9]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,15}))$/);
this.def_email = new RegExp(/^[a-z0-9]+((?:\[\.\])[_a-z0-9]+)*(\[at\]|@)([a-z0-9-]+((?:\[\.\]|\.)[a-z0-9-]+)*((?:\[\.\]|\.)[a-z]{2,15}))$/);
this.email = new RegExp(/^[a-zA-Z0-9][a-zA-Z0-9._%+-]*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,15}$/);
this.def_email = new RegExp(/^[a-zA-Z0-9]((?:\[\.\]\.)?[_a-zA-Z0-9_%+-]+)*(\[at\]|@)([a-zA-Z0-9-]+((?:\[\.\]|\.)[a-zA-Z0-9-]+)*((?:\[\.\]|\.)[a-z]{2,15}))$/);
this.internalip = new RegExp(/(^192\.168\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^172\.([1][6-9]|[2][0-9]|[3][0-1])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^10\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5]))|(^127\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)/);
//this.def_internalip = new RegExp(/(^192(?:\.|\[\.\])168(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^172(?:\.|\[\.\])([1][6-9]|[2][0-9]|[3][0-1])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^10(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5]))|(^127(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])(?:\.|\[\.\])([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)/);
this.cve = new RegExp(/^CVE-\d{4}-\d{4,7}$/);
Expand Down

0 comments on commit e2345bd

Please sign in to comment.