gaddman / RG-fun

Messing around with residential gateways (home routers)
8 stars 0 forks source link

any idea about using the upnp protocol ? #1

Open minanagehsalalma opened 4 years ago

minanagehsalalma commented 4 years ago

i have extracted the xml files from the firmware too ... what's next ?

gaddman commented 4 years ago

Depends what you want to do. It's an alternative to the web interface to configure stuff, so can be useful for automation.

minanagehsalalma commented 4 years ago

Depends what you want to do. It's an alternative to the web interface to configure stuff, so can be useful for automation.

@gaddman hmm...so let's say i want to enable the guest network (ssid 2) with password of 12345678 ... what would the command be ? Also can it be used to show info instead of changing them ? Thanks again :)

gaddman commented 4 years ago

It's been ages since I actually did anything with UPnP, will have to see if I've got any notes.

I don't think this supports adding guest network, but you can do other stuff like set or get your DNS servers. See here: https://gaddman.github.io/RG-fun/HG659-TR064.html.

gaddman commented 4 years ago

Take a look at https://github.com/tenable/upnp_info, I think that's what I was using to interrogate things.

minanagehsalalma commented 4 years ago

I don't think this supports adding guest network

@gaddman i have looked at that wlan xml file and it gave me a headache! (Where is the catalogue of this thing !)

Here is what i found "NewPreSharedKeyIndex"

Which means you can enable guest network i think by selecting index 2

And "GetPreSharedKey

" Which means that we can get info too not just change them. What i can't figure out is should i edit the whole config file before sending it using curl or whatever or just edit the part i want ? And why you did mention tr064 ? Isn't that a different thing than upnp and requires authentication too ? (A unique Usename and password set by the isp for each device ) and shouldn't it be on a different port something like 7547 ?
minanagehsalalma commented 4 years ago

Take a look at https://github.com/tenable/upnp_info, I think that's what I was using to interrogate things.

Sounds interesting i would be testing it soon ... hope it works on windows with no problems..

Thanks for your replies mate :)

minanagehsalalma commented 4 years ago

@gaddman tried it just great but it doesn't show all the files image and what's next how do i use the commands under the api as the photo ?