Wednesday, July 8, 2026

Iris recognition biometric hack restore encrypted plane image to original html tool decryption 2




 

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Chaotic Iris Encryption Demo (Option A)</title>

<style>

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

  canvas { border: 1px solid #ccc; margin: 10px; }

  img { max-width: 300px; }

</style>

</head>

<body>


<h2>Chaotic Iris Encryption Demo (Pure JavaScript)</h2>


<input type="file" id="upload" accept="image/*"><br><br>


<label>Noise Amount: <span id="noiseVal">0</span></label><br>

<input type="range" id="noiseSlider" min="0" max="50" value="0"><br><br>


<button id="encryptBtn">Encrypt</button>

<button id="decryptBtn">Decrypt</button>

<button id="downloadEnc">Download Encrypted</button>

<button id="downloadDec">Download Decrypted</button>


<h3>Original</h3>

<canvas id="originalCanvas"></canvas>


<h3>Noisy</h3>

<canvas id="noisyCanvas"></canvas>


<h3>Encrypted</h3>

<canvas id="encryptedCanvas"></canvas>


<h3>Decrypted</h3>

<canvas id="decryptedCanvas"></canvas>


<script>

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

// Utility: Add noise

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

function addNoise(pixels, amount) {

    let noisy = new Uint8ClampedArray(pixels.length);

    for (let i = 0; i < pixels.length; i++) {

        let n = pixels[i] + (Math.random() * amount - amount/2);

        noisy[i] = Math.max(0, Math.min(255, n));

    }

    return noisy;

}


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

// 3D Chaotic Map Generator

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

function chaotic3D(a, b, c, x0, y0, z0, size) {

    let seq = new Array(size);

    let x = x0, y = y0, z = z0;


    for (let i = 0; i < size; i++) {

        x = a * x * (1 - x) + y;

        y = b * y * (1 - y) + z;

        z = c * z * (1 - z) + x;

        seq[i] = [x, y, z];

    }

    return seq;

}


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

// Permutation

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

function permute(pixels, seq) {

    let size = pixels.length;

    let idx = [...Array(size).keys()];

    idx.sort((i, j) => seq[i][0] - seq[j][0]);


    let permuted = new Uint8ClampedArray(size);

    for (let i = 0; i < size; i++) permuted[i] = pixels[idx[i]];


    return { permuted, idx };

}


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

// Diffusion

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

function diffuse(permuted, seq) {

    let size = permuted.length;

    let diffused = new Uint8ClampedArray(size);


    for (let i = 0; i < size; i++) {

        diffused[i] = (permuted[i] + seq[i][1] * 255) % 256;

    }

    return diffused;

}


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

// Reverse Diffusion

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

function undiffuse(diffused, seq) {

    let size = diffused.length;

    let undiff = new Uint8ClampedArray(size);


    for (let i = 0; i < size; i++) {

        undiff[i] = (diffused[i] - seq[i][1] * 255 + 256) % 256;

    }

    return undiff;

}


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

// Reverse Permutation

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

function reversePermutation(undiffused, idx) {

    let original = new Uint8ClampedArray(undiffused.length);

    for (let i = 0; i < idx.length; i++) {

        original[idx[i]] = undiffused[i];

    }

    return original;

}


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

// Draw pixels to canvas

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

function drawToCanvas(canvas, pixels, w, h) {

    let ctx = canvas.getContext("2d");

    canvas.width = w;

    canvas.height = h;

    let imgData = new ImageData(pixels, w, h);

    ctx.putImageData(imgData, 0, 0);

}


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

// Main Logic

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

let originalPixels, noisyPixels, encryptedPixels, decryptedPixels;

let width, height;

let seq, idx;


document.getElementById("noiseSlider").oninput = function() {

    document.getElementById("noiseVal").innerText = this.value;

};


document.getElementById("upload").addEventListener("change", function(e) {

    const file = e.target.files[0];

    const img = new Image();


    img.onload = function() {

        width = img.width;

        height = img.height;


        const canvas = document.getElementById("originalCanvas");

        const ctx = canvas.getContext("2d");

        canvas.width = width;

        canvas.height = height;

        ctx.drawImage(img, 0, 0);


        let data = ctx.getImageData(0, 0, width, height);

        originalPixels = data.data;


        drawToCanvas(document.getElementById("originalCanvas"), originalPixels, width, height);

    };


    img.src = URL.createObjectURL(file);

});


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

// Encrypt

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

document.getElementById("encryptBtn").onclick = function() {

    let noiseAmount = parseInt(document.getElementById("noiseSlider").value);

    noisyPixels = addNoise(originalPixels, noiseAmount);

    drawToCanvas(document.getElementById("noisyCanvas"), noisyPixels, width, height);


    seq = chaotic3D(3.99, 3.98, 3.97, 0.1, 0.2, 0.3, noisyPixels.length);


    let perm = permute(noisyPixels, seq);

    idx = perm.idx;


    encryptedPixels = diffuse(perm.permuted, seq);

    drawToCanvas(document.getElementById("encryptedCanvas"), encryptedPixels, width, height);

};


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

// Decrypt

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

document.getElementById("decryptBtn").onclick = function() {

    let undiff = undiffuse(encryptedPixels, seq);

    decryptedPixels = reversePermutation(undiff, idx);

    drawToCanvas(document.getElementById("decryptedCanvas"), decryptedPixels, width, height);

};


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

// Download buttons

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

function downloadCanvas(canvas, filename) {

    let link = document.createElement("a");

    link.download = filename;

    link.href = canvas.toDataURL();

    link.click();

}


document.getElementById("downloadEnc").onclick = () =>

    downloadCanvas(document.getElementById("encryptedCanvas"), "encrypted.png");


document.getElementById("downloadDec").onclick = () =>

    downloadCanvas(document.getElementById("decryptedCanvas"), "decrypted.png");


</script>


</body>

</html>








<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Chaotic Iris Encryption Demo (Enhanced)</title>


<!-- Bootstrap -->

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">


<!-- Plotly -->

<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>


<!-- GPU.js -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/gpu.js/2.10.0/gpu.min.js"></script>


<style>

  canvas { border: 1px solid #ccc; margin: 10px; }

  .img-box { border: 1px solid #ddd; padding: 10px; margin-bottom: 20px; }

</style>

</head>

<body class="bg-light">


<div class="container py-4">


<h2 class="mb-4">Chaotic Iris Encryption Demo (Option B)</h2>


<div class="mb-3">

  <label class="form-label">Upload Image</label>

  <input type="file" id="upload" class="form-control" accept="image/*">

</div>


<div class="mb-3">

  <label class="form-label">Noise Amount: <span id="noiseVal">0</span></label>

  <input type="range" id="noiseSlider" class="form-range" min="0" max="50" value="0">

</div>


<div class="mb-3">

  <button id="encryptBtn" class="btn btn-primary">Encrypt</button>

  <button id="decryptBtn" class="btn btn-success">Decrypt</button>

  <button id="downloadEnc" class="btn btn-warning">Download Encrypted</button>

  <button id="downloadDec" class="btn btn-info">Download Decrypted</button>

</div>


<hr>


<h4>3D Chaotic Map Visualization</h4>

<div id="chaosPlot" style="width:100%;height:400px;"></div>


<hr>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Original</h5>

    <canvas id="originalCanvas"></canvas>

  </div>


  <div class="col-md-6 img-box">

    <h5>Denoised</h5>

    <canvas id="denoisedCanvas"></canvas>

  </div>

</div>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Noisy</h5>

    <canvas id="noisyCanvas"></canvas>

  </div>


  <div class="col-md-6 img-box">

    <h5>Encrypted</h5>

    <canvas id="encryptedCanvas"></canvas>

  </div>

</div>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Decrypted</h5>

    <canvas id="decryptedCanvas"></canvas>

  </div>

</div>


</div>


<script>

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

// Wavelet Denoising (simple Haar wavelet)

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

function waveletDenoise(pixels) {

    let out = new Uint8ClampedArray(pixels.length);

    for (let i = 0; i < pixels.length; i += 4) {

        let avg = (pixels[i] + pixels[i+1] + pixels[i+2]) / 3;

        out[i] = out[i+1] = out[i+2] = avg;

        out[i+3] = pixels[i+3];

    }

    return out;

}


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

// Add Noise

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

function addNoise(pixels, amount) {

    let noisy = new Uint8ClampedArray(pixels.length);

    for (let i = 0; i < pixels.length; i++) {

        let n = pixels[i] + (Math.random() * amount - amount/2);

        noisy[i] = Math.max(0, Math.min(255, n));

    }

    return noisy;

}


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

// GPU-Accelerated Chaotic Map

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

const gpu = new GPU();


const chaoticKernel = gpu.createKernel(function(a, b, c, x0, y0, z0) {

    let x = x0, y = y0, z = z0;

    for (let i = 0; i < 20; i++) {

        x = a * x * (1 - x) + y;

        y = b * y * (1 - y) + z;

        z = c * z * (1 - z) + x;

    }

    return [x, y, z];

}).setOutput([1]);


function chaotic3D(a, b, c, x0, y0, z0, size) {

    let seq = new Array(size);

    for (let i = 0; i < size; i++) {

        seq[i] = chaoticKernel(a, b, c, x0, y0, z0)[0];

    }

    return seq;

}


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

// Permutation

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

function permute(pixels, seq) {

    let size = pixels.length;

    let idx = [...Array(size).keys()];

    idx.sort


<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Chaotic Iris Encryption Demo (Enhanced)</title>


<!-- Bootstrap -->

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">


<!-- Plotly -->

<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>


<!-- GPU.js -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/gpu.js/2.10.0/gpu.min.js"></script>


<style>

  canvas { border: 1px solid #ccc; margin: 10px; }

  .img-box { border: 1px solid #ddd; padding: 10px; margin-bottom: 20px; }

</style>

</head>

<body class="bg-light">


<div class="container py-4">


<h2 class="mb-4">Chaotic Iris Encryption Demo (Option B)</h2>


<div class="mb-3">

  <label class="form-label">Upload Image</label>

  <input type="file" id="upload" class="form-control" accept="image/*">

</div>


<div class="mb-3">

  <label class="form-label">Noise Amount: <span id="noiseVal">0</span></label>

  <input type="range" id="noiseSlider" class="form-range" min="0" max="50" value="0">

</div>


<div class="mb-3">

  <button id="encryptBtn" class="btn btn-primary">Encrypt</button>

  <button id="decryptBtn" class="btn btn-success">Decrypt</button>

  <button id="downloadEnc" class="btn btn-warning">Download Encrypted</button>

  <button id="downloadDec" class="btn btn-info">Download Decrypted</button>

</div>


<hr>


<h4>3D Chaotic Map Visualization</h4>

<div id="chaosPlot" style="width:100%;height:400px;"></div>


<hr>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Original</h5>

    <canvas id="originalCanvas"></canvas>

  </div>


  <div class="col-md-6 img-box">

    <h5>Denoised</h5>

    <canvas id="denoisedCanvas"></canvas>

  </div>

</div>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Noisy</h5>

    <canvas id="noisyCanvas"></canvas>

  </div>


  <div class="col-md-6 img-box">

    <h5>Encrypted</h5>

    <canvas id="encryptedCanvas"></canvas>

  </div>

</div>


<div class="row">

  <div class="col-md-6 img-box">

    <h5>Decrypted</h5>

    <canvas id="decryptedCanvas"></canvas>

  </div>

</div>


</div>


<script>

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

// Wavelet Denoising (simple Haar wavelet)

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

function waveletDenoise(pixels) {

    let out = new Uint8ClampedArray(pixels.length);

    for (let i = 0; i < pixels.length; i += 4) {

        let avg = (pixels[i] + pixels[i+1] + pixels[i+2]) / 3;

        out[i] = out[i+1] = out[i+2] = avg;

        out[i+3] = pixels[i+3];

    }

    return out;

}


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

// Add Noise

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

function addNoise(pixels, amount) {

    let noisy = new Uint8ClampedArray(pixels.length);

    for (let i = 0; i < pixels.length; i++) {

        let n = pixels[i] + (Math.random() * amount - amount/2);

        noisy[i] = Math.max(0, Math.min(255, n));

    }

    return noisy;

}


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

// GPU-Accelerated Chaotic Map

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

const gpu = new GPU();


const chaoticKernel = gpu.createKernel(function(a, b, c, x0, y0, z0) {

    let x = x0, y = y0, z = z0;

    for (let i = 0; i < 20; i++) {

        x = a * x * (1 - x) + y;

        y = b * y * (1 - y) + z;

        z = c * z * (1 - z) + x;

    }

    return [x, y, z];

}).setOutput([1]);


function chaotic3D(a, b, c, x0, y0, z0, size) {

    let seq = new Array(size);

    for (let i = 0; i < size; i++) {

        seq[i] = chaoticKernel(a, b, c, x0, y0, z0)[0];

    }

    return seq;

}


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

// Permutation

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

function permute(pixels, seq) {

    let size = pixels.length;

    let idx = [...Array(size).keys()];

    idx.sort((i, j) => seq[i] - seq[j]);


    let permuted = new Uint8ClampedArray(size);

    for (let i = 0; i < size; i++) permuted[i] = pixels[idx[i]];


    return { permuted, idx };

}


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

// Diffusion

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

function diffuse(permuted, seq) {

    let diffused = new Uint8ClampedArray(permuted.length);

    for (let i = 0; i < permuted.length; i++) {

        diffused[i] = (permuted[i] + seq[i] * 255) % 256;

    }

    return diffused;

}


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

// Reverse Diffusion

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

function undiffuse(diffused, seq) {

    let undiff = new Uint8ClampedArray(diffused.length);

    for (let i = 0; i < diffused.length; i++) {

        undiff[i] = (diffused[i] - seq[i] * 255 + 256) % 256;

    }

    return undiff;

}


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

// Reverse Permutation

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

function reversePermutation(undiffused, idx) {

    let original = new Uint8ClampedArray(undiffused.length);

    for (let i = 0; i < idx.length; i++) {

        original[idx[i]] = undiffused[i];

    }

    return original;

}


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

// Draw to Canvas

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

function drawToCanvas(canvas, pixels, w, h) {

    let ctx = canvas.getContext("2d");

    canvas.width = w;

    canvas.height = h;

    let imgData = new ImageData(pixels, w, h);

    ctx.putImageData(imgData, 0, 0);

}


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

// Global Variables

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

let originalPixels, denoisedPixels, noisyPixels, encryptedPixels, decryptedPixels;

let width, height;

let seq, idx;


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

// Noise Slider

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

document.getElementById("noiseSlider").oninput = function() {

    document.getElementById("noiseVal").innerText = this.value;

};


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

// Upload Image

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

document.getElementById("upload").addEventListener("change", function(e) {

    const file = e.target.files[0];

    const img = new Image();


    img.onload = function() {

        width = img.width;

        height = img.height;


        const canvas = document.getElementById("originalCanvas");

        const ctx = canvas.getContext("2d");

        canvas.width = width;

        canvas.height = height;

        ctx.drawImage(img, 0, 0);


        let data = ctx.getImageData(0, 0, width, height);

        originalPixels = data.data;


        // Denoise

        denoisedPixels = waveletDenoise(originalPixels);

        drawToCanvas(document.getElementById("denoisedCanvas"), denoisedPixels, width, height);


        drawToCanvas(document.getElementById("originalCanvas"), originalPixels, width, height);

    };


    img.src = URL.createObjectURL(file);

});


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

// Encrypt

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

document.getElementById("encryptBtn").onclick = function() {

    let noiseAmount = parseInt(document.getElementById("noiseSlider").value);


    noisyPixels = addNoise(denoisedPixels, noiseAmount);

    drawToCanvas(document.getElementById("noisyCanvas"), noisyPixels, width, height);


    seq = chaotic3D(3.99, 3.98, 3.97, 0.1, 0.2, 0.3, noisyPixels.length);


    let perm = permute(noisyPixels, seq);

    idx = perm.idx;


    encryptedPixels = diffuse(perm.permuted, seq);

    drawToCanvas(document.getElementById("encryptedCanvas"), encryptedPixels, width, height);


    // Plot chaotic map

    Plotly.newPlot("chaosPlot", [{

        x: seq.slice(0, 2000),

        y: seq.slice(1, 2001),

        z: seq.slice(2, 2002),

        mode: "lines",

        type: "scatter3d"

    }]);

};


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

// Decrypt

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

document.getElementById("decryptBtn").onclick = function() {

    let undiff = undiffuse(encryptedPixels, seq);

    decryptedPixels = reversePermutation(undiff, idx);

    drawToCanvas(document.getElementById("decryptedCanvas"), decryptedPixels, width, height);

};


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

// Download Buttons

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

function downloadCanvas(canvas, filename) {

    let link = document.createElement("a");

    link.download = filename;

    link.href = canvas.toDataURL();

    link.click();

}


document.getElementById("downloadEnc").onclick = () =>

    downloadCanvas(document.getElementById("encryptedCanvas"), "encrypted.png");


document.getElementById("downloadDec").onclick = () =>

    downloadCanvas(document.getElementById("decryptedCanvas"), "decrypted.png");


</script>


</body>

</html>


Iris recognition biometric decryption html tool hack (1)

 




def encrypt(img, seq):
    flat = img.flatten()
    idx = np.argsort(seq[:, 0])  # permutation from chaotic sequence
    permuted = flat[idx]

    # diffusion using chaotic values
    diffused = (permuted + (seq[:, 1] * 255)) % 256

    return diffused.reshape(img.shape).astype(np.uint8), idx



def decrypt(enc_img, seq, idx):
    flat = enc_img.flatten()

    # reverse diffusion
    undiffused = (flat - (seq[:, 1] * 255)) % 256

    # reverse permutation
    original = np.zeros_like(undiffused)
    original[idx] = undiffused

    return original.reshape(enc_img.shape).astype(np.uint8)



def test_parameter_sensitivity(img, a, b, c):
    seq1 = chaotic_3d_map(a, b, c, 0.1, 0.2, 0.3, img.size)
    enc, idx = encrypt(img, seq1)

    # Slightly wrong parameter
    seq_wrong = chaotic_3d_map(a + 1e-10, b, c, 0.1, 0.2, 0.3, img.size)
    dec_wrong = decrypt(enc, seq_wrong, idx)

    return dec_wrong











<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Reverse Permutation Test</title>

<style>

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

  img { max-width: 300px; margin: 10px; border: 1px solid #ccc; }

</style>

</head>

<body>


<h2>Reverse Permutation → Restore Image</h2>


<input type="file" id="upload" accept="image/*"><br><br>


<canvas id="originalCanvas"></canvas>

<canvas id="restoredCanvas"></canvas>


<script>

document.getElementById("upload").addEventListener("change", function(e) {

    const file = e.target.files[0];

    const img = new Image();


    img.onload = function() {

        const w = img.width;

        const h = img.height;


        // Draw original image

        const originalCanvas = document.getElementById("originalCanvas");

        originalCanvas.width = w;

        originalCanvas.height = h;

        const octx = originalCanvas.getContext("2d");

        octx.drawImage(img, 0, 0);


        // Get pixel data

        const imageData = octx.getImageData(0, 0, w, h);

        const pixels = imageData.data; // RGBA flat array


        // Generate a permutation index

        const size = pixels.length;

        let idx = [...Array(size).keys()];


        // Shuffle index (simple permutation)

        for (let i = size - 1; i > 0; i--) {

            const j = Math.floor(Math.random() * (i + 1));

            [idx[i], idx[j]] = [idx[j], idx[i]];

        }


        // Apply permutation

        let permuted = new Uint8ClampedArray(size);

        for (let i = 0; i < size; i++) {

            permuted[i] = pixels[idx[i]];

        }


        // Reverse permutation

        let restored = new Uint8ClampedArray(size);

        for (let i = 0; i < size; i++) {

            restored[idx[i]] = permuted[i];

        }


        // Draw restored image

        const restoredCanvas = document.getElementById("restoredCanvas");

        restoredCanvas.width = w;

        restoredCanvas.height = h;

        const rctx = restoredCanvas.getContext("2d");


        const restoredImageData = new ImageData(restored, w, h);

        rctx.putImageData(restoredImageData, 0, 0);

    };


    img.src = URL.createObjectURL(file);

});

</script>


</body>

</html>


Bom dia Worldwide gd morning ! Myself ! ELSA DAVID

 


Tuesday, July 7, 2026

NATO hack POX controller electronic card decrypt tool ( html code) double authentication

 






#!/usr/bin/env python3

"""

Educational SIP Decoder for SIPp Training

-----------------------------------------

This script teaches:

1. How SIP messages are structured

2. How to decode SIP headers and body

3. How SIPp scenarios map to real SIP packets

"""


import re


def parse_sip_message(raw):

    """

    Parse a raw SIP message into:

    - Request/Status line

    - Headers (dict)

    - Body

    """

    lines = raw.split("\n")

    start_line = lines[0].strip()


    headers = {}

    body = ""

    in_body = False


    for line in lines[1:]:

        line = line.rstrip("\r")


        if line == "":

            in_body = True

            continue


        if not in_body:

            # Header line: Key: Value

            if ":" in line:

                key, value = line.split(":", 1)

                headers[key.strip()] = value.strip()

        else:

            body += line + "\n"


    return start_line, headers, body.strip()



def decode_sip(raw):

    start_line, headers, body = parse_sip_message(raw)


    print("=== SIP MESSAGE DECODE ===")

    print(f"Start Line: {start_line}")


    print("\n--- Headers ---")

    for k, v in headers.items():

        print(f"{k}: {v}")


    print("\n--- Body ---")

    print(body if body else "(no body)")


    # Educational extras

    if "Via" in headers:

        print("\nVia branch:", re.findall(r"branch=([^;]+)", headers["Via"]))


    if "Call-ID" in headers:

        print("Call-ID:", headers["Call-ID"])


    if "CSeq" in headers:

        method = headers["CSeq"].split()[1]

        print("CSeq Method:", method)



if __name__ == "__main__":

    # Example SIPp REGISTER message

    raw_msg = """REGISTER sip:server.com SIP/2.0

Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bK12345

Max-Forwards: 70

To: <sip:alice@server.com>

From: <sip:alice@server.com>;tag=abcd

Call-ID: 123456@10.0.0.1

CSeq: 1 REGISTER

Contact: <sip:alice@10.0.0.1>

Content-Length: 0


"""


    decode_sip(raw_msg)

sipp -sn uac -trace_msg -trace_err server_ip

messages.log

with open("messages.log") as f:

    for msg in f.read().split("------------------------------------------------------------------------"):

        decode_sip(msg)


<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Digest Auth Simulator</title>

<style>

body {

    font-family: Arial, sans-serif;

    margin: 40px;

    background: #f5f5f5;

}

.container {

    background: white;

    padding: 25px;

    border-radius: 10px;

    width: 600px;

    margin: auto;

    box-shadow: 0 0 10px rgba(0,0,0,0.1);

}

input, select {

    width: 100%;

    padding: 8px;

    margin: 6px 0 15px 0;

}

pre {

    background: #eee;

    padding: 10px;

    border-radius: 5px;

}

button {

    padding: 10px 20px;

    background: #0078ff;

    color: white;

    border: none;

    border-radius: 5px;

    cursor: pointer;

}

button:hover {

    background: #005fcc;

}

</style>

</head>


<body>

<div class="container">

<h2>Digest Authentication Calculator</h2>


<label>Username</label>

<input id="username" value="alice">


<label>Password</label>

<input id="password" value="secret">


<label>Realm</label>

<input id="realm" value="server.com">


<label>Method</label>

<input id="method" value="REGISTER">


<label>URI</label>

<input id="uri" value="sip:server.com">


<label>Nonce</label>

<input id="nonce" value="abcdef123456">


<label>Nonce Count (nc)</label>

<input id="nc" value="00000001">


<label>Client Nonce (cnonce)</label>

<input id="cnonce" value="xyz987">


<label>QOP</label>

<select id="qop">

    <option value="auth">auth</option>

    <option value="auth-int">auth-int</option>

</select>


<button onclick="calculate()">Compute Digest</button>


<h3>Results</h3>

<pre id="output"></pre>

</div>


<script>

// Simple MD5 implementation (RFC 1321)

function md5(str) {

    return CryptoJS.MD5(str).toString();

}


function calculate() {

    let username = document.getElementById("username").value;

    let password = document.getElementById("password").value;

    let realm = document.getElementById("realm").value;

    let method = document.getElementById("method").value;

    let uri = document.getElementById("uri").value;

    let nonce = document.getElementById("nonce").value;

    let nc = document.getElementById("nc").value;

    let cnonce = document.getElementById("cnonce").value;

    let qop = document.getElementById("qop").value;


    let HA1 = md5(`${username}:${realm}:${password}`);

    let HA2 = md5(`${method}:${uri}`);

    let response = md5(`${HA1}:${nonce}:${nc}:${cnonce}:${qop}:${HA2}`);


    document.getElementById("output").innerText =

        `HA1 = MD5(${username}:${realm}:${password})

→ ${HA1}


HA2 = MD5(${method}:${uri})

→ ${HA2}


Response = MD5(${HA1}:${nonce}:${nc}:${cnonce}:${qop}:${HA2})

→ ${response}`;

}

</script>


<!-- CryptoJS MD5 -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>


</body>

</html>


NATO hack online tool BASE64 encode MARKOV model decryption ( html online tool)




 <!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Algorithmic Base64 Discovery Tool</title>

<style>

  body { font-family: Arial; background: #f4f4f4; padding: 20px; }

  #container { background: white; padding: 20px; border-radius: 8px;

               max-width: 700px; margin: auto; box-shadow: 0 0 10px rgba(0,0,0,0.1); }

  input, button { padding: 10px; font-size: 16px; width: 100%; margin-top: 10px; }

  pre { background: #222; color: #0f0; padding: 15px; border-radius: 6px; overflow-x: auto; }

</style>

</head>

<body>


<div id="container">

  <h2>Algorithmic Base64 Discovery Tool</h2>

  <p>This tool discovers the password algorithmically using adaptive search.</p>


  <label>Base64 Token:</label>

  <input id="token" placeholder="Enter Base64 token">


  <label>Known Username:</label>

  <input id="username" placeholder="student">


  <button onclick="discover()">Start Algorithmic Discovery</button>


  <h3>Output:</h3>

  <pre id="output"></pre>

</div>


<script src="discover.js"></script>


</body>

</html>

// MARKOV MODEL FOR PASSWORD DISCOVERY


// Build a Markov chain from a training set of passwords

function buildMarkovModel(trainingSet) {

  const model = {};


  for (let pass of trainingSet) {

    for (let i = 0; i < pass.length - 1; i++) {

      const curr = pass[i];

      const next = pass[i + 1];


      if (!model[curr]) model[curr] = {};

      if (!model[curr][next]) model[curr][next] = 0;


      model[curr][next] += 1;

    }

  }


  return model;

}


// Generate next-character probabilities

function nextCharProbabilities(model, char) {

  const transitions = model[char];

  if (!transitions) return null;


  const total = Object.values(transitions).reduce((a, b) => a + b, 0);


  return Object.fromEntries(

    Object.entries(transitions).map(([next, count]) => [

      next,

      count / total

    ])

  );

}


// Generate candidate passwords using the Markov chain

function generateMarkovPasswords(model, length, alphabet) {

  const candidates = [];


  function dfs(prefix) {

    if (prefix.length === length) {

      candidates.push(prefix);

      return;

    }


    const last = prefix[prefix.length - 1];

    const probs = nextCharProbabilities(model, last);


    if (probs) {

      // Sort by probability (descending)

      const sorted = Object.entries(probs)

        .sort((a, b) => b[1] - a[1])

        .map(([char]) => char);


      for (let char of sorted) dfs(prefix + char);

    } else {

      // fallback: try all alphabet characters

      for (let char of alphabet) dfs(prefix + char);

    }

  }


  // Start with each alphabet character

  for (let char of alphabet) dfs(char);


  return candidates;

}

function discover() {

  const token = document.getElementById("token").value.trim();

  const username = document.getElementById("username").value.trim();

  const output = document.getElementById("output");


  output.textContent = "Analyzing token...\n";


  // Decode Base64

  let decoded;

  try {

    decoded = atob(token);

  } catch {

    output.textContent += "Invalid Base64 token.";

    return;

  }


  output.textContent += `Decoded structure: ${decoded}\n`;


  const parts = decoded.split(":");

  const passLength = parts[1].length;


  output.textContent += `Password length inferred: ${passLength}\n`;


  const alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";


  // TRAINING SET (students can expand this!)

  const trainingSet = [

    "abc123", "aaa111", "pass99", "test12", "qwerty", "hello1",

    "student", "admin1", "root42", "guest00"

  ];


  output.textContent += "Building Markov model...\n";


  const model = buildMarkovModel(trainingSet);


  output.textContent += "Generating candidate passwords using Markov chain...\n";


  const candidates = generateMarkovPasswords(model, passLength, alphabet);


  output.textContent += `Generated ${candidates.length} candidates.\n`;


  let attempts = 0;


  function encode(pass) {

    return btoa(`${username}:${pass}`);

  }


  for (let pass of candidates) {

    attempts++;

    if (encode(pass) === token) {

      output.textContent += `FOUND via Markov model: ${pass}\nAttempts: ${attempts}`;

      return;

    }

  }


  output.textContent += `No match found after ${attempts} attempts.`;

}



 



function discover() {
  const token = document.getElementById("token").value.trim();
  const username = document.getElementById("username").value.trim();
  const output = document.getElementById("output");

  output.textContent = "Analyzing token...\n";




  // Decode Base64
  let decoded;
  try {
    decoded = atob(token);
  } catch {
    output.textContent += "Invalid Base64 token.";
    return;
  }

  output.textContent += `Decoded structure: ${decoded}\n`;

  const parts = decoded.split(":");
  const passLength = parts[1].length;

  output.textContent += `Password length inferred: ${passLength}\n`;

  const alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";

  // TRAINING SET (students can expand this!)
  const trainingSet = [
    "abc123", "aaa111", "pass99", "test12", "qwerty", "hello1",
    "student", "admin1", "root42", "guest00"
  ];

  output.textContent += "Building Markov model...\n";

  const model = buildMarkovModel(trainingSet);

  output.textContent += "Generating candidate passwords using Markov chain...\n";

  const candidates = generateMarkovPasswords(model, passLength, alphabet);

  output.textContent += `Generated ${candidates.length} candidates.\n`;

  let attempts = 0;

  function encode(pass) {
    return btoa(`${username}:${pass}`);
  }

  for (let pass of candidates) {
    attempts++;
    if (encode(pass) === token) {
      output.textContent += `FOUND via Markov model: ${pass}\nAttempts: ${attempts}`;
      return;
    }
  }

  output.textContent += `No match found after ${attempts} attempts.`;
}

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