From 6e528248414e330c9e25e81596ab47b8b8a5b701 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 14 May 2021 22:44:50 +0430 Subject: first commit --- bin/astdump | 44 +++++++++ bin/bruiser | 1 + bin/cgrep | 1 + bin/colo | 136 ++++++++++++++++++++++++++ bin/color | 6 ++ bin/colormake | 40 ++++++++ bin/delf | 1 + bin/disasm | 50 ++++++++++ bin/dwasm | 1 + bin/extractor | 67 +++++++++++++ bin/fzf_surfraw | 6 ++ bin/fzf_surfraw_tmux | 6 ++ bin/goto_clipboard.cgi | 4 + bin/hived | 1 + bin/index.html | 256 +++++++++++++++++++++++++++++++++++++++++++++++++ bin/kaminokumo | 1 + bin/leb128 | 117 ++++++++++++++++++++++ bin/llvm-wasm | 10 ++ bin/lorem-ipsum | 9 ++ bin/manga_dmenu.sh | 5 + bin/mushi | 1 + bin/postit.sh | 4 + bin/ramdump | 1 + bin/run_with_dmenu.sh | 7 ++ bin/sniff | 105 ++++++++++++++++++++ 25 files changed, 880 insertions(+) create mode 100755 bin/astdump create mode 120000 bin/bruiser create mode 120000 bin/cgrep create mode 100755 bin/colo create mode 100755 bin/color create mode 100755 bin/colormake create mode 120000 bin/delf create mode 100755 bin/disasm create mode 120000 bin/dwasm create mode 100755 bin/extractor create mode 100755 bin/fzf_surfraw create mode 100755 bin/fzf_surfraw_tmux create mode 100755 bin/goto_clipboard.cgi create mode 120000 bin/hived create mode 100644 bin/index.html create mode 120000 bin/kaminokumo create mode 100755 bin/leb128 create mode 100755 bin/llvm-wasm create mode 100755 bin/lorem-ipsum create mode 100755 bin/manga_dmenu.sh create mode 120000 bin/mushi create mode 100755 bin/postit.sh create mode 120000 bin/ramdump create mode 100755 bin/run_with_dmenu.sh create mode 100755 bin/sniff (limited to 'bin') diff --git a/bin/astdump b/bin/astdump new file mode 100755 index 0000000..668913d --- /dev/null +++ b/bin/astdump @@ -0,0 +1,44 @@ +#!/bin/bash + +INPUT="./testFuncs1.c" +OUTPUT="./dump" +OPTIONS="--" +RUN="1" + +while [[ $# -gt 0 ]] +do + passarg="$1" + + case $passarg in + -i|--input) + INPUT="$2" + shift + ;; + -o|--output) + OUTPUT="$2" + shift + ;; + -op|--options) + OPTIONS="$2" + shift + ;; + -h|--help) + echo "the script simply dumps the AST of the input." + echo "-i|--input the input file full path." + echo "-o|--output the output fule full path." + echo "-op|--options extra options to pass to clang" + echo "-h|--help prints out the help." + RUN="0" + ;; + *) + echo $1 is not a valid argument... + RUN="0" + shift + esac + shift +done + +if [[ "$RUN" == "1" ]]; then + "clang" -Xclang -ast-dump -fsyntax-only "$INPUT" "$OPTIONS" > "$OUTPUT" + +fi diff --git a/bin/bruiser b/bin/bruiser new file mode 120000 index 0000000..00bea13 --- /dev/null +++ b/bin/bruiser @@ -0,0 +1 @@ +/home/bloodstalker/devi/hell2/bruiser/bruiser \ No newline at end of file diff --git a/bin/cgrep b/bin/cgrep new file mode 120000 index 0000000..80f8897 --- /dev/null +++ b/bin/cgrep @@ -0,0 +1 @@ +/home/bloodstalker/extra/cgrep/cgrep \ No newline at end of file diff --git a/bin/colo b/bin/colo new file mode 100755 index 0000000..ac2818d --- /dev/null +++ b/bin/colo @@ -0,0 +1,136 @@ +#!/usr/bin/env python3 +# _*_ coding=utf-8 _*_ + +import argparse +import code +import os +import signal +import sys +from html.parser import HTMLParser + + +# BASH_STR = 'printf "\x1b[38;5;XXXmcolourXXX YYY \x1b[0m\t";' +BASH_STR = '\x1b[38;5;XXXmcolourXXX YYY \x1b[0m\t' +BASH_ANSI_STR = '\\x1b[38;5;XXXm' +COLO_LIST = [] +LJUST_CONST = 4 + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--ansi", action="store_true", + help="bool", default=False) + parser.add_argument("--hsi", action="store_true", + help="bool", default=False) + parser.add_argument("--rgb", action="store_true", + help="bool", default=False) + parser.add_argument("--number", action="store_true", + help="bool", default=False) + parser.add_argument("--name", action="store_true", + help="bool", default=False) + parser.add_argument("--hex", action="store_true", + help="bool", default=False) + parser.add_argument("--dbg", action="store_true", + help="debug", default=False) + self.args = parser.parse_args() + + +class ColoParser(HTMLParser): + def handle_data(self, data): + if data == "\n": + pass + else: + COLO_LIST.append(data) + + +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + # here + PRINT_LIST = str() + with open(os.path.dirname(sys.argv[0])+"/index.html", "r") as colo: + lines = colo.readlines() + for line in lines: + parser = ColoParser() + parser.feed(line) + NUMBER_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 1] + + if argparser.args.hsi: + HSL_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 0] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", HSL_COLO_LIST[i]) + elif argparser.args.rgb: + RGB_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 4] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", RGB_COLO_LIST[i]) + elif argparser.args.number: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 12 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NUMBER_COLO_LIST[i]) + elif argparser.args.name: + NAME_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 2] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NAME_COLO_LIST[i]) + elif argparser.args.hex: + HEX_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 3] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 8 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", HEX_COLO_LIST[i]) + elif argparser.args.ansi: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", BASH_ANSI_STR.replace("XXX", NUMBER_COLO_LIST[i])) + else: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 12 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NUMBER_COLO_LIST[i]) + print(PRINT_LIST) + + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except Exception as e: + if hasattr(e, "__doc__"): + print(e.__doc__) + if hasattr(e, "message"): + print(e.message) + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + + +if __name__ == "__main__": + main() diff --git a/bin/color b/bin/color new file mode 100755 index 0000000..d96fde3 --- /dev/null +++ b/bin/color @@ -0,0 +1,6 @@ +#!/bin/sh +for i in {0..255};do + if (( i % 12 == 0 )); then echo;fi + printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\t" +done +echo diff --git a/bin/colormake b/bin/colormake new file mode 100755 index 0000000..c8f352d --- /dev/null +++ b/bin/colormake @@ -0,0 +1,40 @@ +#!/bin/bash + +# Colored Make 2016.1.21 +# Copyright (c) 2014 Renato Silva +# Licensed under BSD +# https://github.com/renatosilva/colormake + +# Enable 256 colors for MinTTY in MSYS2 +if [[ "$MSYSCON" = mintty* && "$TERM" = *256color* ]]; then + red="\e[38;05;9m" + green="\e[38;05;76m" + blue="\e[38;05;74m" + cyan="\e[0;36m" + purple="\e[38;05;165m" + yellow="\e[0;33m" + gray="\e[38;05;244m" +else + red="\e[1;31m" + green="\e[1;32m" + blue="\e[1;34m" + cyan="\e[1;36m" + purple="\e[1;35m" + yellow="\e[1;33m" + gray="\e[1;30m" +fi +normal="\e[0m" + +# Errors, warnings, notes and compiler recipes +error="s/(^error|^.*[^a-z]error:)/$(printf $red)\\1$(printf $normal)/i" +warning="s/(^warning|^.*[^a-z]warning:)/$(printf $yellow)\\1$(printf $normal)/i" +make="s/^make(\[[0-9]+\])?:/$(printf $blue)make\\1:$(printf $normal)/" +compiler_recipe="s/^((gcc|g\+\+|clang)(.exe)? .*)/$(printf $gray)\\1$(printf $normal)/" + +if [[ $(uname -or) != 1.*Msys ]]; then + command "${COLORMAKE_COMMAND:-make}" "$@" 2> >(sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe") \ + > >(sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe") +else + # MinGW MSYS does not support process substitution + command "${COLORMAKE_COMMAND:-make}" "$@" 2>&1 | sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe" +fi diff --git a/bin/delf b/bin/delf new file mode 120000 index 0000000..090f766 --- /dev/null +++ b/bin/delf @@ -0,0 +1 @@ +/home/devi/delf/delf.py \ No newline at end of file diff --git a/bin/disasm b/bin/disasm new file mode 100755 index 0000000..47cd4d6 --- /dev/null +++ b/bin/disasm @@ -0,0 +1,50 @@ +#!/usr/bin/python3 + +import argparse +import code +import readline +import signal +import sys +from capstone import * +from capstone.x86 import * + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--hex", type=str, help="the hex code") + parser.add_argument("--sp", type=str, help="separator") + parser.add_argument("--dbg", action="store_true", help="debug", default=False) + self.args = parser.parse_args() + +# write code here +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + #here + code = bytes() + if argparser.args.hex: + if argparser.args.sp: hex_str = argparser.args.hex.split(argparser.args.sp) + else: hex_str = argparser.args.hex.split(" ") + code = [int(byte, 16) for byte in hex_str] + md = Cs(CS_ARCH_X86, CS_MODE_64) + for i in md.disasm(bytes(code), 0x0): + print(hex(i.address).ljust(7), i.mnemonic.ljust(7), i.op_str) + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + +if __name__ == "__main__": + main() diff --git a/bin/dwasm b/bin/dwasm new file mode 120000 index 0000000..4e5c2b6 --- /dev/null +++ b/bin/dwasm @@ -0,0 +1 @@ +/home/bloodstalker/extra/dwasm/dwasm.py \ No newline at end of file diff --git a/bin/extractor b/bin/extractor new file mode 100755 index 0000000..c6dc4e7 --- /dev/null +++ b/bin/extractor @@ -0,0 +1,67 @@ +#!/usr/bin/env lua + +--by Egor Skriptunoff here:https://stackoverflow.com/questions/23590304/finding-a-url-in-a-string-lua-pattern +local extractor = {} +function extractor.getURLS(text_with_URLs) + local domains = [[.ac.ad.ae.aero.af.ag.ai.al.am.an.ao.aq.ar.arpa.as.asia.at.au + .aw.ax.az.ba.bb.bd.be.bf.bg.bh.bi.biz.bj.bm.bn.bo.br.bs.bt.bv.bw.by.bz.ca + .cat.cc.cd.cf.cg.ch.ci.ck.cl.cm.cn.co.com.coop.cr.cs.cu.cv.cx.cy.cz.dd.de + .dj.dk.dm.do.dz.ec.edu.ee.eg.eh.er.es.et.eu.fi.firm.fj.fk.fm.fo.fr.fx.ga + .gb.gd.ge.gf.gh.gi.gl.gm.gn.gov.gp.gq.gr.gs.gt.gu.gw.gy.hk.hm.hn.hr.ht.hu + .id.ie.il.im.in.info.int.io.iq.ir.is.it.je.jm.jo.jobs.jp.ke.kg.kh.ki.km.kn + .kp.kr.kw.ky.kz.la.lb.lc.li.lk.lr.ls.lt.lu.lv.ly.ma.mc.md.me.mg.mh.mil.mk + .ml.mm.mn.mo.mobi.mp.mq.mr.ms.mt.mu.museum.mv.mw.mx.my.mz.na.name.nato.nc + .ne.net.nf.ng.ni.nl.no.nom.np.nr.nt.nu.nz.om.org.pa.pe.pf.pg.ph.pk.pl.pm + .pn.post.pr.pro.ps.pt.pw.py.qa.re.ro.ru.rw.sa.sb.sc.sd.se.sg.sh.si.sj.sk + .sl.sm.sn.so.sr.ss.st.store.su.sv.sy.sz.tc.td.tel.tf.tg.th.tj.tk.tl.tm.tn + .to.tp.tr.travel.tt.tv.tw.tz.ua.ug.uk.um.us.uy.va.vc.ve.vg.vi.vn.vu.web.wf + .ws.xxx.ye.yt.yu.za.zm.zr.zw]] + + local tlds = {} + + for tld in domains:gmatch'%w+' do + tlds[tld] = true + end + local function max4(a,b,c,d) return math.max(a+0, b+0, c+0, d+0) end + local protocols = {[''] = 0, ['http://'] = 0, ['https://'] = 0, ['ftp://'] = 0} + local finished = {} + + for pos_start, url, prot, subd, tld, colon, port, slash, path in + text_with_URLs:gmatch'()(([%w_.~!*:@&+$/?%%#-]-)(%w[-.%w]*%.)(%w+)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))' + do + if protocols[prot:lower()] == (1 - #slash) * #path and not subd:find'%W%W' + and (colon == '' or port ~= '' and port + 0 < 65536) + and (tlds[tld:lower()] or tld:find'^%d+$' and subd:find'^%d+%.%d+%.%d+%.$' + and max4(tld, subd:match'^(%d+)%.(%d+)%.(%d+)%.$') < 256) + then + finished[pos_start] = true + print(pos_start, url) + end + end + + for pos_start, url, prot, dom, colon, port, slash, path in + text_with_URLs:gmatch'()((%f[%w]%a+://)(%w[-.%w]*)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))' + do + if not finished[pos_start] and not (dom..'.'):find'%W%W' + and protocols[prot:lower()] == (1 - #slash) * #path + and (colon == '' or port ~= '' and port + 0 < 65536) + then + print(pos_start, url) + end + end +end + +function main() + local input = io.read("*a") + for k,v in pairs(arg) do + if v == "--url" then + extractor.getURLS(input) + else + print("invalid args...") + os.exit(1) + end + end +end + +main() +return extractor diff --git a/bin/fzf_surfraw b/bin/fzf_surfraw new file mode 100755 index 0000000..de297c1 --- /dev/null +++ b/bin/fzf_surfraw @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOVAL'| fzf --algo=v2 -e | awk '{print $1}') +if [ "$PREFIX" = "" ]; then exit;fi +read -r -e -p " $PREFIX >>> Enter The Search Keyword: " INPUT +surfraw -p "$PREFIX" "$INPUT" | xsel -p diff --git a/bin/fzf_surfraw_tmux b/bin/fzf_surfraw_tmux new file mode 100755 index 0000000..b6344cc --- /dev/null +++ b/bin/fzf_surfraw_tmux @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOVAL'| fzf --algo=v2 -e | awk '{print $1}') +if [ "$PREFIX" = "" ]; then exit;fi +read -r -e -p " $PREFIX >>> Enter The Search Keyword: " INPUT +pidof tmux >/dev/null && tmux set-buffer "$(surfraw -p "$PREFIX" "$INPUT")" diff --git a/bin/goto_clipboard.cgi b/bin/goto_clipboard.cgi new file mode 100755 index 0000000..faa421c --- /dev/null +++ b/bin/goto_clipboard.cgi @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +printf "%s\r\n" "W3m-control: GOTO $(xsel -ob)"; +printf "W3m-control: DELETE_PREVBUF\r\n" diff --git a/bin/hived b/bin/hived new file mode 120000 index 0000000..333bfce --- /dev/null +++ b/bin/hived @@ -0,0 +1 @@ +../hived \ No newline at end of file diff --git a/bin/index.html b/bin/index.html new file mode 100644 index 0000000..fa3d7ae --- /dev/null +++ b/bin/index.html @@ -0,0 +1,256 @@ +0Black#000000rgb(0,0,0)hsl(0,0%,0%) +1Maroon#800000rgb(128,0,0)hsl(0,100%,25%) +2Green#008000rgb(0,128,0)hsl(120,100%,25%) +3Olive#808000rgb(128,128,0)hsl(60,100%,25%) +4Navy#000080rgb(0,0,128)hsl(240,100%,25%) +5Purple#800080rgb(128,0,128)hsl(300,100%,25%) +6Teal#008080rgb(0,128,128)hsl(180,100%,25%) +7Silver#c0c0c0rgb(192,192,192)hsl(0,0%,75%) +8Grey#808080rgb(128,128,128)hsl(0,0%,50%) +9Red#ff0000rgb(255,0,0)hsl(0,100%,50%) +10Lime#00ff00rgb(0,255,0)hsl(120,100%,50%) +11Yellow#ffff00rgb(255,255,0)hsl(60,100%,50%) +12Blue#0000ffrgb(0,0,255)hsl(240,100%,50%) +13Fuchsia#ff00ffrgb(255,0,255)hsl(300,100%,50%) +14Aqua#00ffffrgb(0,255,255)hsl(180,100%,50%) +15White#ffffffrgb(255,255,255)hsl(0,0%,100%) +16Grey0#000000rgb(0,0,0)hsl(0,0%,0%) +17NavyBlue#00005frgb(0,0,95)hsl(240,100%,18%) +18DarkBlue#000087rgb(0,0,135)hsl(240,100%,26%) +19Blue3#0000afrgb(0,0,175)hsl(240,100%,34%) +20Blue3#0000d7rgb(0,0,215)hsl(240,100%,42%) +21Blue1#0000ffrgb(0,0,255)hsl(240,100%,50%) +22DarkGreen#005f00rgb(0,95,0)hsl(120,100%,18%) +23DeepSkyBlue4#005f5frgb(0,95,95)hsl(180,100%,18%) +24DeepSkyBlue4#005f87rgb(0,95,135)hsl(97,100%,26%) +25DeepSkyBlue4#005fafrgb(0,95,175)hsl(07,100%,34%) +26DodgerBlue3#005fd7rgb(0,95,215)hsl(13,100%,42%) +27DodgerBlue2#005fffrgb(0,95,255)hsl(17,100%,50%) +28Green4#008700rgb(0,135,0)hsl(120,100%,26%) +29SpringGreen4#00875frgb(0,135,95)hsl(62,100%,26%) +30Turquoise4#008787rgb(0,135,135)hsl(180,100%,26%) +31DeepSkyBlue3#0087afrgb(0,135,175)hsl(93,100%,34%) +32DeepSkyBlue3#0087d7rgb(0,135,215)hsl(02,100%,42%) +33DodgerBlue1#0087ffrgb(0,135,255)hsl(08,100%,50%) +34Green3#00af00rgb(0,175,0)hsl(120,100%,34%) +35SpringGreen3#00af5frgb(0,175,95)hsl(52,100%,34%) +36DarkCyan#00af87rgb(0,175,135)hsl(66,100%,34%) +37LightSeaGreen#00afafrgb(0,175,175)hsl(180,100%,34%) +38DeepSkyBlue2#00afd7rgb(0,175,215)hsl(91,100%,42%) +39DeepSkyBlue1#00afffrgb(0,175,255)hsl(98,100%,50%) +40Green3#00d700rgb(0,215,0)hsl(120,100%,42%) +41SpringGreen3#00d75frgb(0,215,95)hsl(46,100%,42%) +42SpringGreen2#00d787rgb(0,215,135)hsl(57,100%,42%) +43Cyan3#00d7afrgb(0,215,175)hsl(68,100%,42%) +44DarkTurquoise#00d7d7rgb(0,215,215)hsl(180,100%,42%) +45Turquoise2#00d7ffrgb(0,215,255)hsl(89,100%,50%) +46Green1#00ff00rgb(0,255,0)hsl(120,100%,50%) +47SpringGreen2#00ff5frgb(0,255,95)hsl(42,100%,50%) +48SpringGreen1#00ff87rgb(0,255,135)hsl(51,100%,50%) +49MediumSpringGreen#00ffafrgb(0,255,175)hsl(61,100%,50%) +50Cyan2#00ffd7rgb(0,255,215)hsl(70,100%,50%) +51Cyan1#00ffffrgb(0,255,255)hsl(180,100%,50%) +52DarkRed#5f0000rgb(95,0,0)hsl(0,100%,18%) +53DeepPink4#5f005frgb(95,0,95)hsl(300,100%,18%) +54Purple4#5f0087rgb(95,0,135)hsl(82,100%,26%) +55Purple4#5f00afrgb(95,0,175)hsl(72,100%,34%) +56Purple3#5f00d7rgb(95,0,215)hsl(66,100%,42%) +57BlueViolet#5f00ffrgb(95,0,255)hsl(62,100%,50%) +58Orange4#5f5f00rgb(95,95,0)hsl(60,100%,18%) +59Grey37#5f5f5frgb(95,95,95)hsl(0,0%,37%) +60MediumPurple4#5f5f87rgb(95,95,135)hsl(240,17%,45%) +61SlateBlue3#5f5fafrgb(95,95,175)hsl(240,33%,52%) +62SlateBlue3#5f5fd7rgb(95,95,215)hsl(240,60%,60%) +63RoyalBlue1#5f5fffrgb(95,95,255)hsl(240,100%,68%) +64Chartreuse4#5f8700rgb(95,135,0)hsl(7,100%,26%) +65DarkSeaGreen4#5f875frgb(95,135,95)hsl(120,17%,45%) +66PaleTurquoise4#5f8787rgb(95,135,135)hsl(180,17%,45%) +67SteelBlue#5f87afrgb(95,135,175)hsl(210,33%,52%) +68SteelBlue3#5f87d7rgb(95,135,215)hsl(220,60%,60%) +69CornflowerBlue#5f87ffrgb(95,135,255)hsl(225,100%,68%) +70Chartreuse3#5faf00rgb(95,175,0)hsl(7,100%,34%) +71DarkSeaGreen4#5faf5frgb(95,175,95)hsl(120,33%,52%) +72CadetBlue#5faf87rgb(95,175,135)hsl(150,33%,52%) +73CadetBlue#5fafafrgb(95,175,175)hsl(180,33%,52%) +74SkyBlue3#5fafd7rgb(95,175,215)hsl(200,60%,60%) +75SteelBlue1#5fafffrgb(95,175,255)hsl(210,100%,68%) +76Chartreuse3#5fd700rgb(95,215,0)hsl(3,100%,42%) +77PaleGreen3#5fd75frgb(95,215,95)hsl(120,60%,60%) +78SeaGreen3#5fd787rgb(95,215,135)hsl(140,60%,60%) +79Aquamarine3#5fd7afrgb(95,215,175)hsl(160,60%,60%) +80MediumTurquoise#5fd7d7rgb(95,215,215)hsl(180,60%,60%) +81SteelBlue1#5fd7ffrgb(95,215,255)hsl(195,100%,68%) +82Chartreuse2#5fff00rgb(95,255,0)hsl(7,100%,50%) +83SeaGreen2#5fff5frgb(95,255,95)hsl(120,100%,68%) +84SeaGreen1#5fff87rgb(95,255,135)hsl(135,100%,68%) +85SeaGreen1#5fffafrgb(95,255,175)hsl(150,100%,68%) +86Aquamarine1#5fffd7rgb(95,255,215)hsl(165,100%,68%) +87DarkSlateGray2#5fffffrgb(95,255,255)hsl(180,100%,68%) +88DarkRed#870000rgb(135,0,0)hsl(0,100%,26%) +89DeepPink4#87005frgb(135,0,95)hsl(17,100%,26%) +90DarkMagenta#870087rgb(135,0,135)hsl(300,100%,26%) +91DarkMagenta#8700afrgb(135,0,175)hsl(86,100%,34%) +92DarkViolet#8700d7rgb(135,0,215)hsl(77,100%,42%) +93Purple#8700ffrgb(135,0,255)hsl(71,100%,50%) +94Orange4#875f00rgb(135,95,0)hsl(2,100%,26%) +95LightPink4#875f5frgb(135,95,95)hsl(0,17%,45%) +96Plum4#875f87rgb(135,95,135)hsl(300,17%,45%) +97MediumPurple3#875fafrgb(135,95,175)hsl(270,33%,52%) +98MediumPurple3#875fd7rgb(135,95,215)hsl(260,60%,60%) +99SlateBlue1#875fffrgb(135,95,255)hsl(255,100%,68%) +100Yellow4#878700rgb(135,135,0)hsl(60,100%,26%) +101Wheat4#87875frgb(135,135,95)hsl(60,17%,45%) +102Grey53#878787rgb(135,135,135)hsl(0,0%,52%) +103LightSlateGrey#8787afrgb(135,135,175)hsl(240,20%,60%) +104MediumPurple#8787d7rgb(135,135,215)hsl(240,50%,68%) +105LightSlateBlue#8787ffrgb(135,135,255)hsl(240,100%,76%) +106Yellow4#87af00rgb(135,175,0)hsl(3,100%,34%) +107DarkOliveGreen3#87af5frgb(135,175,95)hsl(90,33%,52%) +108DarkSeaGreen#87af87rgb(135,175,135)hsl(120,20%,60%) +109LightSkyBlue3#87afafrgb(135,175,175)hsl(180,20%,60%) +110LightSkyBlue3#87afd7rgb(135,175,215)hsl(210,50%,68%) +111SkyBlue2#87afffrgb(135,175,255)hsl(220,100%,76%) +112Chartreuse2#87d700rgb(135,215,0)hsl(2,100%,42%) +113DarkOliveGreen3#87d75frgb(135,215,95)hsl(100,60%,60%) +114PaleGreen3#87d787rgb(135,215,135)hsl(120,50%,68%) +115DarkSeaGreen3#87d7afrgb(135,215,175)hsl(150,50%,68%) +116DarkSlateGray3#87d7d7rgb(135,215,215)hsl(180,50%,68%) +117SkyBlue1#87d7ffrgb(135,215,255)hsl(200,100%,76%) +118Chartreuse1#87ff00rgb(135,255,0)hsl(8,100%,50%) +119LightGreen#87ff5frgb(135,255,95)hsl(105,100%,68%) +120LightGreen#87ff87rgb(135,255,135)hsl(120,100%,76%) +121PaleGreen1#87ffafrgb(135,255,175)hsl(140,100%,76%) +122Aquamarine1#87ffd7rgb(135,255,215)hsl(160,100%,76%) +123DarkSlateGray1#87ffffrgb(135,255,255)hsl(180,100%,76%) +124Red3#af0000rgb(175,0,0)hsl(0,100%,34%) +125DeepPink4#af005frgb(175,0,95)hsl(27,100%,34%) +126MediumVioletRed#af0087rgb(175,0,135)hsl(13,100%,34%) +127Magenta3#af00afrgb(175,0,175)hsl(300,100%,34%) +128DarkViolet#af00d7rgb(175,0,215)hsl(88,100%,42%) +129Purple#af00ffrgb(175,0,255)hsl(81,100%,50%) +130DarkOrange3#af5f00rgb(175,95,0)hsl(2,100%,34%) +131IndianRed#af5f5frgb(175,95,95)hsl(0,33%,52%) +132HotPink3#af5f87rgb(175,95,135)hsl(330,33%,52%) +133MediumOrchid3#af5fafrgb(175,95,175)hsl(300,33%,52%) +134MediumOrchid#af5fd7rgb(175,95,215)hsl(280,60%,60%) +135MediumPurple2#af5fffrgb(175,95,255)hsl(270,100%,68%) +136DarkGoldenrod#af8700rgb(175,135,0)hsl(6,100%,34%) +137LightSalmon3#af875frgb(175,135,95)hsl(30,33%,52%) +138RosyBrown#af8787rgb(175,135,135)hsl(0,20%,60%) +139Grey63#af87afrgb(175,135,175)hsl(300,20%,60%) +140MediumPurple2#af87d7rgb(175,135,215)hsl(270,50%,68%) +141MediumPurple1#af87ffrgb(175,135,255)hsl(260,100%,76%) +142Gold3#afaf00rgb(175,175,0)hsl(60,100%,34%) +143DarkKhaki#afaf5frgb(175,175,95)hsl(60,33%,52%) +144NavajoWhite3#afaf87rgb(175,175,135)hsl(60,20%,60%) +145Grey69#afafafrgb(175,175,175)hsl(0,0%,68%) +146LightSteelBlue3#afafd7rgb(175,175,215)hsl(240,33%,76%) +147LightSteelBlue#afafffrgb(175,175,255)hsl(240,100%,84%) +148Yellow3#afd700rgb(175,215,0)hsl(1,100%,42%) +149DarkOliveGreen3#afd75frgb(175,215,95)hsl(80,60%,60%) +150DarkSeaGreen3#afd787rgb(175,215,135)hsl(90,50%,68%) +151DarkSeaGreen2#afd7afrgb(175,215,175)hsl(120,33%,76%) +152LightCyan3#afd7d7rgb(175,215,215)hsl(180,33%,76%) +153LightSkyBlue1#afd7ffrgb(175,215,255)hsl(210,100%,84%) +154GreenYellow#afff00rgb(175,255,0)hsl(8,100%,50%) +155DarkOliveGreen2#afff5frgb(175,255,95)hsl(90,100%,68%) +156PaleGreen1#afff87rgb(175,255,135)hsl(100,100%,76%) +157DarkSeaGreen2#afffafrgb(175,255,175)hsl(120,100%,84%) +158DarkSeaGreen1#afffd7rgb(175,255,215)hsl(150,100%,84%) +159PaleTurquoise1#afffffrgb(175,255,255)hsl(180,100%,84%) +160Red3#d70000rgb(215,0,0)hsl(0,100%,42%) +161DeepPink3#d7005frgb(215,0,95)hsl(33,100%,42%) +162DeepPink3#d70087rgb(215,0,135)hsl(22,100%,42%) +163Magenta3#d700afrgb(215,0,175)hsl(11,100%,42%) +164Magenta3#d700d7rgb(215,0,215)hsl(300,100%,42%) +165Magenta2#d700ffrgb(215,0,255)hsl(90,100%,50%) +166DarkOrange3#d75f00rgb(215,95,0)hsl(6,100%,42%) +167IndianRed#d75f5frgb(215,95,95)hsl(0,60%,60%) +168HotPink3#d75f87rgb(215,95,135)hsl(340,60%,60%) +169HotPink2#d75fafrgb(215,95,175)hsl(320,60%,60%) +170Orchid#d75fd7rgb(215,95,215)hsl(300,60%,60%) +171MediumOrchid1#d75fffrgb(215,95,255)hsl(285,100%,68%) +172Orange3#d78700rgb(215,135,0)hsl(7,100%,42%) +173LightSalmon3#d7875frgb(215,135,95)hsl(20,60%,60%) +174LightPink3#d78787rgb(215,135,135)hsl(0,50%,68%) +175Pink3#d787afrgb(215,135,175)hsl(330,50%,68%) +176Plum3#d787d7rgb(215,135,215)hsl(300,50%,68%) +177Violet#d787ffrgb(215,135,255)hsl(280,100%,76%) +178Gold3#d7af00rgb(215,175,0)hsl(8,100%,42%) +179LightGoldenrod3#d7af5frgb(215,175,95)hsl(40,60%,60%) +180Tan#d7af87rgb(215,175,135)hsl(30,50%,68%) +181MistyRose3#d7afafrgb(215,175,175)hsl(0,33%,76%) +182Thistle3#d7afd7rgb(215,175,215)hsl(300,33%,76%) +183Plum2#d7afffrgb(215,175,255)hsl(270,100%,84%) +184Yellow3#d7d700rgb(215,215,0)hsl(60,100%,42%) +185Khaki3#d7d75frgb(215,215,95)hsl(60,60%,60%) +186LightGoldenrod2#d7d787rgb(215,215,135)hsl(60,50%,68%) +187LightYellow3#d7d7afrgb(215,215,175)hsl(60,33%,76%) +188Grey84#d7d7d7rgb(215,215,215)hsl(0,0%,84%) +189LightSteelBlue1#d7d7ffrgb(215,215,255)hsl(240,100%,92%) +190Yellow2#d7ff00rgb(215,255,0)hsl(9,100%,50%) +191DarkOliveGreen1#d7ff5frgb(215,255,95)hsl(75,100%,68%) +192DarkOliveGreen1#d7ff87rgb(215,255,135)hsl(80,100%,76%) +193DarkSeaGreen1#d7ffafrgb(215,255,175)hsl(90,100%,84%) +194Honeydew2#d7ffd7rgb(215,255,215)hsl(120,100%,92%) +195LightCyan1#d7ffffrgb(215,255,255)hsl(180,100%,92%) +196Red1#ff0000rgb(255,0,0)hsl(0,100%,50%) +197DeepPink2#ff005frgb(255,0,95)hsl(37,100%,50%) +198DeepPink1#ff0087rgb(255,0,135)hsl(28,100%,50%) +199DeepPink1#ff00afrgb(255,0,175)hsl(18,100%,50%) +200Magenta2#ff00d7rgb(255,0,215)hsl(09,100%,50%) +201Magenta1#ff00ffrgb(255,0,255)hsl(300,100%,50%) +202OrangeRed1#ff5f00rgb(255,95,0)hsl(2,100%,50%) +203IndianRed1#ff5f5frgb(255,95,95)hsl(0,100%,68%) +204IndianRed1#ff5f87rgb(255,95,135)hsl(345,100%,68%) +205HotPink#ff5fafrgb(255,95,175)hsl(330,100%,68%) +206HotPink#ff5fd7rgb(255,95,215)hsl(315,100%,68%) +207MediumOrchid1#ff5fffrgb(255,95,255)hsl(300,100%,68%) +208DarkOrange#ff8700rgb(255,135,0)hsl(1,100%,50%) +209Salmon1#ff875frgb(255,135,95)hsl(15,100%,68%) +210LightCoral#ff8787rgb(255,135,135)hsl(0,100%,76%) +211PaleVioletRed1#ff87afrgb(255,135,175)hsl(340,100%,76%) +212Orchid2#ff87d7rgb(255,135,215)hsl(320,100%,76%) +213Orchid1#ff87ffrgb(255,135,255)hsl(300,100%,76%) +214Orange1#ffaf00rgb(255,175,0)hsl(1,100%,50%) +215SandyBrown#ffaf5frgb(255,175,95)hsl(30,100%,68%) +216LightSalmon1#ffaf87rgb(255,175,135)hsl(20,100%,76%) +217LightPink1#ffafafrgb(255,175,175)hsl(0,100%,84%) +218Pink1#ffafd7rgb(255,175,215)hsl(330,100%,84%) +219Plum1#ffafffrgb(255,175,255)hsl(300,100%,84%) +220Gold1#ffd700rgb(255,215,0)hsl(0,100%,50%) +221LightGoldenrod2#ffd75frgb(255,215,95)hsl(45,100%,68%) +222LightGoldenrod2#ffd787rgb(255,215,135)hsl(40,100%,76%) +223NavajoWhite1#ffd7afrgb(255,215,175)hsl(30,100%,84%) +224MistyRose1#ffd7d7rgb(255,215,215)hsl(0,100%,92%) +225Thistle1#ffd7ffrgb(255,215,255)hsl(300,100%,92%) +226Yellow1#ffff00rgb(255,255,0)hsl(60,100%,50%) +227LightGoldenrod1#ffff5frgb(255,255,95)hsl(60,100%,68%) +228Khaki1#ffff87rgb(255,255,135)hsl(60,100%,76%) +229Wheat1#ffffafrgb(255,255,175)hsl(60,100%,84%) +230Cornsilk1#ffffd7rgb(255,255,215)hsl(60,100%,92%) +231Grey100#ffffffrgb(255,255,255)hsl(0,0%,100%) +232Grey3#080808rgb(8,8,8)hsl(0,0%,3%) +233Grey7#121212rgb(18,18,18)hsl(0,0%,7%) +234Grey11#1c1c1crgb(28,28,28)hsl(0,0%,10%) +235Grey15#262626rgb(38,38,38)hsl(0,0%,14%) +236Grey19#303030rgb(48,48,48)hsl(0,0%,18%) +237Grey23#3a3a3argb(58,58,58)hsl(0,0%,22%) +238Grey27#444444rgb(68,68,68)hsl(0,0%,26%) +239Grey30#4e4e4ergb(78,78,78)hsl(0,0%,30%) +240Grey35#585858rgb(88,88,88)hsl(0,0%,34%) +241Grey39#626262rgb(98,98,98)hsl(0,0%,37%) +242Grey42#6c6c6crgb(108,108,108)hsl(0,0%,40%) +243Grey46#767676rgb(118,118,118)hsl(0,0%,46%) +244Grey50#808080rgb(128,128,128)hsl(0,0%,50%) +245Grey54#8a8a8argb(138,138,138)hsl(0,0%,54%) +246Grey58#949494rgb(148,148,148)hsl(0,0%,58%) +247Grey62#9e9e9ergb(158,158,158)hsl(0,0%,61%) +248Grey66#a8a8a8rgb(168,168,168)hsl(0,0%,65%) +249Grey70#b2b2b2rgb(178,178,178)hsl(0,0%,69%) +250Grey74#bcbcbcrgb(188,188,188)hsl(0,0%,73%) +251Grey78#c6c6c6rgb(198,198,198)hsl(0,0%,77%) +252Grey82#d0d0d0rgb(208,208,208)hsl(0,0%,81%) +253Grey85#dadadargb(218,218,218)hsl(0,0%,85%) +254Grey89#e4e4e4rgb(228,228,228)hsl(0,0%,89%) +255Grey93#eeeeeergb(238,238,238)hsl(0,0%,93%) diff --git a/bin/kaminokumo b/bin/kaminokumo new file mode 120000 index 0000000..f116475 --- /dev/null +++ b/bin/kaminokumo @@ -0,0 +1 @@ +/home/devi/kaminokumo/kaminokumo \ No newline at end of file diff --git a/bin/leb128 b/bin/leb128 new file mode 100755 index 0000000..02a11e5 --- /dev/null +++ b/bin/leb128 @@ -0,0 +1,117 @@ +#!/bin/python3 + +import argparse +import code +import signal +import sys + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +def devibytes(val): + ret = [] + for byte in val.split(","): + ret.append(int(byte, 16)) + return bytes(ret) + + +def LEB128UnsignedDecode(bytelist): + result = 0 + shift = 0 + for byte in bytelist: + result |= (byte & 0x7f) << shift + if (byte & 0x80) == 0: + break + shift += 7 + return(result) + + +def LEB128SignedDecode(bytelist): + result = 0 + shift = 0 + for byte in bytelist: + result |= (byte & 0x7f) << shift + last_byte = byte + shift += 7 + if (byte & 0x80) == 0: + break + if last_byte & 0x40: + result |= - (1 << shift) + return(result) + + +def LEB128UnsignedEncode(int_val): + if int_val < 0: + raise Exception("value must not be negative") + elif int_val == 0: + return bytes([0]) + byte_array = bytearray() + while int_val: + byte = int_val & 0x7f + byte_array.append(byte | 0x80) + int_val >>= 7 + byte_array[-1] ^= 0x80 + return(byte_array) + + +def LEB128SignedEncode(int_val): + byte_array = bytearray() + while True: + byte = int_val & 0x7f + byte_array.append(byte | 0x80) + int_val >>= 7 + if (int_val == 0 and byte & 0x40 == 0) or (int_val == -1 and byte & 0x40): + byte_array[-1] ^= 0x80 + break + return(byte_array) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--se", type=int, help="leb128 signed encode") + parser.add_argument("--ue", type=int, help="leb128 unsigned encode") + parser.add_argument( + "--sd", type=devibytes, help="leb128 signed decode. pass a string like ef1289.") + parser.add_argument( + "--ud", type=devibytes, help="leb128 unsigned decode. pass a string like ef1290") + self.args = parser.parse_args() + +# write code here + + +def premain(): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + argparser = Argparser() + # here + if argparser.args.se: + res = LEB128SignedEncode(argparser.args.se) + for byte in res: + print(format(byte, "02x"), end=" ") + print() + if argparser.args.ue: + res = LEB128UnsignedEncode(argparser.args.ue) + for byte in res: + print(format(byte, "02x"), end=" ") + print() + if argparser.args.sd: + print(LEB128SignedDecode(argparser.args.sd)) + if argparser.args.ud: + print(LEB128UnsignedDecode(argparser.args.ud)) + + +def main(): + try: + premain() + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="LEB128 DEBUG REPL") + + +if __name__ == "__main__": + main() diff --git a/bin/llvm-wasm b/bin/llvm-wasm new file mode 100755 index 0000000..a1d0cfd --- /dev/null +++ b/bin/llvm-wasm @@ -0,0 +1,10 @@ +#!/bin/bash + +fullname=$1 +namelength=${#fullname} +offset=$((${#fullname} - 2)) +filename=${fullname:0:$offset} +"clang" -emit-llvm --target=wasm32 -Oz "$1" -c +"llc" -asm-verbose=false -o $filename.s $filename.bc +"s2wasm" $filename.s > $filename.wast +"wast2wasm" $filename.wast -o $filename.wasm diff --git a/bin/lorem-ipsum b/bin/lorem-ipsum new file mode 100755 index 0000000..e6ff643 --- /dev/null +++ b/bin/lorem-ipsum @@ -0,0 +1,9 @@ +#!/usr/bin/env perl + +use Text::Lorem; + +my $text = Text::Lorem->new(); +$paragraphs = $text->paragraphs(10); + +print $paragraphs; +print "\n"; diff --git a/bin/manga_dmenu.sh b/bin/manga_dmenu.sh new file mode 100755 index 0000000..436968b --- /dev/null +++ b/bin/manga_dmenu.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh +# until kaminokumo --manga; do done | dmenu -nhb "dark slate gray" -nhf white -shb "forest green" -shf white -l 12 -p "Manga List:" > /dev/null +source ~/scripts/zshrc_stripped.sh +until kaminokumo --manga; do done | dmenu -p "Manga List:" > /dev/null + diff --git a/bin/mushi b/bin/mushi new file mode 120000 index 0000000..40079cb --- /dev/null +++ b/bin/mushi @@ -0,0 +1 @@ +../mushi.py \ No newline at end of file diff --git a/bin/postit.sh b/bin/postit.sh new file mode 100755 index 0000000..d0556a8 --- /dev/null +++ b/bin/postit.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +POSTIT=$(cat ~/devi/abbatoir/postit | dmenu -l 20 -p "Select Postit:") +echo -n "${POSTIT:0:${#POSTIT}}" | xsel -ip diff --git a/bin/ramdump b/bin/ramdump new file mode 120000 index 0000000..7fe85cf --- /dev/null +++ b/bin/ramdump @@ -0,0 +1 @@ +/home/bloodstalker/extra/MemDump/ramdump \ No newline at end of file diff --git a/bin/run_with_dmenu.sh b/bin/run_with_dmenu.sh new file mode 100755 index 0000000..c7bf9dd --- /dev/null +++ b/bin/run_with_dmenu.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +# set -o pipefail +source ~/scripts/zshrc_stripped.sh +COMMAND=$(echo "" | dmenu -h 20 -p "Quick Term:") +RESULT=$(eval "$COMMAND") +echo $RESULT | dmenu -h 20 -p "Quick Term Out:" > /dev/null diff --git a/bin/sniff b/bin/sniff new file mode 100755 index 0000000..3ecf3f4 --- /dev/null +++ b/bin/sniff @@ -0,0 +1,105 @@ +#!/usr/bin/python3 + +import argparse +import code +import signal +import sys +import re +from requests import get +from requests.exceptions import RequestException +from contextlib import closing +from bs4 import BeautifulSoup + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +def simple_get(url): + try: + with closing(get(url, stream=True)) as resp: + if is_good_response(resp): + return resp.content + else: + return None + except RequestException as e: + log_error("Error during requests to {0} : {1}".format(url, str(e))) + return None + + +def is_good_response(resp): + content_type = resp.headers['Content-Type'].lower() + return (resp.status_code == 200 and content_type is not None and content_type.find("html") > -1) + + +def log_error(e): + print(e) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--src", type=str, help="url") + parser.add_argument("--str", type=str, help="what string to look for") + parser.add_argument("--vid", action="store_true", + help="video", default=False) + parser.add_argument("--dbg", action="store_true", + help="debug", default=False) + parser.add_argument("--url", action="store_true", + help="url", default=False) + self.args = parser.parse_args() + + +VID_FMT = ["webm", "mpg", "mp2", "mpeg", "mpe", "mpv", "ogg", + "mp4", "m4p", "m4v", "flv", "avi", "wmv", "mkv", "svi"] +# write code here + + +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + # here + raw_ml = simple_get(argparser.args.src) + # print("raw html length is " + repr(len(raw_ml))) + ml = BeautifulSoup(raw_ml, "lxml") + ml_str = repr(ml) + tmp = open("/tmp/riecher", "w") + tmp.write(ml_str) + tmp.close() + tmp = open("/tmp/riecher", "r") + if argparser.args.src: + if argparser.args.vid: + for line in tmp: + # hit = False + for elem in VID_FMT: + if line.find("."+elem) > -1: + print(line) + # hit = True + if argparser.args.url: + dump_list = [] + for line in tmp: + dummy = re.findall( + 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', line) + dump_list += dummy + for elem in dump_list: + print(elem) + + tmp.close() + + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + + +if __name__ == "__main__": + main() -- cgit v1.2.3