mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-09 07:28:43 +00:00
update
This commit is contained in:
115
src/README.md
Normal file
115
src/README.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# HTML/CSS/JS Obfuscation Script
|
||||
|
||||
This repository contains a simple Bash script to obfuscate and minify a single HTML file that contains embedded CSS and JavaScript. The script takes an `index-master.html` file as input and produces an `index.html` file as output.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Debian/Ubuntu**: This script is designed to work on Debian-based systems.
|
||||
- **Node.js**: Terser and html-minifier-terser require Node.js to be installed.
|
||||
|
||||
### Install Node.js and npm on Debian
|
||||
|
||||
1. **Update your package list:**
|
||||
```bash
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
2. **Install Node.js and npm:**
|
||||
```bash
|
||||
sudo apt install nodejs npm -y
|
||||
```
|
||||
|
||||
3. **Verify the installation:**
|
||||
```bash
|
||||
node -v
|
||||
npm -v
|
||||
```
|
||||
|
||||
### Install Required Tools
|
||||
|
||||
1. **Install Terser:**
|
||||
```bash
|
||||
npm install -g terser
|
||||
```
|
||||
|
||||
2. **Install html-minifier-terser:**
|
||||
```bash
|
||||
npm install -g html-minifier-terser
|
||||
```
|
||||
|
||||
## Script Usage
|
||||
|
||||
### Running the Script
|
||||
|
||||
1. **Save the script** as `obfuscate.sh`.
|
||||
2. **Make the script executable:**
|
||||
```bash
|
||||
chmod +x obfuscate.sh
|
||||
```
|
||||
3. **Run the script:**
|
||||
```bash
|
||||
./obfuscate.sh
|
||||
```
|
||||
|
||||
### Script Details
|
||||
|
||||
- **Input File:** The script takes `index-master.html` as the input file.
|
||||
- **Output File:** The script outputs the obfuscated and minified version as `index.html`.
|
||||
- **Error Handling:** The script checks if `index-master.html` exists before proceeding. If the file does not exist, it will exit with an error message.
|
||||
- **Terser and HTML-Minifier-Terser:** The script first uses Terser to obfuscate any embedded JavaScript, then minifies the entire HTML file, including embedded CSS and JavaScript.
|
||||
|
||||
### Script Example
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
# Input and output file names
|
||||
input_file="index-master.html"
|
||||
output_file="index.html"
|
||||
|
||||
# Check if the input file exists
|
||||
if [ ! -f "$input_file" ]; then
|
||||
echo "Input file $input_file does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Obfuscate embedded JavaScript using terser
|
||||
terser_output=$(mktemp)
|
||||
terser --compress --mangle -- "$input_file" > "$terser_output"
|
||||
|
||||
# Minify HTML, including the embedded CSS and the obfuscated JavaScript
|
||||
html-minifier-terser \
|
||||
--collapse-whitespace \
|
||||
--minify-css true \
|
||||
--minify-js true \
|
||||
--remove-comments \
|
||||
--remove-empty-attributes \
|
||||
--output "$output_file" \
|
||||
"$terser_output"
|
||||
|
||||
# Clean up temporary file
|
||||
rm "$terser_output"
|
||||
|
||||
echo "Obfuscation and minification complete. Output saved as $output_file."
|
||||
```
|
||||
|
||||
## Editing the Script in Visual Studio Code (VSCode)
|
||||
|
||||
If you prefer to use Visual Studio Code to edit and run this script:
|
||||
|
||||
1. **Install VSCode:**
|
||||
- Follow the official [Visual Studio Code installation guide](https://code.visualstudio.com/docs/setup/linux) for Debian-based systems.
|
||||
|
||||
2. **Open your project in VSCode:**
|
||||
```bash
|
||||
code /path/to/your/project
|
||||
```
|
||||
|
||||
3. **Edit the script** by clicking on the `obfuscate.sh` file in the file explorer.
|
||||
|
||||
4. **Run the script** within the VSCode terminal:
|
||||
- Open the terminal in VSCode: `View > Terminal`.
|
||||
- Run the script:
|
||||
```bash
|
||||
./obfuscate.sh
|
||||
```
|
12
src/config.json
Normal file
12
src/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Vox Vera Printable Flyers",
|
||||
"subdomain": "voxvera",
|
||||
"title": "TOP SECRET",
|
||||
"subtitle": "DO <span class=\"redacted\">NOT</span> DISTRIBUTE",
|
||||
"headline": "OPERATION VOX VERA",
|
||||
"content": "Break free from censorship with our anonymous guerrilla marketing and message-spreading service. Whether online or in the physical world, we empower you to spread your ideas boldly, shielded by complete anonymity. Design a flyer, upload it to our secure platform, and let our network amplify your message.\n\nUse memetic power to share your ideas in your school, workplace, online communities, or even globally. Our service ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.\n\nYour privacy is our top priority. Flyers are shared via the Tor network and Nostr, protecting them from censorship. For payment, we use Bitcoin eCash (Cashu), offering secure and untraceable payments.\n\nJoin us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.",
|
||||
"url_message": "Follow this link to learn more. Use Tor Browser.",
|
||||
"url": "http://voxvera.6dshf2gnj7yzxlfcaczlyi57up4mvbtd5orinuj5bjsfycnhz2w456yd.onion",
|
||||
"tear_off_link": "http://voxvera.6dshf2gnj7yzxlfcaczlyi57up4mvbtd5orinuj5bjsfycnhz2w456yd.onion",
|
||||
"binary_message": "0110010 0101011 0110010 0111101 0110100"
|
||||
}
|
BIN
src/example.pdf
Normal file
BIN
src/example.pdf
Normal file
Binary file not shown.
474
src/index-master.html
Normal file
474
src/index-master.html
Normal file
@@ -0,0 +1,474 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title id="site-title">Vox Vera Printable Flyers</title> <!-- Title will be replaced -->
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #b80000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 11in;
|
||||
width: 8.5in;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.print-button-container {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.print-button {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.print-button:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.left-tear-offs {
|
||||
width: 3.75in;
|
||||
padding: 8px;
|
||||
border-right: 1px dashed #000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
gap: 5px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tear-off {
|
||||
display: flex;
|
||||
padding: 5px;
|
||||
border: 1px dashed #000;
|
||||
font-size: 10px;
|
||||
box-sizing: border-box;
|
||||
page-break-inside: avoid;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.tear-off-text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.tear-off a {
|
||||
color: #b80000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tear-off a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 0px solid #000;
|
||||
margin-left: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.qr-code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: calc(8.5in - 3.75in);
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
page-break-inside: avoid;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
font-size: 24px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.distribute {
|
||||
font-size: 18px;
|
||||
letter-spacing: 6px;
|
||||
}
|
||||
|
||||
.redacted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.message {
|
||||
flex: 1;
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
overflow-wrap: break-word;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
white-space: pre-wrap;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.text-container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.qr-code-body {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.qr-code-body img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
object-fit: contain;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.qr-code-url {
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
hyphens: auto;
|
||||
flex-grow: 1;
|
||||
margin-right: 10px;
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #000;
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 10px;
|
||||
overflow-wrap: break-word;
|
||||
text-align: center;
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid #000;
|
||||
}
|
||||
|
||||
.footer p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer .binary {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body, html {
|
||||
width: 8.5in;
|
||||
height: 11in;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
page-break-inside: avoid;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 8.5in;
|
||||
height: 11in;
|
||||
}
|
||||
|
||||
.print-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.print-button {
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.print-button:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="left-tear-offs">
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tear-off">
|
||||
<div class="tear-off-text">
|
||||
Use Tor Browser<br><br>
|
||||
to help spread this message go to<br>
|
||||
<a class="tear-off-link" href="#">Loading...</a><br> <!-- The class is used instead of an id -->
|
||||
click the button below to print
|
||||
</div>
|
||||
<div class="qr-code">
|
||||
<img src="qrcode-tear-offs.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Repeat similar structure for other tear-offs -->
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1 id="top-secret-title">Loading...</h1> <!-- "Top Secret" title will be replaced -->
|
||||
<div class="distribute" id="do-not-distribute">Loading...</div> <!-- "DO NOT DISTRIBUTE" message will be replaced -->
|
||||
<h1 id="operation-title-2"><br>Loading...</h1> <!-- "Operation Vox Vera" title will be replaced -->
|
||||
<hr>
|
||||
<div class="message">
|
||||
<div class="text-container" id="main-content" contenteditable="false"> <!-- Content will be replaced -->
|
||||
Loading content...
|
||||
</div>
|
||||
<div class="qr-code-body">
|
||||
<div class="qr-code-url">
|
||||
<span class="url-message">Loading message...</span><br><br> <!-- The message will be replaced -->
|
||||
<a id="qr-link-2" href="#">Loading...</a> <!-- The href and text will be replaced -->
|
||||
</div>
|
||||
<img src="qrcode-content.png" alt="QR Code">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="footer">
|
||||
<p>
|
||||
spread your true voice just like this by filling out <a href="submission_form.pdf">this form</a><br>
|
||||
and submitting it to <a href="nostr.html">this Nostr Address</a>. We use <a href="https://nostr.how/en/what-is-nostr">Nostr</a>, <a href="https://www.torproject.org/download/">Tor Browser</a>, and <a href="https://wallet.cashu.me/">Cashu eCash</a> to protect your identity.<br>
|
||||
Your flyer will be hosted on <a href="https://en.wikipedia.org/wiki/Tor_(network)">The Tor Network</a>.<br>
|
||||
</p>
|
||||
<p class="binary" id="binary-message"><br>
|
||||
<br>Loading...<br> <!-- Binary message will be replaced -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="print-button" onclick="window.print()">Print this page</button>
|
||||
|
||||
<script>
|
||||
// Fetch the configuration JSON file
|
||||
fetch('config.json')
|
||||
.then(response => response.json())
|
||||
.then(config => {
|
||||
// Update the site title
|
||||
document.getElementById('site-title').innerText = config.name;
|
||||
|
||||
// Update the "Top Secret" title
|
||||
document.getElementById('top-secret-title').innerText = config.title;
|
||||
|
||||
// Update the "DO NOT DISTRIBUTE" message
|
||||
document.getElementById('do-not-distribute').innerHTML = config.subtitle;
|
||||
|
||||
// Update the operation titles
|
||||
document.getElementById('operation-title-2').innerText = config.headline;
|
||||
|
||||
// Update the main content
|
||||
document.getElementById('main-content').innerText = config.content;
|
||||
|
||||
// Update the URL message
|
||||
document.querySelectorAll('.url-message').forEach(msg => {
|
||||
msg.innerText = config.url_message;
|
||||
});
|
||||
|
||||
// Update the QR URL link in the main content
|
||||
document.getElementById('qr-link-2').innerText = config.url;
|
||||
document.getElementById('qr-link-2').href = config.url;
|
||||
document.getElementById('qr-link-2').target = "_blank"; // Opens in a new tab
|
||||
|
||||
// Update all tear-off links
|
||||
document.querySelectorAll('.tear-off-link').forEach(link => {
|
||||
link.innerText = config.tear_off_link;
|
||||
link.href = config.tear_off_link;
|
||||
link.target = "_blank"; // Opens in a new tab
|
||||
});
|
||||
|
||||
// Update the binary message
|
||||
document.getElementById('binary-message').innerText = config.binary_message;
|
||||
})
|
||||
.catch(error => console.error('Error loading config:', error));
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
1
src/index.html
Normal file
1
src/index.html
Normal file
File diff suppressed because one or more lines are too long
96
src/nostr-master.html
Normal file
96
src/nostr-master.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Connect with Me on KeyChat</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
.container {
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
border: 1px solid #000000;
|
||||
text-align: center;
|
||||
max-width: 400px;
|
||||
width: 90%;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
}
|
||||
.code-box {
|
||||
background-color: white;
|
||||
border: 1px solid #000000;
|
||||
padding: 10px;
|
||||
margin: 20px 0;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
.copy-btn {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #000000;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
.copy-btn:hover {
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
footer {
|
||||
margin-top: 20px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
a {
|
||||
color: #a30000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Nostr</h1>
|
||||
<p>Use a secure file shareing tool like <a href="https://onionshare.org/" target="_blank">Onion Share</a> or <a href="https://wormhole.app/" target="_blank">WormHole</a> to send your completed <a href="submission_form.pdf" target="_blank">submission form PDF</a> to the following <a href="https://www.0xchat.com/#/" target="_blank">Nostr</a> npub account:</p>
|
||||
<p></p><a href="index.html">Back to Home</a></p>
|
||||
<div class="code-box" id="keyChatCode">npub1ln8efl52vsyh6lg59c9v3kut56wev489lzcma0sv2mf8nm6jhwjqeteygt</div>
|
||||
<button class="copy-btn" onclick="copyCode()">Copy Code</button>
|
||||
</div>
|
||||
<footer>
|
||||
<p>Not on Nostr yet? <a href="https://nostr.how/en/what-is-nostr" target="_blank">Learn more here</a>.</p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
function copyCode() {
|
||||
var copyText = document.getElementById("keyChatCode").innerText;
|
||||
navigator.clipboard.writeText(copyText).then(function() {
|
||||
alert("Code copied to clipboard!");
|
||||
}, function(err) {
|
||||
alert("Failed to copy code: ", err);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1
src/nostr.html
Normal file
1
src/nostr.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Connect with Me on KeyChat</title><style>body{font-family:'Courier New',Courier,monospace;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;margin:0;background-color:#fff}.container{background-color:#fff;padding:20px;border:1px solid #000;text-align:center;max-width:400px;width:90%;box-shadow:0 0 10px rgba(0,0,0,.1)}h1{color:#333}p{font-size:16px;color:#666}.code-box{background-color:#fff;border:1px solid #000;padding:10px;margin:20px 0;font-size:18px;color:#333;word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;cursor:pointer;user-select:none}.copy-btn{background-color:#000;color:#fff;padding:10px 20px;border:1px solid #000;cursor:pointer;font-size:16px;transition:background-color .3s ease}.copy-btn:hover{background-color:#3d3d3d}footer{margin-top:20px;font-size:14px;color:#999}a{color:#a30000;text-decoration:none}a:hover{text-decoration:underline}</style></head><body><div class="container"><h1>Nostr</h1><p>Use a secure file shareing tool like <a href="https://onionshare.org/" target="_blank">Onion Share</a> or <a href="https://wormhole.app/" target="_blank">WormHole</a> to send your completed <a href="submission_form.pdf" target="_blank">submission form PDF</a> to the following <a href="https://www.0xchat.com/#/" target="_blank">Nostr</a> npub account:</p><p></p><a href="index.html">Back to Home</a><p></p><div class="code-box" id="keyChatCode">npub1ln8efl52vsyh6lg59c9v3kut56wev489lzcma0sv2mf8nm6jhwjqeteygt</div><button class="copy-btn" onclick="copyCode()">Copy Code</button></div><footer><p>Not on Nostr yet? <a href="https://nostr.how/en/what-is-nostr" target="_blank">Learn more here</a>.</p></footer><script>function a0_0x1920(_0x52745a,_0x4af811){var _0x25cf2c=a0_0x25cf();return a0_0x1920=function(_0x192065,_0x4583ce){_0x192065=_0x192065-0xf9;var _0xf328c6=_0x25cf2c[_0x192065];return _0xf328c6;},a0_0x1920(_0x52745a,_0x4af811);}(function(_0x9ef2ad,_0x5bfd0c){var _0x3f1a49=a0_0x1920,_0x2fc986=_0x9ef2ad();while(!![]){try{var _0x22ee02=-parseInt(_0x3f1a49(0xfc))/0x1+parseInt(_0x3f1a49(0x106))/0x2+parseInt(_0x3f1a49(0xfd))/0x3*(parseInt(_0x3f1a49(0x108))/0x4)+-parseInt(_0x3f1a49(0xff))/0x5*(-parseInt(_0x3f1a49(0xfe))/0x6)+parseInt(_0x3f1a49(0x103))/0x7+-parseInt(_0x3f1a49(0x101))/0x8*(parseInt(_0x3f1a49(0xfb))/0x9)+-parseInt(_0x3f1a49(0x105))/0xa;if(_0x22ee02===_0x5bfd0c)break;else _0x2fc986['push'](_0x2fc986['shift']());}catch(_0x8d3923){_0x2fc986['push'](_0x2fc986['shift']());}}}(a0_0x25cf,0x61722));function copyCode(){var _0x4fbe1d=a0_0x1920,_0xde96a6=document[_0x4fbe1d(0x100)](_0x4fbe1d(0x109))[_0x4fbe1d(0x104)];navigator[_0x4fbe1d(0xf9)]['writeText'](_0xde96a6)[_0x4fbe1d(0x102)](function(){var _0x1a25af=_0x4fbe1d;alert(_0x1a25af(0x107));},function(_0x4a9824){var _0x9af094=_0x4fbe1d;alert(_0x9af094(0xfa),_0x4a9824);});}function a0_0x25cf(){var _0x2d06b3=['9673590gyjXCP','1213754yLmSVy','Code\x20copied\x20to\x20clipboard!','4BFZKZR','keyChatCode','clipboard','Failed\x20to\x20copy\x20code:\x20','9fYuthP','292516CzOxGo','1470939nEVEVz','5514KLQQlt','2335XoNked','getElementById','800872XwNVeo','then','1629313aCRijg','innerText'];a0_0x25cf=function(){return _0x2d06b3;};return a0_0x25cf();}</script></body></html>
|
43
src/obfuscate_index.sh
Executable file
43
src/obfuscate_index.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Input and output file names
|
||||
input_file="index-master.html"
|
||||
output_file="index.html"
|
||||
temp_js_file=$(mktemp --suffix=.js) # Temporary .js file for extracting JavaScript
|
||||
temp_js_obfuscated_file=$(mktemp --suffix=.js) # Temporary file for obfuscated JavaScript
|
||||
temp_html_file=$(mktemp) # Temporary file for processing HTML without JS
|
||||
|
||||
# Check if the input file exists
|
||||
if [ ! -f "$input_file" ]; then
|
||||
echo "Input file $input_file does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract embedded JavaScript into a temporary .js file
|
||||
awk '/<script>/,/<\/script>/' "$input_file" | sed '1d;$d' > "$temp_js_file"
|
||||
|
||||
# Obfuscate the extracted JavaScript
|
||||
javascript-obfuscator "$temp_js_file" --output "$temp_js_obfuscated_file"
|
||||
|
||||
# Read the obfuscated JavaScript into a variable
|
||||
obfuscated_js=$(cat "$temp_js_obfuscated_file")
|
||||
|
||||
# Escape slashes in the obfuscated JavaScript
|
||||
escaped_js=$(echo "$obfuscated_js" | sed 's/[\/&]/\\&/g')
|
||||
|
||||
# Replace the original JavaScript in the HTML with the obfuscated version
|
||||
sed -e "/<script>/,/<\/script>/c\<script>$escaped_js<\/script>" "$input_file" > "$temp_html_file"
|
||||
|
||||
# Minify HTML, including the obfuscated embedded JavaScript and CSS
|
||||
html-minifier-terser \
|
||||
--collapse-whitespace \
|
||||
--minify-css true \
|
||||
--remove-comments \
|
||||
--remove-empty-attributes \
|
||||
--output "$output_file" \
|
||||
"$temp_html_file"
|
||||
|
||||
# Clean up temporary files
|
||||
rm "$temp_js_file" "$temp_js_obfuscated_file" "$temp_html_file"
|
||||
|
||||
echo "Obfuscation and minification complete. Output saved as $output_file."
|
43
src/obfuscate_nostr.sh
Executable file
43
src/obfuscate_nostr.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Input and output file names
|
||||
input_file="nostr-master.html"
|
||||
output_file="nostr.html"
|
||||
temp_js_file=$(mktemp --suffix=.js) # Temporary .js file for extracting JavaScript
|
||||
temp_js_obfuscated_file=$(mktemp --suffix=.js) # Temporary file for obfuscated JavaScript
|
||||
temp_html_file=$(mktemp) # Temporary file for processing HTML without JS
|
||||
|
||||
# Check if the input file exists
|
||||
if [ ! -f "$input_file" ]; then
|
||||
echo "Input file $input_file does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract embedded JavaScript into a temporary .js file
|
||||
awk '/<script>/,/<\/script>/' "$input_file" | sed '1d;$d' > "$temp_js_file"
|
||||
|
||||
# Obfuscate the extracted JavaScript
|
||||
javascript-obfuscator "$temp_js_file" --output "$temp_js_obfuscated_file"
|
||||
|
||||
# Read the obfuscated JavaScript into a variable
|
||||
obfuscated_js=$(cat "$temp_js_obfuscated_file")
|
||||
|
||||
# Escape slashes in the obfuscated JavaScript
|
||||
escaped_js=$(echo "$obfuscated_js" | sed 's/[\/&]/\\&/g')
|
||||
|
||||
# Replace the original JavaScript in the HTML with the obfuscated version
|
||||
sed -e "/<script>/,/<\/script>/c\<script>$escaped_js<\/script>" "$input_file" > "$temp_html_file"
|
||||
|
||||
# Minify HTML, including the obfuscated embedded JavaScript and CSS
|
||||
html-minifier-terser \
|
||||
--collapse-whitespace \
|
||||
--minify-css true \
|
||||
--remove-comments \
|
||||
--remove-empty-attributes \
|
||||
--output "$output_file" \
|
||||
"$temp_html_file"
|
||||
|
||||
# Clean up temporary files
|
||||
rm "$temp_js_file" "$temp_js_obfuscated_file" "$temp_html_file"
|
||||
|
||||
echo "Obfuscation and minification complete. Output saved as $output_file."
|
BIN
src/qrcode-content.png
Normal file
BIN
src/qrcode-content.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
BIN
src/qrcode-tear-offs.png
Normal file
BIN
src/qrcode-tear-offs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
BIN
src/submission_form.docx
Normal file
BIN
src/submission_form.docx
Normal file
Binary file not shown.
BIN
src/submission_form.oform
Normal file
BIN
src/submission_form.oform
Normal file
Binary file not shown.
BIN
src/submission_form.pdf
Normal file
BIN
src/submission_form.pdf
Normal file
Binary file not shown.
2
src/to-do.txt
Normal file
2
src/to-do.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
1. Make content field smaller max number.
|
||||
2. URL for content not getting pulled into the config.json correctly every time.
|
Reference in New Issue
Block a user