A Python script to extract the list of users of a GiTea instance, unauthenticated or authenticated.
- Dump all users of a remote GiTea instance, unauthenticated (misconfiguration of the instance).
- Dump all users of a remote GiTea instance, authenticated using
i_like_gitea
cookie in--cookie
option. - Export users and emails to a JSON file, specified by option
--outfile
.
$ ./gitea-extract-users.py -h
Dump GiTea users via /explore/users endpoint - v1.1 - by @podalirius_
usage: gitea-extract-users.py [-h] -t TARGET [-o OUTFILE] [-c COOKIE]
Dump GiTea users via /explore/users endpoint
options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
IP address or hostname of the GiTea to target.
-o OUTFILE, --outfile OUTFILE
Output JSON file of all the found users.
-c COOKIE, --cookie COOKIE
i_like_gitea cookie to dump users in authenticated mode.
{
"target": "https://git.podalirius.poc",
"users": [
{
"mail": "[email protected]",
"username": "Podalirius",
"fullname": "Podalirius Podalirius",
"joined": "Nov 05, 1605"
}
]
}