Axcrypt: axcrypt2john.py (how to use python)
#1
Still looking for
I think that I understand that Python is a programming software and that (https://raw.githubusercontent.com/magnum...pt2john.py) is a Python file and that ... I must be able to program with Python ... aie !!!
#2
I continue
I copied the text of what is here (https://raw.githubusercontent.com/magnum...pt2john.py) and I pasted it into a new file opened with Python and then I saved.
Then I did ... check module ... to see and the software told me there was a parenthesis error here: print "Be careful, GUID is different from axcrypt's one ...". I saw in a tutorial that from a certain version of Python, it was necessary to put parentheses therefore: print ("Be Careful, GUID is different from axcrypt's one ...").
I checked Module again and now it says Invalid token here:
If (header_datalen == 49 and headertype == 04): highlighting 04

>>> And there, I do not know at all what to do, someone would have an idea !!!
#3
By putting this search on Google: axcrypt lost password, i ended up falling on this page: https://github.com/magnumripper/JohnTheR...crypt&type=
There is the file you put in your explanation: axcrypt2john.py and there are many others, I do not know what they are used for?
But the file is the same, always this error that I do not know how to solve
#4
Well, I'm trying to continued
I removed the 04 and replaced with 4
check
> He says to me: missing parentheses in call to 'print', print "Could not parse file, exiting"
I put parentheses as before: print ("Could not parse file, exiting")
check
> He tells me: Invalid syntax, print axxfile with axxfile highlighted
I put quotation marks and parentheses: print ("axxfile")
> The file looks to run when I do run, but it says to me:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
====================== RESTART: D:\Temp\axcrypt2john.py ======================
Traceback (most recent call last):
File "D:\Temp\axcrypt2john.py", line 84, in <module>
usage()
File "D:\Temp\axcrypt2john.py", line 23, in usage
print >> sys.stderr, 'usage: %s <axxfile> [KEY-FILE]\n' % sys.argv[0]
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and 'PseudoOutputFile'
>>>

>>> And, I'm really blocked
#5
My guess is that you should just use the correct python version and therefore:
you do not need to change the .py file at all.

With "the correct" version of python it should work without problems.

I would guess that python 2.7 should work as expected.
#6
Well, will I try to see that?
I tried other things in between, I do not know if that's right. After searching, I used hashcat64.exe command line.
1) I used the Advanced Hash Calculator software, tried to find the hash of my .axx file.
2) The sequence of characters found d9edd06ff72be595727808225ccce597f79eefbe (the software does this with SHA-1), I put it in a text file, hash.txt
3) Then I made the following command line:
Hashcat64.exe -m13000 -a3 cracked.txt hash.txt -1? Abcdefghijklmnopqrstuvwxyz0123456789? 1? 1? 1? 1? 1 1
M13000 for Axcrypt, a3 for brute force, cracked.txt the file or must be copied my password, hash.txt with my hash and a mask for a 8 character password with lowercase or numbers.
> But it does not work hashfile is empty or corrupt. So I think I do not have the right hash !!!

But I think I'm beginning to understand, if I find the correct version of python (2.7), that I use it with this file https://raw.githubusercontent.com/magnum...pt2john.py, then I have to find the right hash, is that right?
#7
Aie, it's not wonderful!
I found Python 2.7.5, difficult to use for me, while command line unlike the newer version or there is a kind of notepad.
I copy and paste pt2john.py on the command line and barely pasted, the software closes and nothing happens ???
It's the same with python 2.7.13, 3.0.0 or 3.3.5
#8
I understand that it's not your day to day job to develop or run code, but you should at least try to do some research and think about it.

This is not that difficult at all. There are literally thousands of resources out there that teach you step by step how to run a python (.py) file. I mean, this is python and not some complicated assembly code. Python code can be run almost everywhere and by any device. Kids learn programming with python (well kids are good at learning stuff, I guess), but it tells us that this is actually as simple as it can be (it can't be more simple).

You do not need to copy paste anything. You do not need to change the files. You do not need to run notepad. You do not need to try different version of python (except 2.7, which is recommended and I already told you so). You do not need a file named pt2john.py (the correct one is called axcrypt2john.py). You do not need to use a "Hash Calculator" software...

Just download the fileĀ axcrypt2john.py , open the command shell (cmd.exe) and run this:
Code:
python axcrypt2john.py pathToTheAxxFile.axx
please replace pathToTheAxxFile.axx with the correct file name (just copy the file into the current directory such that you do not need to mess around with other directories and changing directories, I think windows allows you also to drag-and-drop the file paths, but don't make things more complicated than needed).

if you have some valid output (a correct hash), just run this command to output it to a file:
Code:
python axcrypt2john.py pathToTheAxxFile.axx > hash.txt

After that open the new file called hash.txt (in notepad.exe or any other text editor) and make sure that there are no file names within the file (the first line, there should only be one actually, is the "hash") , i.e. the format must be exactly like the example hash here: https://hashcat.net/wiki/doku.php?id=example_hashes (look for -m 13200). It must start with $axcrypt$*1* and must have the exact same number of fields (the fields that are separated by the star *).
Remove any file name within the hash and store the file.

after that just run hashcat:
Code:
hashcat -m 13200 -a 3 -2 ?l?d --increment -w 3 hash.txt ?2?2?2?2?2?2?2?2


BTW: this thread was splitted from https://hashcat.net/forum/thread-6609.html because the discussion was completely different from the original topic (it was all about "how do I use python" and had nothing to do with axcrypt and the original reported problem, we could call this also thread stealing, which is actually prohibited by the forum rules).

PS: I don't intend to (continue) holding hands here... you must at least show that you are trying to understand things, do some research and make some progress on your own. We are happy to help here, but hashcat is an advanced password recovery tool. The focus is on advanced. If you have literally no clue how to start a simple program (python program, hashcat or whatever) then you need to do some learning (it probably won't be a waste of your time, you will improve your knowledge about computers and/or programs/code etc) but you can't expect that we can give you a full tutorial on how to use a simple python script here because it is completely off-topic (after all, this is not a forum to discuss how to start a .py file).
#9
Oh ok !!! Ok thank you very much, I will look in another way now.
thanks again
Sorry for the inconvenience.