Compare commits

...

2 Commits

Author SHA1 Message Date
PC-Admin
adc32b2b27 add debug line 2023-08-18 21:31:53 +08:00
PC-Admin
56373d68db docs update 2023-08-18 20:48:46 +08:00
4 changed files with 78 additions and 36 deletions

View File

@ -131,8 +131,11 @@ You can send this .zip file and password when reporting a user to law enforcemen
To do:
1) Add the following functions:
- https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#find-a-user-based-on-their-id-in-an-auth-provider
- https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#find-a-user-based-on-their-third-party-id-threepid-or-3pid
- https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#find-a-user-based-on-their-third-party-id-threepid-or-3pid - DONE
- https://github.com/matrix-org/synapse/blob/master/docs/admin_api/delete_group.md
- https://matrix-org.github.io/synapse/v1.38/admin_api/rooms.html#make-room-admin-api
- https://matrix-org.github.io/synapse/latest/admin_api/server_notices.html
https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/federation.html#destination-rooms
2) Add fully automated (should just return a web link and decryption password) reporting functions for users:
- Description of why the report was made (what happened), include key information
- Any other usernames associated with that IP

View File

@ -2,63 +2,101 @@
#### Room Commands ####
50) **List details of a room.**
- Shows comprehensive information about a specific room.
> Shows comprehensive information about a specific room.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#room-details-api
51) **List the members of a room.**
- Displays all the members who are part of a particular room.
> Displays all the members who are part of a particular room.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#room-members-api
52) **Export the state events of a room.**
- Retrieves and saves the state events (such as topic changes, member joins) of a specific room.
> Retrieves and saves the state events (such as topic changes, member joins) of a specific room.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#room-state-api
53) **Export the state events of multiple rooms.**
- Gathers and saves the state events from several rooms simultaneously.
> Gathers and saves the state events from several rooms simultaneously.
54) **List rooms in public directory.**
- Displays all the rooms that are publicly available and listed in the directory.
> Displays all the rooms that are publicly available and listed in the directory.
https://spec.matrix.org/legacy/client_server/r0.6.0.html#get-matrix-client-r0-publicrooms
55) **Remove a room from the public directory.**
- Takes a specific room off the public directory, making it less accessible to users browsing the directory.
> Takes a specific room off the public directory, making it less accessible to users browsing the directory.
56) **Remove multiple rooms from the public directory.**
- Removes several rooms from the public directory at once.
> Removes several rooms from the public directory at once.
57) **Redact a room event.**
- Conceals specific events in a room, such as messages or media, from being visible.
> Conceals specific events in a room, such as messages or media, from being visible.
58) **List/Download all media in a room.**
- Displays and offers the option to download all media files shared in a specific room.
> Displays and offers the option to download all media files shared in a specific room.
https://matrix-org.github.io/synapse/latest/admin_api/media_admin_api.html#list-all-media-in-a-room
59) **Download media from multiple rooms.**
- Enables downloading of media files shared across several rooms.
> Enables downloading of media files shared across several rooms.
60) **Quarantine all media in a room.**
- Isolates and restricts access to all media files in a specific room, usually due to concerns over inappropriate content.
> Isolates and restricts access to all media files in a specific room, usually due to concerns over inappropriate content.
https://matrix-org.github.io/synapse/latest/admin_api/media_admin_api.html#quarantining-media-in-a-room
61) **Shutdown a room.**
- Terminates a room, preventing further activities or messages in it.
> Terminates a room, preventing further activities or messages in it.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#version-2-new-version
62) **Shutdown multiple rooms.**
- Closes several rooms simultaneously, halting any ongoing activity in them.
> Closes several rooms simultaneously, halting any ongoing activity in them.
63) **Delete a room.**
- Permanently removes a room and all its content.
> Permanently removes a room and all its content.
64) **Delete multiple rooms.**
- Erases several rooms and their content from the server at once.
> Erases several rooms and their content from the server at once.
65) **Purge the event history of a room to a specific timestamp.**
- Deletes all events in a room up to a certain point in time, preserving events after that timestamp.
> Deletes all events in a room up to a certain point in time, preserving events after that timestamp.
66) **Purge the event history of multiple rooms to a specific timestamp.**
- Clears the events in several rooms up to a specified timestamp.
> Clears the events in several rooms up to a specified timestamp.
67) **Get blocked status for room.**
- Checks if a room is blocked and restricted from user access.
> Checks if a room is blocked and restricted from user access.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#get-block-status
68) **Block a room.**
- Restricts access to a room, preventing users from joining or interacting in it.
> Restricts access to a room, preventing users from joining or interacting in it.
https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#block-or-unblock-a-room
69) **Unblock a room.**
- Restores access to a previously blocked room, allowing users to join and participate once more.
> **Note:** Managing rooms is a sensitive operation, especially when dealing with content and user privacy. Ensure you have the required permissions and handle operations with care.
> Restores access to a previously blocked room, allowing users to join and participate once more.
**Note:** Managing rooms is a sensitive operation, especially when dealing with content and user privacy. Ensure you have the required permissions and handle operations with care.

View File

@ -5,7 +5,7 @@
> This function disables a specific user's account, making it unusable for the owner.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#deactivate-account
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#deactivate-account
2) **Deactivate multiple user accounts.**
@ -15,7 +15,7 @@
> Use this to generate a new user account.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#create-or-modify-account
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account
4) **Create multiple user accounts.**
@ -25,13 +25,13 @@
> If a user forgets their password, this function helps set a new one.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#reset-password
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#reset-password
6) **Whois user account.**
> Provides detailed information about a specific user's account.
> This API returns information about the active sessions for a specific user.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#query-current-sessions-for-a-user
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#query-current-sessions-for-a-user
7) **Whois multiple user accounts.**
@ -41,7 +41,7 @@
> Allows you to get specific details or attributes of a user account.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#query-user-account
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#query-user-account
9) **Query multiple user accounts.**
@ -51,13 +51,13 @@
> Displays the list of rooms that a user is a part of.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#list-room-memberships-of-a-user
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#list-room-memberships-of-a-user
11) **Promote a user to server admin.**
> Elevates a user's privileges, making them an administrator on the server.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#change-whether-a-user-is-a-server-administrator-or-not
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#change-whether-a-user-is-a-server-administrator-or-not
12) **List all user accounts.**
@ -69,7 +69,7 @@
> This API quarantines all local media that a local user has uploaded. That is to say, if you would like to quarantine media uploaded by a user on a remote homeserver, you should instead use one of the other APIs. Useful for potential harmful or inappropriate content.
https://matrix-org.github.io/synapse/v1.40/admin_api/media_admin_api.html#quarantining-all-media-of-a-user
https://matrix-org.github.io/synapse/latest/admin_api/media_admin_api.html#quarantining-all-media-of-a-user
14) **Collect account data.**
@ -79,25 +79,25 @@
> Shows devices and services that have push access to a user's account.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#list-all-pushers
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#list-all-pushers
16) **Get rate limit of a user account.**
> Displays the frequency at which a user can make requests or actions.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#get-status-of-ratelimit
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#get-status-of-ratelimit
17) **Set rate limit of a user account.**
> Adjusts the frequency rate at which a user can make requests or actions.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#set-ratelimit
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#set-ratelimit
18) **Delete rate limit of a user account.**
> Removes any rate limits set on a user's account, granting them unrestricted action frequency.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#delete-ratelimit
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#delete-ratelimit
19) **Check if user account exists.**
@ -109,7 +109,7 @@
> Shadow-banning a user should be used as a tool of last resort and may lead to confusing or broken behaviour for the client. A shadow-banned user will not receive any notification and it is generally more appropriate to ban or kick abusive users. A shadow-banned user will be unable to contact anyone on the server.
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#shadow-banning-users
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#controlling-whether-a-user-is-shadow-banned
21) **Find a user by their 3PID (Third-party ID).**

View File

@ -258,6 +258,7 @@ def lookup_homeserver_admin(preset_baseurl):
# If the request was successful, the status code will be 200
if response.status_code == 200 and ( "email_address" in response.text or "matrix_id" in response.text ):
# Parse the response as JSON
print(response.text)
data = json.loads(response.text)
#print("\nAdmin contact details for " + baseurl + " are: " + str(data))