Skip to content
Navigation Menu
Toggle navigation
Sign in
Product
GitHub Copilot
Write better code with AI
Security
Find and fix vulnerabilities
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Discussions
Collaborate outside of code
Code Search
Find more, search less
Explore
All features
Documentation
GitHub Skills
Blog
Solutions
By company size
Enterprises
Small and medium teams
Startups
By use case
DevSecOps
DevOps
CI/CD
View all use cases
By industry
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
Topics
AI
DevOps
Security
Software Development
View all
Explore
Learning Pathways
White papers, Ebooks, Webinars
Customer Stories
Partners
Executive Insights
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
Enterprise platform
AI-powered developer platform
Available add-ons
Advanced Security
Enterprise-grade security features
GitHub Copilot
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search or jump to...
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
Reseting focus
{{ message }}
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.
guillaC
/
JSBatchobfuscator
Public archive
Notifications
You must be signed in to change notification settings
Fork
23
Star
52
Code
Issues
1
Pull requests
Actions
Projects
Security
Insights
Additional navigation options
Files
master
README.md
index.html
obfu.js
Breadcrumbs
JSBatchobfuscator
/
obfu.js
Blame
Blame
Latest commit
guillaC
random alphabet
Aug 18, 2020
e09880e
·
Aug 18, 2020
History
History
22 lines (21 loc) · 858 Bytes
Breadcrumbs
JSBatchobfuscator
/
obfu.js
Top
File metadata and controls
Code
Blame
22 lines (21 loc) · 858 Bytes
Raw
function printCode() { var textarea = document.getElementById('Code'); var textareaobf = document.getElementById('ObfCode'); var set = "a" + Math.random().toString(36).substring(10); //random set var letters = Array.from("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ").sort(() => Math.random() - 0.5).join(''); var setlettre = "Set " + set + "=" + letters; var code = textarea.value; var codeobfu = ""; var lettertab = {}; for (var i = 0; i < letters.length; i++) { lettertab[letters[i]] = "%" + set + ":~" + i + ",1%"; } for (var i = 0; i < code.length; i++) { if (lettertab[code[i]]) { codeobfu += lettertab[code[i]]; } else { codeobfu += code[i]; } } textareaobf.value = '@echo off\n' + setlettre + '\ncls' + '\n' + codeobfu; }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function
printCode
(
)
{
var
textarea
=
document
.
getElementById
(
'Code'
)
;
var
textareaobf
=
document
.
getElementById
(
'ObfCode'
)
;
var
set
=
"a"
+
Math
.
random
(
)
.
toString
(
36
)
.
substring
(
10
)
;
//random set
var
letters
=
Array
.
from
(
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
)
.
sort
(
(
)
=>
Math
.
random
(
)
-
0.5
)
.
join
(
''
)
;
var
setlettre
=
"Set "
+
set
+
"="
+
letters
;
var
code
=
textarea
.
value
;
var
codeobfu
=
""
;
var
lettertab
=
{
}
;
for
(
var
i
=
0
;
i
<
letters
.
length
;
i
++
)
{
lettertab
[
letters
[
i
]
]
=
"%"
+
set
+
":~"
+
i
+
",1%"
;
}
for
(
var
i
=
0
;
i
<
code
.
length
;
i
++
)
{
if
(
lettertab
[
code
[
i
]
]
)
{
codeobfu
+=
lettertab
[
code
[
i
]
]
;
}
else
{
codeobfu
+=
code
[
i
]
;
}
}
textareaobf
.
value
=
'@echo off\n'
+
setlettre
+
'\ncls'
+
'\n'
+
codeobfu
;
}
While the code is focused, press Alt+F1 for a menu of operations.