155 lines
5.9 KiB
HTML
155 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self' data:; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self' https://defcon.social https://bsky.app;">
|
|
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
|
<link rel="stylesheet" href="../assets/css/style.css">
|
|
<link rel="icon" type="image/x-icon" href="../favicon.ico">
|
|
<script>
|
|
// Apply theme immediately to prevent flash
|
|
(function() {
|
|
const theme = localStorage.getItem('theme') ||
|
|
(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
})();
|
|
</script>
|
|
<title>magic-wormhole Cheatsheet - Launch Pad</title>
|
|
</head>
|
|
<body>
|
|
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
|
|
<svg class="theme-icon theme-icon-moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
|
<svg class="theme-icon theme-icon-sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
|
</button>
|
|
<br/><br/>
|
|
<div class="name">
|
|
__ _______________________ _________._________________________
|
|
\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/
|
|
| __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_
|
|
| \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \
|
|
\___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ /
|
|
\/ \/ \/ \/ \/ \/ \/
|
|
</div>
|
|
<div class="blog-page-header">
|
|
<div class="blog-header-content">
|
|
<a href="/cheatsheets" class="back-link" title="Back to Cheatsheets">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" class="home-icon"><path fill="currentColor" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>
|
|
</a>
|
|
<h1 class="blog-page-title">magic-wormhole Cheatsheet</h1>
|
|
</div>
|
|
</div>
|
|
<div class="blog-post-container">
|
|
<div class="blog-posts-container" style="max-width: 900px; margin: 0 auto;">
|
|
<div class="blog-post">
|
|
<div class="blog-post-content">
|
|
<p><a href="index.html">← Back to cheatsheets</a></p>
|
|
<p><a href="../index.html">← Home</a></p>
|
|
<hr>
|
|
<p>magic-wormhole is a secure file transfer tool that uses a short passphrase to establish encrypted connections between two computers. No need to configure firewalls, port forwarding, or exchange keys manually.</p>
|
|
<hr>
|
|
<h2>Basic Usage</h2>
|
|
<ul>
|
|
<li>wormhole send file.txt - Send file (generates code)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole receive CODE - Receive file with code</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole send - Send from stdin</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole receive CODE - Receive to stdout</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Directory Transfer</h2>
|
|
<ul>
|
|
<li>wormhole send -d directory/ - Send directory</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole receive CODE - Receive directory</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole send -d . - Send current directory</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Text Transfer</h2>
|
|
<ul>
|
|
<li>echo "text" | wormhole send - Send text</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole receive CODE - Receive text</li>
|
|
</ul>
|
|
<ul>
|
|
<li>wormhole send --text "message" - Send text message</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Options</h2>
|
|
<ul>
|
|
<li>-d, --directory - Send directory instead of file</li>
|
|
</ul>
|
|
<ul>
|
|
<li>-t, --text - Send text message</li>
|
|
</ul>
|
|
<ul>
|
|
<li>-c, --code - Specify code (for receive)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>-o, --output - Output file/directory name</li>
|
|
</ul>
|
|
<ul>
|
|
<li>-v, --verbose - Verbose output</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--relay-url - Custom relay server URL</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Common Examples</h2>
|
|
<h3>Send File</h3>
|
|
<pre><code>wormhole send document.pdf</code></pre>
|
|
<p>Send file and get code to share.</p>
|
|
<h3>Receive File</h3>
|
|
<pre><code>wormhole receive 7-crossover-clockwork</code></pre>
|
|
<p>Receive file using code.</p>
|
|
<h3>Send Directory</h3>
|
|
<pre><code>wormhole send -d project/</code></pre>
|
|
<p>Send entire directory.</p>
|
|
<h3>Send Text</h3>
|
|
<pre><code>echo "secret message" | wormhole send</code></pre>
|
|
<p>Send text message.</p>
|
|
<h3>Receive to Specific Location</h3>
|
|
<pre><code>wormhole receive -o received.pdf CODE</code></pre>
|
|
<p>Receive file with custom name.</p>
|
|
<hr>
|
|
<h2>Tips</h2>
|
|
<ul>
|
|
<li>Codes are single-use and expire after a few minutes</li>
|
|
</ul>
|
|
<ul>
|
|
<li>No need to configure firewalls or port forwarding</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Uses PAKE (Password-Authenticated Key Exchange) for security</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Works through NAT and firewalls automatically</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Great for quick file transfers between machines</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Can send text, files, or directories</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Relay server is only used for initial connection setup</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script async type="text/javascript" src="../blog/analytics.js"></script>
|
|
<script src="../theme.js"></script>
|
|
</body>
|
|
</html>
|
|
|