Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>The Way Back Back</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: 'Courier New', Courier, monospace;
- background-color: #111;
- color: #00FF00; /* Neon green for hacker aesthetic */
- text-align: center;
- overflow: hidden;
- height: 100vh;
- }
- header {
- background-color: #333;
- color: #00FF00;
- padding: 30px;
- border-bottom: 3px solid #00FF00;
- box-shadow: 0 0 20px 2px #00FF00;
- }
- h1 {
- font-size: 3rem;
- letter-spacing: 5px;
- text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00, 0 0 30px #00FF00;
- }
- p {
- font-size: 1.2rem;
- margin-top: 20px;
- }
- main {
- padding: 40px 20px;
- position: relative;
- }
- .input-section {
- margin-bottom: 20px;
- }
- #url-input {
- width: 70%;
- padding: 15px;
- background-color: #000;
- border: 2px solid #00FF00;
- color: #00FF00;
- font-size: 1.5rem;
- border-radius: 10px;
- margin-bottom: 20px;
- text-shadow: 0 0 10px #00FF00;
- }
- #archive-btn {
- padding: 12px 25px;
- background-color: #00FF00;
- color: #111;
- border: 2px solid #00FF00;
- border-radius: 10px;
- font-size: 1.2rem;
- cursor: pointer;
- text-transform: uppercase;
- letter-spacing: 2px;
- box-shadow: 0 0 10px #00FF00;
- transition: all 0.3s;
- }
- #archive-btn:hover {
- background-color: #00D700;
- box-shadow: 0 0 20px #00FF00;
- transform: scale(1.05);
- }
- .archive-results {
- margin-top: 20px;
- display: flex;
- justify-content: space-around;
- flex-wrap: wrap;
- }
- .result {
- width: 45%;
- margin-bottom: 20px;
- padding: 10px;
- border: 2px solid #00FF00;
- border-radius: 10px;
- box-shadow: 0 0 15px 2px #00FF00;
- }
- iframe {
- border: none;
- box-shadow: 0 0 10px #00FF00;
- border-radius: 5px;
- }
- footer {
- background-color: #333;
- color: #00FF00;
- text-align: center;
- padding: 10px;
- position: absolute;
- bottom: 0;
- width: 100%;
- font-size: 1.2rem;
- letter-spacing: 2px;
- }
- footer p {
- font-size: 1rem;
- }
- .glitch {
- animation: glitch 1s infinite;
- }
- @keyframes glitch {
- 0% {
- text-shadow: 2px 2px 10px #00FF00, -2px -2px 5px #00FF00;
- }
- 50% {
- text-shadow: -2px -2px 10px #00FF00, 2px 2px 5px #00FF00;
- }
- 100% {
- text-shadow: 2px 2px 10px #00FF00, -2px -2px 5px #00FF00;
- }
- }
- </style>
- </head>
- <body>
- <header>
- <h1 class="glitch">The Way Back Back</h1>
- <p>Hack the web archives and discover the past. Enter a URL, explore its history, and dig deep.</p>
- </header>
- <main>
- <section class="input-section">
- <input type="url" id="url-input" placeholder="Enter a URL to explore..." />
- <button id="archive-btn">Explore Archives</button>
- </section>
- <section class="archive-results">
- <div class="result">
- <h2>Wayback Machine</h2>
- <iframe id="wayback-frame" src="" width="100%" height="400px"></iframe>
- </div>
- <div class="result">
- <h2>Internet Archive</h2>
- <iframe id="internet-archive-frame" src="" width="100%" height="400px"></iframe>
- </div>
- </section>
- </main>
- <footer>
- <p>© 2024 The Way Back Back. Hacking the archives, one snapshot at a time.</p>
- </footer>
- <script>
- document.getElementById('archive-btn').addEventListener('click', function() {
- const url = document.getElementById('url-input').value.trim();
- if (url) {
- const waybackUrl = `/archive/wayback?url=${encodeURIComponent(url)}`;
- const internetArchiveUrl = `/archive/internet?url=${encodeURIComponent(url)}`;
- document.getElementById('wayback-frame').src = waybackUrl;
- document.getElementById('internet-archive-frame').src = internetArchiveUrl;
- } else {
- alert('Please enter a valid URL');
- }
- });
- </script>
- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
- </body>
- </html>
- <!-- Backend Node.js Code -->
- <script>
- const express = require('express');
- const axios = require('axios');
- const app = express();
- const port = 3000;
- // Serve static files (HTML, CSS, JS)
- app.use(express.static('public'));
- // Endpoint to fetch the Wayback Machine archive
- app.get('/archive/wayback', async (req, res) => {
- const url = req.query.url;
- try {
- const response = await axios.get(`https://archive.org/wayback/available?url=${url}`);
- const archivedUrl = response.data?.archived_snapshots?.closest?.url;
- if (archivedUrl) {
- res.json({ success: true, url: archivedUrl });
- } else {
- res.json({ success: false, message: "No archived version found." });
- }
- } catch (error) {
- res.json({ success: false, message: "Error fetching Wayback Machine archive." });
- }
- });
- // Endpoint to fetch the Internet Archive
- app.get('/archive/internet', async (req, res) => {
- const url = req.query.url;
- try {
- const response = await axios.get(`https://archive.org/wayback/available?url=${url}`);
- const archivedUrl = response.data?.archived_snapshots?.closest?.url;
- if (archivedUrl) {
- res.json({ success: true, url: archivedUrl });
- } else {
- res.json({ success: false, message: "No archived version found." });
- }
- } catch (error) {
- res.json({ success: false, message: "Error fetching Internet Archive." });
- }
- });
- // Start the server
- app.listen(port, () => {
- console.log(`Server running on http://localhost:${port}`);
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement