This file contains 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 | |
pars="" | |
while (( "$#" )); do | |
if [[ $1 == "-fstack-protector-strong" ]]; then | |
echo "NOPE" | |
else | |
pars="$pars $1" |
This file contains 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
#!/usr/bin/env python3 | |
#Checks if the solution of the tiles problem is valid | |
import sys | |
if len(sys.argv) != 3: | |
print("Usage: ", sys.argv[0], "<tilesProblemFile> <tilesSolutionFile>") | |
sys.exit(2) | |
f=open(sys.argv[1]) | |
liniesTiles=f.readlines() |
This file contains 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/python | |
#quick 'n dirty script to filter market history by game id (csgo in this case) | |
#to get the data you go to https://steamcommunity.com/market/, f12, change page to request next batch of 10 results | |
#goto network mode, edit and resend request, put the starting index to 0 and count to ~300 | |
#if you request too much the server throws an error. Finally you copy the contents of the response message which is a json | |
#and name it 1.json. If you have more than 300 results which is likely, you'll have to make multiple queries, changing the index appropiately | |
#and naming the next files 2.json... You also have to modify the code if you have more than 2 files | |
#Only the name of the item is shown, as the price and other info seems to only be encoded in the html which is discarded right now | |
import json |
This file contains 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/python3 | |
#This script prints all the words from the given dictionary file that can be written with a single hand in a (spanish) qwerty layout keyboard (using only half of the keyboard) | |
#The dictionary file used (ca.dic) used has been extracted from the open office ca.3.0.5.oxt dictionary file (which is just a zip file) | |
#Requisites: python-unidecode | |
#Parameters | |
minimumWordLength = 3 | |
import sys |
This file contains 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/python | |
import functools | |
a=[0x45481d1217111313,0x95f422c260b4145,0x541b56563d6c5f0b,0x585c0b3c2945415f,0x402a6c54095d5f00,0x4b5f4248276a0606,0x6c5e5d432c2d4256,0x6b315e434707412d,0x5e54491c6e3b0a5a,0x2828475e05342b1a,0x60450073b26111f,0xa774803050b0d04] | |
b=functools.reduce(lambda x, y: x+y, map(lambda x: x.to_bytes(8,"little"), a)) | |
res=[0]*len(b) | |
tmp = 0 | |
for i in range(len(b)-1,-1,-1): | |
tmp = res[i] = b[i] ^ tmp |
This file contains 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/python3 | |
#https://problemkaputt.de/gbatek-3ds-files-video-shaders-dvlb-and-dvob-format.htm | |
import sys, mmap, struct as s | |
magic = b"DVLB" | |
magicDVLE = b'DVLE' | |
magicDVLEInt = s.unpack("<I", magicDVLE)[0] | |
def ph(v): | |
print(hex(v)) | |
def readInt(mm, base, idx): | |
start = base+idx*4 |
This file contains 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
#!/usr/bin/env python3 | |
#import sys, requests, code | |
from lxml import etree | |
#code.interact(local=locals()) | |
baseUrl = "https://pwnable.tw/challenge/" | |
if __name__ == '__main__': | |
arr = [] | |
with open("pwnable.tw.html") as file: |
This file contains 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
time curl -s https://raw.githubusercontent.com/wspace/corpus/main/README.md | | |
grep -Eo "\[GitHub\]\(https://github\.com[0-9a-zA-Z/#-~]+\)" | | |
cut -c 10- | rev | cut -c 2- | rev | | |
xargs -I % sh -c "echo -n %; wget -q -O /tmp/out.tmp %; python -c \"from lxml import etree;a=etree.HTML(open('/tmp/out.tmp').read()).xpath('//span[@class={0}Counter js-social-count{0}]'.format(chr(39)))[0].text;b=a.replace('.','').replace('k','00') if a.find('k')!=-1 else a;print(' '+b)\"" | | |
tee /dev/stderr | | |
sort -t ' ' -k2n |
This file contains 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
#!/usr/bin/env python3 | |
import http.client, sys, json, traceback, pickle, os | |
from os.path import exists | |
productNameFilter = "monster" | |
def loadItemsFromWeb(): | |
itemsBuffer = [] | |
conn = http.client.HTTPSConnection("www.miravia.es") | |
for pageNumber in range(1,22): |