Skip to content

Instantly share code, notes, and snippets.

@icefire
Created July 1, 2009 05:23
Show Gist options
  • Save icefire/138602 to your computer and use it in GitHub Desktop.
Save icefire/138602 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use HTTP::Request;
# Message ID
my $msg_id = "13198105123219138";
# Device ID
my $dev_id = "4362227770";
# Attribute (setting it to 0 and 1 is 'default', 2 gives more results)
my $attr = 2;
my $ua = LWP::UserAgent->new(agent => "wii libnup/1.0");
my $soap = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetSystemUpdateRequest xmlns="urn:nus.wsapi.broadon.com">
<Version>1.0</Version>
<MessageId>' . $msg_id . '</MessageId>
<DeviceId>' . $dev_id . '</DeviceId>
<RegionId>USA</RegionId>
<CountryCode>US</CountryCode>
<TitleVersion>
<TitleId>0000000100000001</TitleId>
<Version>2</Version>
</TitleVersion>
<TitleVersion>
<TitleId>0000000100000002</TitleId>
<Version>33</Version>
</TitleVersion>
<TitleVersion>
<TitleId>0000000100000009</TitleId>
<Version>516</Version>
</TitleVersion>
<Attribute>' . $attr . '</Attribute>
<AuditData></AuditData>
</GetSystemUpdateRequest>
</soapenv:Body>
</soapenv:Envelope>';
print "[x] Sending request ...\n";
my $req = HTTP::Request->new(POST => 'http://nus.shop.wii.com:80/nus/services/NetUpdateSOAP');
$req->header(SOAPAction => '"urn:nus.wsapi.broadon.com/"');
$req->content($soap);
$req->content_type("text/xml; charset=utf-8");
my $resp = $ua->request($req);
if ($resp->code == 200)
{
print $resp->as_string;
}
else
{
print $resp->error_as_HTML;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment