Merge pull request #89 from rohitkumarankam/main

added filename prompt
This commit is contained in:
Ryan Montgomery 2022-05-20 10:51:04 -04:00 committed by GitHub
commit b7fae5b5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 10 deletions

View File

@ -11,15 +11,16 @@ https://revshells.com
### Features
- Generate common listeners and reverse shells
- Save button to download Payloads from browser.
- Raw mode to cURL shells to your machine.
- Button to increment the listening port number by 1
- URI and Base64 encoding
- LocalStorage to persist your configuration
- Dark and Light Modes
- Dark, Light and Meme Modes
### Screenshot
![image](https://user-images.githubusercontent.com/44453666/111888563-02430f80-89b4-11eb-9e17-ea3de014cf69.png)
![image](https://user-images.githubusercontent.com/70012972/169376352-e6d6b90e-2e2e-46b0-b6f9-0e3f13713e39.png)
## Dev

3
assets/axios.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@
<script src="assets/jquery-3.5.1.slim.min.js"></script>
<script src="assets/popper-1.16.1.min.js"></script>
<script src="assets/bootstrap-4.5.2.min.js"></script>
<script src="assets/axios.min.js"></script>
<link rel="stylesheet" href="css/dark-mode.css">
<link rel="stylesheet" href="css/light-mode.css">
<link rel="stylesheet" href="css/meme-mode.css">
@ -339,7 +340,7 @@
<div class="tab-pane" id="bind" role="tabpanel" aria-labelledby="bind-tab">
<div class="card shadow mb-5">
<div class="card-body">
<img src="assets/floppy-disk-solid.svg" class="download-svg float-right" data-toggle="tooltip" title="Download Shell Code">
<img src="assets/floppy-disk-solid.svg" class="download-svg float-right" data-toggle="tooltip" title="Download Payload">
<div class="card-text mt-4">
<div class="row">
<!-- Left column: Bind selection -->
@ -392,7 +393,7 @@
<div class="tab-pane" id="msfvenom" role="tabpanel" aria-labelledby="msfvenom-tab">
<div class="card shadow mb-5">
<div class="card-body">
<img src="assets/floppy-disk-solid.svg" class="download-svg float-right" data-toggle="tooltip" title="Download Shell Code">
<img src="assets/floppy-disk-solid.svg" class="download-svg float-right" data-toggle="tooltip" title="Download Payload">
<div class="card-text mt-4">
<div class="row">
<!-- Left column: MSFVenom selection -->

View File

@ -459,13 +459,23 @@ document.querySelector('#copy-msfvenom-command').addEventListener('click', () =>
var downloadButton = document.querySelectorAll(".download-svg");
for (const Dbutton of downloadButton) {
Dbutton.addEventListener("click", () => {
var element = document.createElement('a');
const filename = prompt('Enter a filename', 'payload.sh')
if(filename===null)return;
const rawLink = RawLink.generate(rsg);
element.setAttribute('href', rawLink);
element.setAttribute('download', rsg.getSelectedCommandName());
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
axios({
url: rawLink,
method: 'GET',
responseType: 'arraybuffer',
})
.then((response)=>{
const url = window.URL.createObjectURL(new File([response.data], filename ));
const downloadElement = document.createElement("a");
downloadElement.href = url;
downloadElement.setAttribute('download', filename);
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
});
});
}