Skip to content

Commit

Permalink
Add a helper function for encoding payloads with atob
Browse files Browse the repository at this point in the history
  • Loading branch information
lebr0nli committed Sep 4, 2024
1 parent 75d9129 commit fb2db3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/MenuXss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
/>
</VList>
</VMenu>
<VListItem
title="atob() helper"
@click="applyFunction('Encode.AtobHelper.encode')"
/>
<VMenu location="end" open-on-hover>
<template #activator="{ props }">
<VListItem
Expand Down
4 changes: 4 additions & 0 deletions src/generators/encode.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ window.Encode.CharCode = {
},
}

window.Encode.AtobHelper = {
encode: value => `atob('${btoa(value)}')`,
}

window.Encode.Escape = {
hex: value => {
return [...value]
Expand Down

0 comments on commit fb2db3e

Please sign in to comment.