Monday, July 6, 2026

WorldCup 2026 Mundial Cristiano Ronaldo problemas família confusão interna seleção ( portugal intel)

 https://gauchazh.clicrbs.com.br/esportes/copa-do-mundo/noticia/2026/06/estreia-ruim-problemas-com-cristiano-ronaldo-e-casos-de-familia-entenda-a-crise-na-selecao-portuguesa-cmqqr23rx001m01jw0purlvl3.html





NATO hack json.object null wildcard decryptor ( after coding, join, jsonvaluefactory, jackson/gson adapters, schema validation and logging)

 


import javax.json.*;


public final class WildcardDecryptor {


    public JsonValue decrypt(String encrypted) {


        // 1. Empty or null → JSON null

        if (encrypted == null || encrypted.isEmpty()) {

            return JsonValue.NULL;

        }


        // 2. Try number

        try {

            long n = Long.parseLong(encrypted);

            return Json.createValue(n);

        } catch (NumberFormatException ignored) {}


        // 3. Try boolean

        if (encrypted.equalsIgnoreCase("true")) {

            return JsonValue.TRUE;

        }

        if (encrypted.equalsIgnoreCase("false")) {

            return JsonValue.FALSE;

        }


        // 4. Try JSON object

        if (encrypted.startsWith("{") && encrypted.endsWith("}")) {

            try (JsonReader reader = Json.createReader(new java.io.StringReader(encrypted))) {

                return reader.readObject();

            } catch (Exception ignored) {}

        }


        // 5. Try JSON array

        if (encrypted.startsWith("[") && encrypted.endsWith("]")) {

            try (JsonReader reader = Json.createReader(new java.io.StringReader(encrypted))) {

                return reader.readArray();

            } catch (Exception ignored) {}

        }


        // 6. Fallback: treat as string

        return Json.createValue(encrypted);

    }

}

public final class JsonValueFactory {


    public static JsonValue fromNullable(String value) {

        return (value == null) ? JsonValue.NULL : Json.createValue(value);

    }

}

WildcardDecryptor decryptor = new WildcardDecryptor();


JsonObjectBuilder builder = Json.createObjectBuilder();


builder.add("name", decryptor.decrypt("Alice"));

builder.add("age", decryptor.decrypt("42"));

builder.add("active", decryptor.decrypt("true"));

builder.add("meta", decryptor.decrypt("{\"role\":\"admin\"}"));

builder.add("empty", decryptor.decrypt(""));


JsonObject obj = builder.build();


System.out.println(obj);

{

  "name": "Alice",

  "age": 42,

  "active": true,

  "meta": { "role": "admin" },

  "empty": null

}






import javax.json.*;

import javax.crypto.Cipher;

import javax.crypto.spec.SecretKeySpec;

import java.security.PrivateKey;

import java.util.Optional;

import java.util.logging.Logger;


public final class WildcardDecryptor {


    private static final Logger LOG = Logger.getLogger(WildcardDecryptor.class.getName());


    private final SecretKeySpec aesKey;

    private final PrivateKey rsaKey;


    public WildcardDecryptor(SecretKeySpec aesKey, PrivateKey rsaKey) {

        this.aesKey = aesKey;

        this.rsaKey = rsaKey;

    }


    public Optional<JsonValue> decrypt(String encrypted) {

        try {

            if (encrypted == null || encrypted.isEmpty()) {

                return Optional.of(JsonValue.NULL);

            }


            String raw = tryDecrypt(encrypted);


            JsonValue value = detectType(raw);

            return Optional.of(value);


        } catch (Exception ex) {

            LOG.warning("Wildcard decrypt failed: " + ex.getMessage());

            return Optional.of(JsonValue.NULL);

        }

    }


    private String tryDecrypt(String encrypted) {

        // Try AES

        try {

            Cipher cipher = Cipher.getInstance("AES");

            cipher.init(Cipher.DECRYPT_MODE, aesKey);

            return new String(cipher.doFinal(encrypted.getBytes()));

        } catch (Exception ignored) {}


        // Try RSA

        try {

            Cipher cipher = Cipher.getInstance("RSA");

            cipher.init(Cipher.DECRYPT_MODE, rsaKey);

            return new String(cipher.doFinal(encrypted.getBytes()));

        } catch (Exception ignored) {}


        // Fallback: treat as plaintext

        return encrypted;

    }


    private JsonValue detectType(String raw) {


        // Number

        try {

            long n = Long.parseLong(raw);

            return Json.createValue(n);

        } catch (NumberFormatException ignored) {}


        // Boolean

        if (raw.equalsIgnoreCase("true")) return JsonValue.TRUE;

        if (raw.equalsIgnoreCase("false")) return JsonValue.FALSE;


        // JSON Object

        if (raw.startsWith("{") && raw.endsWith("}")) {

            try (JsonReader reader = Json.createReader(new java.io.StringReader(raw))) {

                return reader.readObject();

            } catch (Exception ignored) {}

        }


        // JSON Array

        if (raw.startsWith("[") && raw.endsWith("]")) {

            try (JsonReader reader = Json.createReader(new java.io.StringReader(raw))) {

                return reader.readArray();

            } catch (Exception ignored) {}

        }


        // String fallback

        return Json.createValue(raw);

    }

}

Sunday, July 5, 2026

NATO HACK server to server side authentication ( json.parse error solved html codes online tool)

 {

  "auth": "YOUR_SERVER_KEY",

  "payload": { ... }

}

function authenticate(req, res, next) {

  const key = req.body.auth;

  const SERVER_KEY = process.env.SERVER_KEY;


  if (!key) {

    return res.status(401).json({

      success: false,

      error: 'Missing auth field in JSON body'

    });

  }


  if (key !== SERVER_KEY) {

    return res.status(403).json({

      success: false,

      error: 'Invalid or unauthorized key'

    });

  }


  next();

}


const express = require('express');

const app = express();


app.use(express.json());


function authenticate(req, res, next) {

  const key = req.query.key; // secret in URL

  const SERVER_KEY = "MY_EDU_SECRET";


  if (!key) {

    return res.status(401).json({

      success: false,

      error: "Missing ?key= in URL"

    });

  }


  if (key !== SERVER_KEY) {

    return res.status(403).json({

      success: false,

      error: "Invalid key"

    });

  }


  next();

}


app.post('/api/data', authenticate, (req, res) => {

  res.json({

    success: true,

    message: "Authenticated via URL key",

    data: req.body

  });

});


app.listen(3000, () => console.log("Server running"));


POST /api/data?key=MY_EDU_SECRET


const express = require('express');

const app = express();


app.use(express.json());


function authenticate(req, res, next) {

  const key = req.body.auth; // secret in JSON body

  const SERVER_KEY = "MY_EDU_SECRET";


  if (!key) {

    return res.status(401).json({

      success: false,

      error: "Missing auth field in JSON body"

    });

  }


  if (key !== SERVER_KEY) {

    return res.status(403).json({

      success: false,

      error: "Invalid auth key"

    });

  }


  next();

}


app.post('/api/data', authenticate, (req, res) => {

  res.json({

    success: true,

    message: "Authenticated via JSON body",

    data: req.body

  });

});


app.listen(3000, () => console.log("Server running"));

{

  "auth": "MY_EDU_SECRET",

  "payload": {

    "message": "Hello"

  }

}


<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Hack This Request – Vulnerability Playground</title>

<style>

  body { font-family: Arial; margin: 40px; max-width: 900px; }

  input, textarea { width: 100%; padding: 10px; margin: 8px 0; }

  button { padding: 12px 20px; background: #d62828; color: white; border: none; cursor: pointer; }

  button:hover { background: #a4161a; }

  pre { background: #f4f4f4; padding: 15px; border-radius: 6px; }

  .secret-box { background: #ffe8e8; padding: 10px; border-left: 5px solid #d62828; }

  .network-log { background: #eef; padding: 10px; border-left: 5px solid #446; margin-top: 20px; }

</style>

</head>

<body>


<h1>Hack This Request – Vulnerability Playground</h1>

<p>This sandbox simulates insecure APIs. Your mission: <strong>find and leak secrets</strong>.</p>


<div class="secret-box">

  <strong>Server Secret (hidden from students):</strong> 

  <span id="serverSecret">MY_EDU_SECRET</span>

</div>


<hr>


<h2>Network Inspector</h2>

<p>Every request you send will appear here.</p>

<pre id="networkInspector" class="network-log">No requests yet.</pre>


<hr>


<h2>Vulnerability 1 — Secret in URL</h2>

<label>Request URL</label>

<input id="urlInput" value="/api/data?key=MY_EDU_SECRET">


<label>JSON Body</label>

<textarea id="bodyInput" rows="5">{ "message": "Student request" }</textarea>


<button onclick="hackUrl()">Exploit URL Vulnerability</button>


<h3>Server Response</h3>

<pre id="urlResponse"></pre>


<hr>


<h2>Vulnerability 2 — Secret in JSON Body</h2>

<label>Request URL</label>

<input id="urlBodyInput" value="/api/data">


<label>JSON Body (contains secret)</label>

<textarea id="bodyAuthInput" rows="5">

{

  "auth": "MY_EDU_SECRET",

  "message": "Student request"

}

</textarea>


<button onclick="hackBody()">Exploit Body Vulnerability</button>


<h3>Server Response</h3>

<pre id="bodyResponse"></pre>


<hr>


<h2>Vulnerability 3 — Secret in Headers</h2>

<label>Request URL</label>

<input id="headerUrlInput" value="/api/data">


<label>Header Secret</label>

<input id="headerSecretInput" value="MY_EDU_SECRET">


<button onclick="hackHeader()">Exploit Header Vulnerability</button>


<h3>Server Response</h3>

<pre id="headerResponse"></pre>


<hr>


<h2>Vulnerability 4 — Secret in Cookies</h2>

<p>This simulates a server that stores secrets in cookies.</p>


<button onclick="hackCookie()">Exploit Cookie Vulnerability</button>


<h3>Server Response</h3>

<pre id="cookieResponse"></pre>


<hr>


<h2>Vulnerability 5 — Secret in Hidden HTML Fields</h2>

<input type="hidden" id="hiddenSecret" value="MY_EDU_SECRET">


<button onclick="hackHidden()">Exploit Hidden Field Vulnerability</button>


<h3>Server Response</h3>

<pre id="hiddenResponse"></pre>


<script>

// Fake vulnerable server

function fakeServer(request) {

  const secret = document.getElementById("serverSecret").textContent;


  const leaked = {

    requestSent: request,

    leakedSecret: secret,

    warning: "This API is vulnerable. Secrets should NEVER be stored in URLs, bodies, headers, cookies, or hidden fields."

  };


  return leaked;

}


// Network inspector logger

function logNetwork(request) {

  const inspector = document.getElementById("networkInspector");

  inspector.textContent = JSON.stringify(request, null, 2);

}


// Vulnerability 1 — URL

function hackUrl() {

  const url = document.getElementById("urlInput").value;

  const body = document.getElementById("bodyInput").value;


  const request = { type: "URL", url, body };

  logNetwork(request);


  const result = fakeServer(request);

  document.getElementById("urlResponse").textContent = JSON.stringify(result, null, 2);

}


// Vulnerability 2 — Body

function hackBody() {

  const url = document.getElementById("urlBodyInput").value;

  const body = document.getElementById("bodyAuthInput").value;


  const request = { type: "Body", url, body };

  logNetwork(request);


  const result = fakeServer(request);

  document.getElementById("bodyResponse").textContent = JSON.stringify(result, null, 2);

}


// Vulnerability 3 — Header

function hackHeader() {

  const url = document.getElementById("headerUrlInput").value;

  const headerSecret = document.getElementById("headerSecretInput").value;


  const request = { type: "Header", url, headers: { "X-Secret": headerSecret } };

  logNetwork(request);


  const result = fakeServer(request);

  document.getElementById("headerResponse").textContent = JSON.stringify(result, null, 2);

}


// Vulnerability 4 — Cookie

function hackCookie() {

  document.cookie = "secret=MY_EDU_SECRET";


  const request = { type: "Cookie", cookies: document.cookie };

  logNetwork(request);


  const result = fakeServer(request);

  document.getElementById("cookieResponse").textContent = JSON.stringify(result, null, 2);

}


// Vulnerability 5 — Hidden HTML Field

function hackHidden() {

  const hiddenSecret = document.getElementById("hiddenSecret").value;


  const request = { type: "HiddenField", hiddenSecret };

  logNetwork(request);


  const result = fakeServer(request);

  document.getElementById("hiddenResponse").textContent = JSON.stringify(result, null, 2);

}

</script>


</body>

</html>


<hr>


<h2>Vulnerability 6 — Replay Attacks</h2>

<p>Capture a request and replay it to exploit the vulnerability.</p>


<button onclick="captureRequest()">Capture Last Request</button>

<button onclick="replayAttack()">Replay Captured Request</button>


<h3>Captured Request</h3>

<pre id="capturedRequest">No request captured yet.</pre>


<h3>Replay Attack Result</h3>

<pre id="replayResult"></pre>


let lastCapturedRequest = null;


// Capture the last request shown in the network inspector

function captureRequest() {

  const inspector = document.getElementById("networkInspector").textContent;


  try {

    lastCapturedRequest = JSON.parse(inspector);

    document.getElementById("capturedRequest").textContent =

      JSON.stringify(lastCapturedRequest, null, 2);

  } catch {

    document.getElementById("capturedRequest").textContent =

      "No valid request to capture.";

  }

}


// Replay the captured request

function replayAttack() {

  if (!lastCapturedRequest) {

    document.getElementById("replayResult").textContent =

      "No captured request available.";

    return;

  }


  // Fake vulnerable server accepts replayed requests

  const result = {

    replayedRequest: lastCapturedRequest,

    leakedSecret: document.getElementById("serverSecret").textContent,

    attackSuccess: true,

    explanation:

      "Replay attack succeeded because the server does not use timestamps, nonces, or signatures. " +

      "Any previously valid request can be reused by an attacker."

  };


  document.getElementById("replayResult").textContent =

    JSON.stringify(result, null, 2);

}



wild-cardoso-core/

  index.html

  assets/

    style.css

    core.js

    json-factory.js

    adapters.js

    schema-validator.js

    logger.js

    replay.js


<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Wild Cardoso Core Decryptor — Educational Sandbox</title>

<link rel="stylesheet" href="assets/style.css">

</head>

<body>


<h1>Wild Cardoso Core Decryptor — Educational Sandbox</h1>


<div class="secret-box">

  <strong>Server Secret (hidden from students):</strong> 

  <span id="serverSecret">MY_EDU_SECRET</span>

</div>


<hr>


<h2>Network Inspector</h2>

<pre id="networkInspector" class="network-log">No requests yet.</pre>


<hr>


<h2>Replay Attack Module</h2>

<button onclick="captureRequest()">Capture Last Request</button>

<button onclick="replayAttack()">Replay Captured Request</button>

<pre id="capturedRequest">No request captured yet.</pre>

<pre id="replayResult"></pre>


<hr>


<h2>JSON Value Factory</h2>

<button onclick="generateJson()">Generate Random JSON</button>

<button onclick="generateBrokenJson()">Generate Broken JSON</button>

<pre id="jsonOutput"></pre>


<hr>


<h2>Jackson/Gson Adapter Simulation</h2>

<button onclick="simulateJackson()">Simulate Jackson Serialization</button>

<button onclick="simulateGson()">Simulate Gson Serialization</button>

<pre id="adapterOutput"></pre>


<hr>


<h2>Schema Validation</h2>

<textarea id="schemaInput" rows="6">

{

  "type": "object",

  "required": ["cipher", "auth"],

  "properties": {

    "cipher": { "type": "string" },

    "auth": { "type": "string" }

  }

}

</textarea>

<button onclick="validateSchema()">Validate JSON Against Schema</button>

<pre id="validationOutput"></pre>


<hr>


<h2>Logging System</h2>

<button onclick="logInfo()">Log INFO</button>

<button onclick="logWarn()">Log WARNING</button>

<button onclick="logError()">Log ERROR</button>

<button onclick="logAttack()">Log ATTACK Event</button>

<pre id="logOutput" class="log-box">No logs yet.</pre>


<script src="assets/core.js"></script>

<script src="assets/json-factory.js"></script>

<script src="assets/adapters.js"></script>

<script src="assets/schema-validator.js"></script>

<script src="assets/logger.js"></script>

<script src="assets/replay.js"></script>


</body>

</html>


<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Wild Cardoso Core Decryptor — JSON Factory & Validation</title>

<style>

  body { font-family: Arial; margin: 40px; max-width: 900px; }

  input, textarea { width: 100%; padding: 10px; margin: 8px 0; }

  button { padding: 12px 20px; background: #0078ff; color: white; border: none; cursor: pointer; }

  button:hover { background: #005fcc; }

  pre { background: #f4f4f4; padding: 15px; border-radius: 6px; }

  .log-box { background: #eef; padding: 10px; border-left: 5px solid #446; margin-top: 20px; }

  .error { color: #d62828; }

  .success { color: #28a745; }

</style>

</head>

<body>


<h1>Wild Cardoso Core Decryptor — JSON Factory, Validation & Logging</h1>

<p>Educational tool for JSON generation, schema validation, logging, and simulated Jackson/Gson adapters.</p>


<hr>


<h2>JSON Value Factory</h2>

<button onclick="generateJson()">Generate Random JSON</button>

<button onclick="generateBrokenJson()">Generate Broken JSON</button>


<h3>Generated JSON</h3>

<pre id="jsonOutput"></pre>


<hr>


<h2>Jackson/Gson Adapter Simulation</h2>

<p>This simulates Java-style serialization/deserialization using Jackson/Gson patterns.</p>


<button onclick="simulateJackson()">Simulate Jackson Serialization</button>

<button onclick="simulateGson()">Simulate Gson Serialization</button>


<h3>Adapter Output</h3>

<pre id="adapterOutput"></pre>


<hr>


<h2>Schema Validation</h2>

<textarea id="schemaInput" rows="6">

{

  "type": "object",

  "required": ["cipher", "auth"],

  "properties": {

    "cipher": { "type": "string" },

    "auth": { "type": "string" }

  }

}

</textarea>


<button onclick="validateSchema()">Validate JSON Against Schema</button>


<h3>Validation Result</h3>

<pre id="validationOutput"></pre>


<hr>


<h2>Logging System</h2>

<button onclick="logInfo()">Log INFO</button>

<button onclick="logWarn()">Log WARNING</button>

<button onclick="logError()">Log ERROR</button>

<button onclick="logAttack()">Log ATTACK Event</button>


<h3>Logs</h3>

<pre id="logOutput" class="log-box">No logs yet.</pre>


<script>

// -----------------------------

// JSON VALUE FACTORY

// -----------------------------

function randomString() {

  return Math.random().toString(36).substring(2, 10);

}


function generateJson() {

  const json = {

    cipher: "04" + randomString(),

    auth: "KEY_" + randomString(),

    timestamp: Date.now(),

    meta: {

      student: "anonymous",

      session: randomString()

    }

  };

  document.getElementById("jsonOutput").textContent =

    JSON.stringify(json, null, 2);

}


function generateBrokenJson() {

  const broken = "{ cipher: 04abc123, auth: KEY_" + randomString();

  document.getElementById("jsonOutput").textContent = broken;

}


// -----------------------------

// JACKSON / GSON ADAPTER SIMULATION

// -----------------------------

function simulateJackson() {

  const json = document.getElementById("jsonOutput").textContent;

  try {

    const obj = JSON.parse(json);

    const output = {

      jacksonSerialized: JSON.stringify(obj),

      explanation: "Jackson uses ObjectMapper.writeValueAsString()"

    };

    document.getElementById("adapterOutput").textContent =

      JSON.stringify(output, null, 2);

  } catch {

    document.getElementById("adapterOutput").textContent =

      "Jackson failed: invalid JSON";

  }

}


function simulateGson() {

  const json = document.getElementById("jsonOutput").textContent;

  try {

    const obj = JSON.parse(json);

    const output = {

      gsonSerialized: JSON.stringify(obj),

      explanation: "Gson uses new Gson().toJson()"

    };

    document.getElementById("adapterOutput").textContent =

      JSON.stringify(output, null, 2);

  } catch {

    document.getElementById("adapterOutput").textContent =

      "Gson failed: invalid JSON";

  }

}


// -----------------------------

// SCHEMA VALIDATION

// -----------------------------

function validateSchema() {

  const schemaText = document.getElementById("schemaInput").value;

  const jsonText = document.getElementById("jsonOutput").textContent;


  try {

    const schema = JSON.parse(schemaText);

    const data = JSON.parse(jsonText);


    const errors = [];


    // Required fields

    if (schema.required) {

      schema.required.forEach(field => {

        if (!(field in data)) {

          errors.push("Missing required field: " + field);

        }

      });

    }


    // Type validation

    if (schema.properties) {

      for (const key in schema.properties) {

        const expected = schema.properties[key].type;

        if (key in data && typeof data[key] !== expected) {

          errors.push(`Field '${key}' should be type '${expected}'`);

        }

      }

    }


    if (errors.length > 0) {

      document.getElementById("validationOutput").textContent =

        errors.join("\n");

    } else {

      document.getElementById("validationOutput").textContent =

        "Schema validation passed!";

    }


  } catch (err) {

    document.getElementById("validationOutput").textContent =

      "Invalid JSON or schema.";

  }

}


// -----------------------------

// LOGGING SYSTEM

// -----------------------------

let logs = [];


function pushLog(level, message) {

  logs.push({

    level,

    message,

    timestamp: new Date().toISOString()

  });

  document.getElementById("logOutput").textContent =

    JSON.stringify(logs, null, 2);

}


function logInfo() { pushLog("INFO", "Informational event logged."); }

function logWarn() { pushLog("WARN", "Warning: suspicious behavior detected."); }

function logError() { pushLog("ERROR", "Error occurred in decryptor."); }

function logAttack() { pushLog("ATTACK", "Replay attack or tampering detected."); }


</script>


</body>

</html>

Saturday, July 4, 2026

Portugal Intel SIRESP failure report july 2026 fires

 


https://cnnportugal.iol.pt/siresp/relatorio-siresp/versao-publica-do-relatorio-do-siresp-foi-cortada-e-ocultou-falhas-da-nos/20260602/6a1f2d9ed34e28842c84c37a

NATO decrypt hack json.parse error html online tool ( classified unrecognized token error)

 <!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>JSON Inspector Tool</title>

<style>

    body { font-family: Arial; margin: 20px; }

    textarea { width: 100%; height: 120px; }

    pre { background: #f4f4f4; padding: 10px; border-radius: 5px; }

    button { padding: 10px 20px; margin-top: 10px; }

</style>

</head>

<body>


<h2>Online JSON Inspector</h2>

<p>Enter an API URL to inspect raw response, sanitize it, and safely parse JSON.</p>


<input id="url" type="text" placeholder="https://api.example.com/data" style="width:100%; padding:8px;">

<button onclick="inspect()">Inspect</button>


<h3>Raw Response</h3>

<pre id="raw"></pre>


<h3>Sanitized Response</h3>

<pre id="clean"></pre>


<h3>Parsed JSON</h3>

<pre id="json"></pre>


<script>

function sanitize(raw) {

    return raw

        .trim()

        .replace(/^\uFEFF/, "")        // remove BOM

        .replace(/^[^({\[]]+/, "");    // remove junk before first { or [

}


async function inspect() {

    const url = document.getElementById("url").value;

    document.getElementById("raw").textContent = "Loading...";


    try {

        const response = await fetch(url);

        const contentType = response.headers.get("content-type") || "";

        const raw = await response.text();


        document.getElementById("raw").textContent = raw;


        const clean = sanitize(raw);

        document.getElementById("clean").textContent = clean;


        if (!contentType.includes("application/json")) {

            document.getElementById("json").textContent =

                "Not JSON (content-type: " + contentType + ")";

            return;

        }


        try {

            const parsed = JSON.parse(clean);

            document.getElementById("json").textContent =

                JSON.stringify(parsed, null, 2);

        } catch (e) {

            document.getElementById("json").textContent =

                "JSON Parse Error: " + e.message;

        }


    } catch (err) {

        document.getElementById("raw").textContent =

            "Fetch Error: " + err.message;

    }

}

</script>


</body>

</html>








<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Universal API & JSON Inspector</title>
<style>
    body { font-family: Arial; margin: 20px; }
    textarea, input { width: 100%; padding: 8px; margin-top: 5px; }
    pre { background: #f4f4f4; padding: 10px; border-radius: 5px; white-space: pre-wrap; }
    button { padding: 10px 20px; margin-top: 10px; }
    .section { margin-top: 30px; }
</style>
</head>
<body>

<h2>Universal API & JSON Inspector Tool</h2>
<p>Diagnose JSON errors, inspect raw responses, sanitize malformed JSON, upload files, and test APIs.</p>

<div class="section">
    <h3>API Request</h3>
    <input id="url" type="text" placeholder="https://api.example.com/data">
    <textarea id="headers" placeholder='{"Authorization": "Bearer TOKEN"}'></textarea>
    <button onclick="inspect()">Send Request</button>
</div>

<div class="section">
    <h3>Upload File (XLS, CSV, JSON)</h3>
    <input type="file" id="fileInput" onchange="handleFile(event)">
</div>

<div class="section">
    <h3>Raw Response</h3>
    <pre id="raw"></pre>
</div>

<div class="section">
    <h3>Sanitized Response</h3>
    <pre id="clean"></pre>
</div>

<div class="section">
    <h3>Parsed JSON</h3>
    <pre id="json"></pre>
</div>

<script>
function sanitize(raw) {
    return raw
        .trim()
        .replace(/^\uFEFF/, "")        // remove BOM
        .replace(/^[^({\[]]+/, "");    // remove junk before first { or [
}

async function inspect() {
    const url = document.getElementById("url").value;
    const headersInput = document.getElementById("headers").value;

    let headers = {};
    try { headers = JSON.parse(headersInput || "{}"); } catch {}

    document.getElementById("raw").textContent = "Loading...";

    try {
        const response = await fetch(url, { headers });
        const contentType = response.headers.get("content-type") || "";
        const raw = await response.text();

        document.getElementById("raw").textContent = raw;

        const clean = sanitize(raw);
        document.getElementById("clean").textContent = clean;

        if (!contentType.includes("application/json")) {
            document.getElementById("json").textContent =
                "Not JSON (content-type: " + contentType + ")";
            return;
        }

        try {
            const parsed = JSON.parse(clean);
            document.getElementById("json").textContent =
                JSON.stringify(parsed, null, 2);
        } catch (e) {
            document.getElementById("json").textContent =
                "JSON Parse Error: " + e.message;
        }

    } catch (err) {
        document.getElementById("raw").textContent =
            "Fetch Error: " + err.message;
    }
}

function handleFile(event) {
    const file = event.target.files[0];
    const reader = new FileReader();

    reader.onload = function(e) {
        const raw = e.target.result;
        document.getElementById("raw").textContent = raw;

        const clean = sanitize(raw);
        document.getElementById("clean").textContent = clean;

        try {
            const parsed = JSON.parse(clean);
            document.getElementById("json").textContent =
                JSON.stringify(parsed, null, 2);
        } catch {
            document.getElementById("json").textContent =
                "Not valid JSON";
        }
    };

    reader.readAsText(file);
}
</script>

</body>
</html>

Wednesday, July 1, 2026

Missiles for sale

 https://www.ebay.com/itm/274729230131

https://www.bombsaway.us/sidewinder.html





WorldCup 2026 Mundial Cristiano Ronaldo problemas família confusão interna seleção ( portugal intel)

 https://gauchazh.clicrbs.com.br/esportes/copa-do-mundo/noticia/2026/06/estreia-ruim-problemas-com-cristiano-ronaldo-e-casos-de-familia-ente...