router-tools
router-tools copied to clipboard
about UPnP fun i am having a hard time getting the commands to work
i am trying to use the UPNP on my router but keeps giving me the 501 error
the command i am using
curl "192.168.1.1:52869/control/igd/devinfo" --header "SOAPAction: urn:dslforum-org:service:DeviceInfo:1#GetInfo" -vv -d @1.xml -H "Content-Type: text/xml;charset=utf-8"
the deviceinfo.xml that i got the information from ... and the IGD.xml that i got the SOAPAction from ... exactly this part
<serviceList>
<service>
<serviceType>urn:dslforum-org:service:DeviceInfo:1</serviceType>
<serviceId>DeviceInfo</serviceId>
<controlURL>/control/igd/devinfo</controlURL>
<eventSubURL>/event/igd/devinfo</eventSubURL>
<SCPDURL>/DeviceInfo.xml</SCPDURL>
from some unknown reason the only request that are working are these too from this tool
even thought the IGD.xml provides tons of options .. port forwarding and some wan options are the only ones available in the tool
the command that works
curl "192.168.1.1:52869/upnp/control/WANIPConn1" --header "SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" -vv -d @1.xml -H "Content-Type: text/xml;charset=utf-8"
the 1.xml file looks like this mostly a mix of the soap action and regular xml soap request.
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetExternalIPAddress xmlns:u=”urn:schemas-upnp-org:service:WANIPConnection:1″></u:GetExternalIPAddress></s:Body></s:Envelope>
i didn't even know where the tool got that url that is totally different from the ones in the igd.xml file so i searched the strings in the firmware files of the device and found a file called gatedesc.skl with only the two options that are in the image... how is that and where does the problem lie?