dbm.error: db type could not be determined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ibrahim90000
    New Member
    • Nov 2022
    • 1

    dbm.error: db type could not be determined

    Hello Friends, I have this python code i created with python shelve but it keeps giving me errors all of the time.

    Here is the code:

    import httplib2
    import shelve

    url = input("Enter the target's Url: ")
    url_1 = url.replace("ht tp://", "")
    url_2 = url_1.replace("/", "")
    s = shelve.open("an on.db", writeback=True)

    for u in s["php"]:
    a = "/"
    url_n = url_2 + a + u
    print (url_n)
    http_r = httplib2.HTTPCo nnection(url_2)
    u = a + u
    http_r.request( "GET", u)
    reply = http_r.getrespo nse()

    if reply.status == 200:
    print ("\n URL found ----- ", url_n)
    ch = input("Press c for continue: ")
    continue
    else:
    break
    s.close()

    And this is the Error it gives:

    Enter the target's Url: http://xxx.xxx.xx.xxx/vuln_login/
    Traceback (most recent call last):
    File "login_page.py" , line 7, in <module>
    s = shelve.open("an on.db", writeback=True)
    File "Z:\Python37\li b\shelve.py", line 243, in open
    return DbfilenameShelf (filename, flag, protocol, writeback)
    File "Z:\Python37\li b\shelve.py", line 227, in __init__
    Shelf.__init__( self, dbm.open(filena me, flag), protocol, writeback)
    File "C:\Python37\li b\dbm\__init__. py", line 88, in open
    raise error[0]("db type could not be determined")
    dbm.error: db type could not be determined

    Please, if there is a much better solution to this issue, i will gladly appreciate it. Thank you
Working...