sudo mkdir /mnt/sdb
sudo mount /dev/sdb1 /mnt/sdb
chroot /mnt/sdb"
passwd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # CVE-2025-55182 Advanced Scanner | |
| # A comprehensive tool for detecting and exploiting CVE-2025-55182 in Next.js applications | |
| # Based on the Nuclei template from: https://cloud.projectdiscovery.io/library/CVE-2025-55182 | |
| # | |
| # Usage: | |
| # ./scanner.sh -d <domain> -c <command> | |
| # ./scanner.sh -d vulnapp.com -c id | |
| # ./scanner.sh -d http://localhost:3000 -c "ping -c 3 google.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def log_metrics(self, metrics: dict, prefix: str = "train") -> None: | |
| """ | |
| Log average metrics to Weights & Biases (wandb). | |
| Args: | |
| metrics (dict): Dictionary of metric names (str) to lists of tensor/float values. | |
| prefix (str): Prefix for metric names (e.g., "train" or "eval"). | |
| """ | |
| # FIX: Correct dictionary comprehension syntax and safe PyTorch-only calculation (faster) | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| averaged_metrics = { | |
| metric: np.mean([v.cpu().detach().item() if hasattr(v, "cpu") else v for v in values]) | |
| for metric, values in metrics.items() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from safetensors.torch import load_file | |
| import json | |
| import os | |
| # path to HF checkpoint | |
| index_file = "model.safetensors.index.json" | |
| with open(index_file, "r") as f: | |
| index = json.load(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://ui.shadcn.com/schema/registry-item.json", | |
| "name": "test", | |
| "type": "registry:ui", | |
| "title": "Test", | |
| "devDependencies": [ | |
| "vite-plugin-run" | |
| ], | |
| "files": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Usage: python3 ntlm.py https://example.com users.txt passwords.txt | |
| import requests | |
| from requests_ntlm import HttpNtlmAuth | |
| import urllib3 | |
| import argparse | |
| import concurrent.futures | |
| # Suppress SSL warnings | |
| urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import h5py | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| # Path to the H5 dataset | |
| h5_file_path = "./data/your_dataset.h5" | |
| # Open the HDF5 file | |
| with h5py.File(h5_file_path, "r") as f: | |
| # Load datasets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from pypdf import PdfReader | |
| # Get all PDF files in the current directory | |
| pdf_files = [f for f in os.listdir('.') if f.endswith('.pdf')] | |
| for pdf_file in pdf_files: | |
| # Create a PDF reader object | |
| reader = PdfReader(pdf_file) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Page, Text, View, StyleSheet, Document, Font, Image } from "@react-pdf/renderer"; | |
| import { containsArabic } from "../utils/utils"; | |
| Font.register({ | |
| family: "Noto Sans Arabic", | |
| src: "https://cdn.jsdelivr.net/npm/@expo-google-fonts/[email protected]/NotoSansArabic_400Regular.ttf", | |
| }); | |
| Font.register({ | |
| family: "Work Sans", |
NewerOlder