Approver, Staff, Administrators
7
edits
(Created page with "{{Page WIP}} Wupclient is a python tool used to connect to wupserver. It was originally part of smealum's [https://github.com/smealum/iosuhax iosuhax]. ==Setup== ===What you need=== * The latest release of [https://www.python.org/downloads/ Python]. * The [https://gist.githubusercontent.com/GaryOderNichts/409672b1bd5627b9dc506fe0f812ec9e/raw/213854879ca62a0f02e3d48a54aef3a83d592464/wupclient.py wupclient.py] (Right-Click → Save As... → Save the...") |
(Document more functions) |
||
Line 18: | Line 18: | ||
===Wupclient functions=== | ===Wupclient functions=== | ||
The functions listed below are part of the wupclient class and can be called using the wupclient instance called <code>w</code>. | The functions listed below are part of the wupclient class and can be called using the wupclient instance called <code>w</code>. | ||
====cd - Change working directory==== | |||
Changes the current working directory. | |||
cd(path) | |||
'''path''': A relative or absolute path which will become the working directory | |||
Prints 0 to the Terminal on success | |||
Usage example: | |||
w.cd("usr") | |||
w.cd("/vol/storage_mlc01") | |||
====dl - Download files from the console==== | |||
dl(filename, directorypath, local_filename) | |||
'''filename''': Relative or absolute path to the file which should be downloaded from the Wii U | |||
'''''directorypath''''': Optional path on the PC where the file should be stored in. If unspecified the current directory where wupclient was started in will be used. The directory will be created if it doesn't exist yet. | |||
'''''local_filename''''': Optional filename of the file that will be created on the PC. If unspecified the original filename will be used. | |||
Prints the number of transferred bytes in hexadecimal representation after transfer was completed. | |||
Usage example: | |||
w.dl("/vol/system/config/system.xml") | |||
w.dl("/vol/system/config/system.xml", "dumps") | |||
w.dl("/vol/system/config/system.xml", "dumps", "backup.xml") | |||
====dump_syslog - Output the current system log==== | ====dump_syslog - Output the current system log==== | ||
Prints the current system log since boot to the Terminal. | |||
Usage example: | Usage example: | ||
w.dump_syslog() | w.dump_syslog() | ||
====ls - List files and folders==== | |||
ls(path, return_data) | |||
'''''path''''': Optional relative or absolute path. If not specified the current working directory will be used. | |||
'''''return_data''''': Optional bool. Set to ''True'', if the raw data returned by ''FSA_ReadDir'' should be printed as well. | |||
Usage example: | |||
w.ls() | |||
w.ls("/vol/system") | |||
w.ls("usr") | |||
====up - Upload files to the console==== | |||
up(local_filename, filename) | |||
'''local_filename''': Relative or absolute path to a file on the PC | |||
'''''filename''''': Relative or absolute path of the file created on the Wii U. If unspecified the original filename on the PC and current working directory will be used. | |||
Usage example: | |||
w.up("test.txt") | |||
w.up("test.txt", "/vol/storage_sdcard/test.txt") | |||
===Utility functions=== | ===Utility functions=== |