DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-02-09 09:44:10

tobyg
Member
Registered: 2007-01-31
Posts: 42

GoAhead server - where are the functions?

So I'm trying to find out what it actually runs 'behind the scenes'.

Looks like everything runs from this 'goform' directory, such as:

<form method="POST" action="/goform/remove_user" name="form2">

According to the documentation, 'goform' is actually functions compiled directly into the source and not run externally.  You define them with the 'websFormDefine" function.

Well, I can't find them.  The source for umui.c contains a few... but not the ones that the dlink seems to use:

umui.c: websFormDefine(T("AddUser"), formAddUser);
umui.c: websFormDefine(T("DeleteUser"), formDeleteUser);
umui.c: websFormDefine(T("DisplayUser"), formDisplayUser);
umui.c: websFormDefine(T("AddGroup"), formAddGroup);
umui.c: websFormDefine(T("DeleteGroup"), formDeleteGroup);
umui.c: websFormDefine(T("AddAccessLimit"), formAddAccessLimit);
umui.c: websFormDefine(T("DeleteAccessLimit"), formDeleteAccessLimit);
umui.c: websFormDefine(T("SaveUserManagement"), formSaveUserManagement);
umui.c: websFormDefine(T("LoadUserManagement"), formLoadUserManagement);

Looks like dlink didn't include the source they added for these 'goform' things.

Anyone?  Am I off base?  I'm not sure if they are even required to add their custom functions into the GPL'ed source they distribute.

This sucks because it means we will have a much harder time modifying the web interface if its actually buried in the 'webs' executable.  We may have to rewrite our own interface entirely.

Offline

 

#2 2007-02-09 09:52:12

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: GoAhead server - where are the functions?

I am not sure that GoAhead is GPL http://216.211.138.77/webserver/license.htm
And yes, D-Link has stripped off pretty much all their own code from GoAhead tarball.

At very first D-Link did have full GoAhead source (with all functions) uploaded to their site for DSM-G600 but this one was still not compilable because of missing upnp headers.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#3 2007-02-09 12:52:06

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: GoAhead server - where are the functions?

If you do a strings on the webs binary I get the impression that all these functions are compiled into the binary. I.e you will not find any separate files on the DNS.

Here is a sample of commands the webs contains for setting up the disks:

Code:

web/tools/format_disk_result_buf.asp
format_ide /dev/sdb %s %s 0 %d
format_ide /dev/sda %s %s 0 %d
format_ide /dev/all %s %s 0 %d
/etc/hotplug/sataumount
format_ide %s %s %s 1 %d
/tmp/format_result_a
/tmp/format_result_b
/tmp/raidtab2web_HD_a2
normal
Stop
touch /sys/mtd1/pls_sync
touch /sys/mtd1/pls_chmod_%s
eve test - buf:%s
eve test - buf:%d
mount -t minix /dev/mtdblock1 /sys/mtd2
touch /sys/mtd2/pls_sync
umount /sys/mtd2

Offline

 

#4 2007-02-09 14:45:01

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: GoAhead server - where are the functions?

magore said in an earlier post something about symlinks into ram:

http://dns323.kood.org/forum/p698-20070 … .html#p698

Worth checking.... /Apan

Offline

 

#5 2007-02-09 15:37:02

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: GoAhead server - where are the functions?

There's nothing to check, as said previously all functions is compiled in webs binary, .asp pages are just regular html + java script. If you you like to just change the look, then you can do it, but if you want to add a feature or add some hack then you are out of luck.

Here are one example what you can do with custom asp files:
http://www2.planet.ee/files/2007-01-05/thumb_admin-preview.jpg


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#6 2007-02-09 16:52:46

tobyg
Member
Registered: 2007-01-31
Posts: 42

Re: GoAhead server - where are the functions?

ASP files do me no good.  I want to modify functionality so I can possibly upgrade to Samba 3.x and tie into Active Directory authentication.  I can still probably do it, I'd just have to not use the web interface provided by dlink for that then.

So are they not supposed to provide the modified code compiled into goahead?

Edit:
I think I found my answer.
http://216.211.138.77/webserver/licensefaq.htm#10
How can I make private extensions to the Web server without having to share my design or intellectual property with the whole world?
If you want to make private extensions, without having to share them with the GoAhead WebServer community, put your changes in a new file, rather that in an existing code file.   (Any changes to the existing code must be submitted to GoAhead.)

This explains the missing LINUX/custom.h when attempting to compile goahead!

So we're on our own here.

Last edited by tobyg (2007-02-09 17:34:06)

Offline

 

#7 2007-02-09 17:40:13

KRH
Member
From: Denmark
Registered: 2006-10-27
Posts: 219
Website

Re: GoAhead server - where are the functions?

i go for building i new http whit some cgi/php interface.


First user to fun_plug the dns-323.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB