Skip to content

Conversation

@kingx48
Copy link

@kingx48 kingx48 commented May 25, 2025

Adds functionality to modes/javascript-analysis.sh to scan JavaScript files for custom patterns defined by you.

Key features:

  • You can provide a list of regex patterns in /usr/share/sniper/conf/interesting_js_patterns.txt.
  • The script iterates through downloaded JavaScript files and searches for matches using the provided patterns.
  • Findings are saved to $LOOT_DIR/web/javascript-$TARGET-custom_findings.txt.
  • If the pattern file is not found, the step is skipped with a notification.
  • Output file is created only if matches are found, and includes a descriptive header.

This allows you to extend JavaScript analysis with your own specific keywords and regular expressions for finding sensitive information or other items of interest.

Adds functionality to `modes/javascript-analysis.sh` to scan JavaScript files for custom patterns defined by you.

Key features:
- You can provide a list of regex patterns in `/usr/share/sniper/conf/interesting_js_patterns.txt`.
- The script iterates through downloaded JavaScript files and searches for matches using the provided patterns.
- Findings are saved to `$LOOT_DIR/web/javascript-$TARGET-custom_findings.txt`.
- If the pattern file is not found, the step is skipped with a notification.
- Output file is created only if matches are found, and includes a descriptive header.

This allows you to extend JavaScript analysis with your own specific keywords and regular expressions for finding sensitive information or other items of interest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant