diff --git a/eternal_loop_zip.sh b/eternal_loop_zip.sh new file mode 100644 index 0000000..c313765 --- /dev/null +++ b/eternal_loop_zip.sh @@ -0,0 +1,12 @@ +#!/bin/bash +INPUT=$1 + +while true; +do + file=$(zipinfo $INPUT | grep "\--" | awk '{print $9}') + echo "file :" $file + pass=$(echo $file | awk -F"." '{print $1}') + echo "pass: " $pass + unzip -P $pass $INPUT + INPUT=$file +done diff --git a/highlight_colors.rb b/highlight_colors.rb new file mode 100644 index 0000000..754cd17 --- /dev/null +++ b/highlight_colors.rb @@ -0,0 +1,28 @@ +#! /usr/bin/ruby +require 'chunky_png' + +image1 = ChunkyPNG::Image.from_file(ARGV[0]) +keyR = ARGV[1] +keyG = ARGV[2] +keyB = ARGV[3] + +def go(r, g, b, image) + range = 2 + if (r.to_i > 255) || (r.to_i < 0) || (g.to_i > 255) || (g.to_i < 0) || (b.to_i > 255) || (b.to_i < 0) + puts 'Invalid arguments. Syntax is ./findColorin [IMAGE] [R VALUE] [G VALUE] [B VALUE]' + return 0 + end + (0..image.dimension.width - 1).each do |x| + (0..image.dimension.height - 1).each do |y| + if (image[x, y] > ChunkyPNG::Color.rgb(r.to_i - range, g.to_i - range, b.to_i - range)) && (image[x, y] < ChunkyPNG::Color.rgb(r.to_i + range, g.to_i + range, b.to_i + range)) + image[x, y] = ChunkyPNG::Color.rgb(0, 0, 0) + else + image[x, y] = ChunkyPNG::Color.rgb(255, 255, 255) + end + end + end + puts 'Saving to output.png' + image.save('output.png') +end + +go keyR, keyG, keyB, image1 diff --git a/import_zik.py b/import_zik.py new file mode 100644 index 0000000..d9881e7 --- /dev/null +++ b/import_zik.py @@ -0,0 +1,31 @@ +# /bin/python2 + +import mechanize +from time import sleep + +br = mechanize.Browser() + +# url here +br.open('') + +# file type here +filetypes = ['.ogg', '.mp3'] +my_files = [] + +for l in br.links(): + for t in filetypes: + if t in str(l): + my_files.append(l) + + +def download_link(l): + f = open(l.text, 'w') + br.click_link(l) + f.write(br.response().read()) + print(l.text, "has been downloaded") + +for l in my_files: + sleep(1) + download_link(l) + +