Skip to content

Instantly share code, notes, and snippets.

View hctilg's full-sized avatar
🌱
Lost in Bytes

Mahi hctilg

🌱
Lost in Bytes
View GitHub Profile
<?php
// checking the exists Library.
if (!file_exists("finglish.php")) {
copy('https://raw.githubusercontent.com/hctilg/finglish/main/index.php', 'finglish.php');
}
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
$response = [];
#include <iostream>
using namespace std;
int main() {
    string sentence, word;
    cout << "Enter a sentence: ";
    getline(cin, sentence);
    cout << "Enter a word: ";
@hctilg
hctilg / redirect.php
Created April 1, 2024 08:08
redirect
<?php
function redirect($url) {
if (!headers_sent()) {
header("Location: $url");
} else {
echo "<script type='text/javascript'>window.location.href='$url'</script>";
echo "<noscript><meta http-equiv='refresh' content='0;url=$url'/></noscript>";
}
}
@hctilg
hctilg / matrix.bat
Created March 29, 2024 07:39
Matrix with batch-script
@echo off
title "Matrix"
setlocal enabledelayedexpansion
for /f "tokens=2 delims=[]" %%a in ('ver') do for /f "tokens=2 delims=. " %%a in ("%%a") do set /a "FullScreen=-((%%a-6)>>31)"
if "%1"=="" (
for %%a in (FontSize:00080008 FontFamily:00000030 WindowSize:00320050 ScreenColors:0000000a CodePage:000001b5 ScreenBufferSize:00320050 FullScreen:!FullScreen!
) do for /f "tokens=1,2 delims=:" %%b in ("%%a") do (
>nul reg add HKCU\Console\TheMatrix /v %%b /t reg_dword /d 0x%%c /f
)
from time import time
milliseconds = round(time() * (10 ** 3))
rand = lambda _seed, _min, _max: (_seed % (_max - _min + 1)) + _min
random = rand(milliseconds, 0, 100)
print(random)
seq 1000 | xargs -I{} -n 1 -P 10 curl -Is "https://camo.githubusercontent.com/f4fbf13c1553a43dbafebf5092e991be08bb7d15014e5cdacbb3120ce4b34f4f/68747470733a2f2f6b6f6d617265762e636f6d2f67687076632f3f757365726e616d653d686374696c6726636f6c6f723d363834616366" >/dev/null
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
def view(user, _view):
  print('-' * (len(user) + 8))
  view_count = 0
  options = Options()
  options.add_argument("--headless")
@hctilg
hctilg / bin_dump.sh
Last active February 3, 2024 06:24
binary to ascii
#!/usr/bin/env bash
if [ -t 0 ]; then
read -p "b: " binary_text
else
binary_text=$(cat -)
fi
binary_array=($binary_text)
@hctilg
hctilg / secure_erase.sh
Created January 2, 2024 16:02 — forked from tavallaie/secure_erase.sh
**Secure Data Erasure Script (Bash)** This Bash script securely erases data from a specified device with random data, ensuring irrecoverability. Use with caution.
#!/bin/bash
# Check if the script is run with superuser privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root (sudo)."
exit 1
fi
# Prompt the user for the target devices
read -p "Enter the target devices (e.g., /dev/sdX /dev/sdY): " target_devices