Python Forum
Excel password recovery tool for work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel password recovery tool for work
#1
Hi,

I am new to this forum and have only posted one other post but i am working on a few codes at once, I am still not sure whether I am completing these new forum thread correctly.

Below I have been working on a Excel password recovery tool for work as we have had a few occasions where project managers have password protected excels and then forgot the password and they have lost weeks of work because of this. I am trying to be proactive and help as I am the one who pulls the date for them and it is a pain having to run queries over and over.

The code below works but only seems to work on small wordlists, bigger wordlist like rockyou.txt it falls over and just accepts for first password.

I am not getting any errors it just shows:

[+] Password Found: 123456789 ------ which is the first password in the list.


from pip._vendor.distlib.compat import raw_input
from win32com.client import Dispatch

file = raw_input('[+] Excel to attack: ')
wordlist = raw_input('[+] Wordlist: ')

word = open(wordlist, 'r', encoding='utf8', errors='ignore')
passlist = word.readlines()
word.close()

for password in passlist:
    password = password.strip()
    print ("[-] Password attempt: "+password)
    instance = Dispatch('Excel.Application') 

    try:
        instance.Workbooks.Open(file, False, True, None, password)
        print ("[+] Password Found: "+password)
        break

    except:
        pass
Reply


Messages In This Thread
Excel password recovery tool for work - by OTH - Aug-06-2020, 02:29 PM
RE: Excel password recovery tool for work - by OTH - Aug-06-2020, 02:52 PM
RE: Excel password recovery tool for work - by OTH - Mar-08-2021, 08:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  OS module and file/directory recovery hikerguy62 1 2,188 Aug-02-2019, 06:42 AM
Last Post: Gribouillis
  Reading data from password protected excel Anirudh_Avantsa 2 22,352 Apr-04-2018, 03:26 PM
Last Post: nilamo
  Strings read from excel don't work? Tibas 0 2,421 Mar-06-2018, 10:37 PM
Last Post: Tibas
  simplify my excel work on python CodeAyoub 1 2,950 Oct-08-2017, 12:09 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020