Skip to content

Instantly share code, notes, and snippets.

@MrCirdo
MrCirdo / anssi.py
Created February 17, 2021 15:48
This script bypass 80% of ANSSI (exclude video)
#!/usr/bin/env python3
"""
This code is based on https://blog.moulard.org/anssi-mooc-on-hacking/
The operation is very similar.
However it does not work with video :(
"""
from selenium import webdriver
import time
@MrCirdo
MrCirdo / download.py
Created January 6, 2021 17:12
Petit script permettant de télécharger les scans de black clover.
from pathlib import Path
import requests
from bs4 import BeautifulSoup
from rich import print
from rich.progress import track
def get_number_of_scan(chapter: int) -> int:
url = f"https://wwv.scan-1.com/black-clover/chapitre-{chapter}"
html = requests.get(url).text

Keybase proof

I hereby claim:

  • I am mrcirdo on github.
  • I am cirdo (https://keybase.io/cirdo) on keybase.
  • I have a public key ASBxsePEOPOsDxTi7J1yMEJY0Zg8_OUjwvL-jGcC137JbAo

To claim this, I am signing this object:

@MrCirdo
MrCirdo / MessagePGP.scpt
Last active December 9, 2016 15:05
Un petit applescript qui automatiquement déchiffre les messages reçus par Message
using terms from application "Messages"
on active chat message received from theBuddy for theTextChat with theText
decrypt(theText)
end active chat message received
on message sent theText with theTexte
end message sent
@MrCirdo
MrCirdo / Extract & Open OpenLoad.scpt
Created August 24, 2016 15:16
Parfois c'est chiant car les vidéos hébergées par OpenLoad ne se mettent pas en plein écran, du coup la seule solution que j'ai trouvé est d'ouvrir l'url de la vidéo. Mais ça aussi c'est chiant, il faut inspecter l'élément, etc... Du coup ce script sert à extraire les vidéos OpenLoad du html et à les ouvrir.
tell application "Safari"
set urlOpenLoad to do JavaScript "var src = ''
for (var i = 0; i < document.getElementsByTagName('iframe').length; i++){
if (document.getElementsByTagName('iframe')[i]['src'].indexOf('openload') != -1){
src = document.getElementsByTagName('iframe')[i]['src'];
}
}
" in first document
if urlOpenLoad is "" or urlOpenLoad does not contain "http" then
display alert "Il y'a pas vidéo openLoad sur cette page" as warning
@MrCirdo
MrCirdo / convert.scpt
Created June 11, 2016 08:12
Conversion de fichier vers mp3
set folders to (choose file multiple selections allowed 1)
repeat with thePath in folders
set thePathTerminal to quoted form of the POSIX path of thePath
set command to "/Applications/VLC.app/Contents/MacOS/VLC -I dummy " & thePathTerminal & " --sout=\"#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst=" & text 1 thru -2 of thePathTerminal & ".mp3'}\" vlc://quit"
do shell script command
end repeat
display notification "Conversions terminées"
set urlPage to ""
tell application "Safari"
set urlPage to URL of front document
end tell
repeat while urlPage does not contain "http://www.keygenmusic.net/?page=team&teamname="
set urlPage to text returned of (display dialog "Entrer l'url de la page: " default answer "")
end repeat
@MrCirdo
MrCirdo / Script.scpt
Last active February 26, 2017 00:20
Download video (audio) from Youtube
--set urlVideo to text returned of (display dialog "Entrer l'url de la vidéo : " default answer "")
set urlVideo to ""
tell application "Safari"
set urlVideo to URL of front document
end tell
if urlVideo is "" then
set urlVideo to text returned of (display dialog "Entrer l'url de la vidéo: " default answer "")
end if
repeat while urlVideo does not contain "https://www.youtube.com/watch"
set urlVideo to text returned of (display dialog "Entrer l'url de la vidéo: " default answer "")
@MrCirdo
MrCirdo / applescript.scpt
Last active May 16, 2016 09:38
Un AppleScript qui se refait à lui même (ne sert à rien)
tell application "System Events"
keystroke "a" using {command down}
keystroke "c" using {command down}
keystroke "a" using {command down}
key code 51
keystroke "v" using {command down}
end tell