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 | |
# Check for jq and install if not found | |
if ! command -v jq &> /dev/null | |
then | |
echo "jq could not be found, attempting to install." | |
if [ -f /etc/os-release ]; then | |
. /etc/os-release | |
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then | |
sudo apt-get update && sudo apt-get install -y jq |
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 | |
# Script to combine all markdown files in each folder into one file per folder | |
# Usage: ./combine_markdown.sh [base_directory] | |
BASE_DIR="${1:-crawled_docs}" | |
OUTPUT_DIR="combined_docs" | |
if [ ! -d "$BASE_DIR" ]; then | |
echo "Error: Directory $BASE_DIR does not exist" |
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 asyncio | |
import os | |
from urllib.parse import urlparse | |
from pathlib import Path | |
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig | |
from crawl4ai.deep_crawling import BestFirstCrawlingStrategy | |
from crawl4ai.deep_crawling.scorers import KeywordRelevanceScorer | |
from crawl4ai.markdown_generation_strategy import DefaultMarkdownGenerator | |
from crawl4ai.deep_crawling.filters import FilterChain |
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 | |
# Check for jq and install if not found | |
if ! command -v jq &> /dev/null | |
then | |
echo "jq could not be found, attempting to install." | |
if [ -f /etc/os-release ]; then | |
. /etc/os-release | |
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then | |
sudo apt-get update && sudo apt-get install -y jq |
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 | |
# Check for jq and install if not found | |
if ! command -v jq &> /dev/null | |
then | |
echo "jq could not be found, attempting to install." | |
if [ -f /etc/os-release ]; then | |
. /etc/os-release | |
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then | |
sudo apt-get update && sudo apt-get install -y jq |
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
######################## | |
# Windows 10 Prefetch Parser | |
# Created by 505Forensics (http://www.505forensics.com) | |
# Modified by Marius Ciepluch (2024, Python 3) | |
# | |
# Usage: Utilize this script to parse either a single or set of Windows 10 prefetch files | |
# | |
# Dependencies: This script requires the installation of libscca (https://github.com/libyal/libscca), and was only tested in a Linux environment | |
# | |
# Output: Script will output in CSV to stdout by default. |
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
""" | |
Copyright (c) 2024 Marius Ciepluch | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
// Function to convert a byte into its hexadecimal string representation | |
void byteToHex(unsigned char byte, char hexStr[3]) { | |
const char hexDigits[] = "0123456789abcdef"; | |
hexStr[0] = hexDigits[byte >> 4]; // Extract the high nibble (4 bits) and find its hex character | |
hexStr[1] = hexDigits[byte & 0x0F]; // Extract the low nibble and find its hex character | |
hexStr[2] = '\0'; // Null-terminate the string |
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 | |
# Interface name, e.g., enp1s0 | |
IFACE="enp1s0" | |
# Ensure systemd-networkd is enabled | |
systemctl enable systemd-networkd | |
systemctl start systemd-networkd | |
systemctl start systemd-resolved |
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 | |
# Interface name | |
IFACE="enp1s0" | |
# Get current IP, netmask, and gateway | |
IP=$(ip addr show $IFACE | grep 'inet ' | awk '{print $2}') | |
GATEWAY=$(ip route | grep default | awk '{print $3}') | |
DNS=$(awk '/^nameserver/ {print $2}' /run/systemd/resolve/resolv.conf | tr '\n' ' ') |
NewerOlder