Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cameron-dunn-sublime
Copy link
Contributor

@cameron-dunn-sublime cameron-dunn-sublime commented Apr 10, 2023

Describe the change
Supports extracting base 64 content from HTML div tags, as well as adds an "external flavor" of base64 to base64 extracted content.

Originally implemented in sublime-security#34. There are some differences because that was implemented before self.emit_file was available.

Describe testing procedures
I ran an example file via Oneshot and recorded the output. I ran this with ScanBase64 enabled (which isn't necessary for the core abilities, but makes the result a bit clearer).

Sample output
Sample Input
Sample output

You can see test string one - link and test string two - div in the output which shows the base64 content was extracted by ScanHTML and extracted by ScanBase64.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

# 'ScanBase64':
# - positive:
# flavors:
# - 'base64_file'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base64_file isn't referenced anywhere besides the configs. In the scanner I use the flavor of just base64 since it's not exactly a file. However I don't have a strong opinion and can change the flavor to base64_file if that's preferred.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review this scanner, appreciate the review here

@cameron-dunn-sublime cameron-dunn-sublime marked this pull request as ready for review April 10, 2023 22:14
@phutelmyer phutelmyer added the enhancement New feature or request label Apr 17, 2023
@phutelmyer
Copy link
Contributor

Tested + works. No issues here.
Thanks @cameron-dunn-sublime!

@phutelmyer
Copy link
Contributor

@cameron-dunn-sublime Seems theres a conflict in the backend.yml now. This may have been an issue with work I approved earlier today. Can you pull and review?

@cameron-dunn-sublime
Copy link
Contributor Author

@phutelmyer should be set now! The conflict was just against a change that removed a space in commented out lines.

@phutelmyer phutelmyer merged commit 418d668 into target:master Apr 18, 2023
@cameron-dunn-sublime cameron-dunn-sublime deleted the cd.target.b64-html branch April 18, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants