Skip to content

Commit

Permalink
QRCode module added
Browse files Browse the repository at this point in the history
  • Loading branch information
bhctsntrk committed May 3, 2018
1 parent 4b8ec50 commit c152fd3
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Installiation.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

sudo apt-get install git binwalk exiftool volatility python-pip python-pexpect wget
sudo apt-get install git binwalk exiftool volatility python-pip python-pexpect wget zbar-tools
git clone https://github.com/AUCyberClub/axion.git
cd axion
sudo pip install -r requirements.txt
Expand Down
4 changes: 4 additions & 0 deletions axion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from imports.base64_decoder import base64_decoder
from imports.bin_hex_dec_ascii import bin_hex_dec_ascii
from imports.rot13_caesar import rot13_caesar
from imports.qr_decoder import qr_decoder
from imports.volatility_info import volatility_info
from imports.volatility_notepad import volatility_notepad
from imports.volatility_pslist import volatility_pslist
Expand Down Expand Up @@ -104,6 +105,7 @@ def crypto():
colorprint("info", "8-->Base64 decoder")
colorprint("info", "10-->Bin,Hex,Dec and ASCII transformations")
colorprint("info", "11-->Caesar and ROT decrypter")
colorprint("info", "12-->QRCode Decoder")
colorprint("warn", "9-->Go back to the top menu")
colorprint("fatal", "0-->Quit")

Expand All @@ -129,6 +131,8 @@ def crypto():
bin_hex_dec_ascii()
elif choice == 11:
rot13_caesar()
elif choice == 12:
qr_decoder()
elif choice == 9:
main_menu()
elif choice == 0:
Expand Down
82 changes: 82 additions & 0 deletions imports/qr_decoder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from subprocess import Popen, PIPE, check_call
from colorama import Fore, Style
from ini_edit import config_get, config_set


def colorprint(verbosity, text):
if verbosity == "fatal":
print(Style.BRIGHT + Fore.RED + text + Style.RESET_ALL)
if verbosity == "warn":
print(Fore.YELLOW + text + Style.RESET_ALL)
if verbosity == "info":
print(Style.DIM + Fore.WHITE + text + Style.RESET_ALL)
if verbosity == "success":
print(Style.BRIGHT + Fore.GREEN + text + Style.RESET_ALL)


logo = ("""
_ __ _____ ___ _ _ _ _ _ ____ ____
/ \ \ \/ /_ _/ _ \| \ | | / \ | | | |/ ___/ ___|
/ _ \ \ / | | | | | \| |_____ / _ \| | | | | | |
/ ___ \ / \ | | |_| | |\ |_____/ ___ \ |_| | |__| |___
/_/ \_\/_/\_\___\___/|_| \_| /_/ \_\___/ \____\____|
""")


def qr_decoder():
while True:
check_call(["clear"])
print (logo)
colorprint("info", "The 'zbarimg' command will be used to decode QRCode")

path = config_get('paths', 'path')
if path == '':
colorprint("fatal", "\n\tOh, it seems there is no path stored before :(")
colorprint("fatal", "\n\tPlease specify one to continue:\n")

path = raw_input(
"Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n-->")

config_set('paths', 'path', path)
colorprint("info", "\nWell, we'll store this path for next operations...\n")

colorprint("success", "\n[*] Using " + path + "\n")
choice = raw_input(
Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower()

if choice == 'p':
path = raw_input(
"Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n--> New path: ")
config_set('paths', 'path', path)
colorprint("success", "\n[*] Using " + path + "\n")

std = Popen(["zbarimg", path], stdout=PIPE, stderr=PIPE)
(out, err) = std.communicate()

if out.find("No") == -1:
colorprint("success", out)
else:
colorprint("fatal", out)

if err:
colorprint("fatal", err)

colorprint("warn", "9-->Go back to the top menu")
colorprint("fatal", "0-->Quit")

choice = raw_input(
"Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n-->").lower()

if choice == "9":
return
elif choice == "0":
sys.exit()


if __name__ == "__main__":
qr_decoder()


0 comments on commit c152fd3

Please sign in to comment.