Tree @master (Download .tar.gz)
- ..
- _Footer.md
- _Sidebar.md
- Admin-Functionality.md
- Agents.md
- Architecture.md
- Code-Execution.md
- Collection.md
- Configuration.md
- Credentials.md
- Exfiltration.md
- Exploitation.md
- Getting-Credentials.md
- Home.md
- Installation.md
- Lateral-Movement.md
- Listeners.md
- Management.md
- Module-Development.md
- Modules.md
- Persistence.md
- Privesc.md
- Quickstart.md
- Recon.md
- Reporting.md
- RESTful-API.md
- Situational-Awareness.md
- Stagers.md
- Staging.md
- TrollSploit.md
- User-Management.md
User-Management.md @master — view markup · raw · history · blame
Display All Users
Handler
- Handler : GET /api/users
- Description : Returns all users from database
- No parameters
Example
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/users?token=oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle
Response:
{
"users": [
{
"ID": 1,
"admin": true,
"enabled": true,
"last_logon_time": "2020-03-21 18:57:36",
"username": "empireadmin"
}
]
}
Current User
Handler
- Handler : POST /api/users/me
- Description : Returns the current user
- No parameters
Example
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/users/me?token=oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle -X POST
Response:
{
"admin": true,
"api_token": "oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle",
"enabled": true,
"id": 1,
"last_logon_time": "2020-03-21 18:57:36",
"username": "empireadmin"
}
Create New User
Handler
- Handler : POST /api/users
- Description : Creates a new users.
- No parameters
Example
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/users?token=oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle -X POST -d '{"username":"user", "password":"pass"}'
Response:
{
"admin": true,
"api_token": "oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle",
"enabled": true,
"id": 1,
"last_logon_time": "2020-03-21 18:57:36",
"username": "empireadmin"
}
Disable User
Handler
- Handler : PUT /api/users/UID/disable
- Description : Disables a users account from their UID.
- No parameters
Example
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/users/1/disable?token=oa2vqer0si0rhehvwgvg3ncgec06hlb5ts58hmle -X PUT
Response:
{
"success": true,
}