Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests as r
- from requests.auth import HTTPBasicAuth as auth
- vst_hostname = 'https://188.188.188.88/api'
- vst_username = 'admin'
- vst_password = 'p4ssw0rd'
- vst_returncode = 'yes'
- vst_command = 'v-add-user'
- # New Account
- username = 'demo'
- password = 'd3m0p4ssw0rd'
- email = 'demo@gmail.com'
- package = 'default'
- fist_name = 'Rust'
- last_name = 'Cohle'
- # Prepare POST query
- postvars = {
- 'cmd': vst_command,
- 'arg1': username,
- 'arg2': password,
- 'arg3': email,
- 'arg4': package,
- 'arg5': fist_name,
- 'arg6': last_name
- }
- r.packages.urllib3.disable_warnings()
- req = r.post(vst_hostname, auth(vst_username, vst_hostname) , params=postvars, verify=False )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement