Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: Scooby on February 24, 2014, 11:58:47 AM

Title: Is findshares open source?
Post by: Scooby on February 24, 2014, 11:58:47 AM
I wanted to build findshares for arch linux X86_64
and wondered if it was open source?

if so were can it be obtained.
Title: Re: Is findshares open source?
Post by: gerald_clark on February 24, 2014, 12:02:18 PM
This is neither a findshares nor an arch linux forum.
Try google.
Title: Re: Is findshares open source?
Post by: Rich on February 24, 2014, 05:50:05 PM
Hi Scooby
Google won't help you. Findshares is something I wrote partly to learn programming in C and partly because I was not happy
with any of the programs available for performing these functions. Source code is attached.
Title: Re: Is findshares open source?
Post by: Scooby on February 25, 2014, 11:58:04 AM
much obliged Rich.

Thanks for creating and thanks for sharing
Title: Re: Is findshares open source?
Post by: Rich on February 25, 2014, 12:37:35 PM
Hi Scooby
You are welcome. Hope a 64 bit compile doesn't break it.
Title: Re: Is findshares open source?
Post by: Scooby on February 27, 2014, 12:18:08 PM
I got a lot of warnings about size of int
but otherwise compiled fine and seems to run OK

 ;D
Title: Re: Is findshares open source?
Post by: Rich on February 27, 2014, 06:12:11 PM
Hi Scooby
Glad it worked out for you. Just to satisfy my curiosity, if you get a chance, could you post a few examples of the warnings.
Title: Re: Is findshares open source?
Post by: curaga on February 28, 2014, 12:45:32 AM
findshares.c: In function 'Copy':
findshares.c:265: warning: cast from pointer to integer of different size
findshares.c:271: warning: cast from pointer to integer of different size
findshares.c:273: warning: cast from pointer to integer of different size
Title: Re: Is findshares open source?
Post by: Scooby on February 28, 2014, 10:28:49 AM
In attachement there is a file containing all the compilerwarnings

The first three could I just replace int with long?
(the ones curaga posted)


And the others, do you think they are harmless?
(Actually If i remove compiler optimization flag "-Os"
many of the warnings go away then I only have curagas three
and findshares.c:1055:6: warning: variable 's' set but not used
file size difference is 21K compared to 25K
)

also got an error from another user ( see full output below )

Error line 445

What does that mean? error opening tcp port 445?
To me it seems user got info anyway



Code: [Select]
root@alphaos ~]# findshares
findshares version 1.05 Aug 3, 2011
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 192.168.1.59 on wlan0

Error line 445
Samba/Windows Shares
--------------------------------------------------------------------------------
MSHOME
    RT-N66U          192.168.1.2       RT-N66U
   IPC$                           IPC Service (RT-N66U)


    DADS-MAC-MINI    192.168.1.10     

MSHOME
        xxxxx       192.168.1.55      Samba (xxxxx)
   media                          media
   removable_SDCARD               removable_media_SDCARD
   IPC$                           IPC Service (Samba (xxxxx))
Title: Re: Is findshares open source?
Post by: Rich on February 28, 2014, 12:29:11 PM
Hi Scooby
Code: [Select]
Error line 445That refers to line 445 in the source code. You will find:
Code: [Select]
return(__LINE__)throughout the source code. When a strategy fails, the program reports where the failure occurred and move on to the
next machine. In this particular case, it tried to connect to port 445. When that failed, it tried port 139 which also failed, so
it reported the error and resumed scanning. Some machine was blocking access to those ports.
Code: [Select]
c:1055:6: warning: variable 's' set but not usedHarmless. Some variable I stopped using but did not remove the definition.
Title: Re: Is findshares open source?
Post by: Scooby on February 28, 2014, 12:35:25 PM
So freak occurance that failure of scanning port 445 happens
on line 445? Maybe should I should add NOP-line so it's not the same  :P

Sorry to hammer but

findshares.c: In function 'Copy':
findshares.c:265: warning: cast from pointer to integer of different size
findshares.c:271: warning: cast from pointer to integer of different size
findshares.c:273: warning: cast from pointer to integer of different size

Do you think it would be safe to replace as in
    if(((int)csrc & 0xFFFFFF00) != 0) csrc+=(count - 1);
       

with
    if(((long)csrc & 0xFFFFFF00) != 0) csrc+=(count - 1);


Title: Re: Is findshares open source?
Post by: Rich on February 28, 2014, 12:42:22 PM
Hi Scooby
If you want to do that, make sure the masks are also longer, or use a different strategy. Those three lines are basically
isolating the lower 8 bits to determine whether  csrc  is currently being used as a pointer or a byte.
Title: Re: Is findshares open source?
Post by: Scooby on February 28, 2014, 01:14:39 PM
Then maybe its best to ignore warnings and use int
Title: Re: Is findshares open source?
Post by: Rich on February 28, 2014, 01:27:24 PM
Hi Scooby
You could try this:
Code: [Select]
From:
if(((int)csrc & 0xFFFFFF00) != 0) csrc+=(count - 1);
To:
if(((long)csrc & -256) != 0) csrc+=(count - 1);
Do a similar type of change for line 271. For line 273, try:
Code: [Select]
From:
*cdest=((int)csrc & 0x000000FF);
To:
*cdest=((long)csrc & 255);
Title: Re: Is findshares open source?
Post by: Scooby on February 28, 2014, 02:59:42 PM
I'm a little rusty on anything else than decimal base  :-\

I don't get the -256

when trying out  decimal-to-hex-converter (http://www.binaryhexconverter.com/decimal-to-hex-converter)

I get
   -256 == 0xFFFF FF00

And 0xFFFF FF00 I think represent 64 bits right?

What I dont understand is why you used that to compare with int in your original code
since int is 32.

What am I missing
Title: Re: Is findshares open source?
Post by: Rich on February 28, 2014, 05:00:01 PM
Hi Scooby
  9 bit  -256=100
16 bit  -256=FF00
32 bit  -256=FFFFFF00
48 bit  -256=FFFFFFFFFF00
64 bit  -256=FFFFFFFFFFFFFF00
As you go to longer data formats the sign bit (most significant bit) is copied to the higher order bits.
Title: Re: Is findshares open source?
Post by: Scooby on March 01, 2014, 08:07:59 AM
Thank you for lesson.

I will go with this and run for a while to see if something
is not right.

I may have to consult you again

Thanks for support
Title: Re: Is findshares open source?
Post by: Rich on March 01, 2014, 08:40:06 AM
Hi Scooby
No problem.
Code: [Select]
root@alphaos ~]# findshares
findshares version 1.05 Aug 3, 2011
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 192.168.1.59 on wlan0

Error line 445
Samba/Windows Shares
--------------------------------------------------------------------------------
MSHOME
    RT-N66U          192.168.1.2       RT-N66U
   IPC$                           IPC Service (RT-N66U)


    DADS-MAC-MINI    192.168.1.10     

MSHOME
        xxxxx       192.168.1.55      Samba (xxxxx)
   media                          media
   removable_SDCARD               removable_media_SDCARD
   IPC$                           IPC Service (Samba (xxxxx))
I suspect that the  "LINE 445"  error message may be from  DADS-MAC-MINI    192.168.1.10.  I don't see any shares listed
for it.
Title: Re: Is findshares open source?
Post by: Scooby on March 07, 2014, 12:20:32 PM
I got some problems. And I tried with our different version of findshares.

I setup a linux lite on VirtualBox with a host-only network (ie not on eth0 but vboxnet0) and created a share.
The share server has gets ip 192.168.56.102. I can find it with nmap and smbclient
but findshares don't seem to find it. Tried on 64 bit version

Any clue why findshares doesn't find it?

Code: [Select]
> ./findshares

findshares version 1.05 Aug 3, 2011
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 172.19.8.182 on wlan0
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0

Code: [Select]
> map 192.168.56.0/24

Nmap scan report for 192.168.56.1
Host is up (0.0000060s latency).
All 1000 scanned ports on 192.168.56.1 are closed

Nmap scan report for 192.168.56.100
Host is up (0.000044s latency).
All 1000 scanned ports on 192.168.56.100 are filtered
MAC Address: 08:00:27:81:FC:F4 (Cadmus Computer Systems)

Nmap scan report for 192.168.56.102
Host is up (0.00032s latency).
Not shown: 998 closed ports
PORT    STATE SERVICE
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds
MAC Address: 08:00:27:F5:0C:62 (Cadmus Computer Systems)

Nmap scan report for 192.168.56.101
Host is up (0.0000060s latency).
All 1000 scanned ports on 192.168.56.101 are closed

Code: [Select]
> smbclient -L 192.168.56.102

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]

Sharename       Type      Comment
---------       ----      -------
everyoneshare   Disk     
IPC$            IPC       IPC Service (Samba Server 3.6.3)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]

Server               Comment
---------            -------
LINUXLITE            Samba Server 3.6.3

Workgroup            Master
---------            -------
WORKGROUP            LINUXLITE
Title: Re: Is findshares open source?
Post by: Rich on March 08, 2014, 06:52:37 PM
Hi Scooby
The  getifaddrs  call returns a linked list of all available interfaces. When I wrote the program, I included provisions to save
and list up to 10 interfaces. The program was hard coded to scan only the first interface in the list. Multiple interfaces has
not come up until now. I've attached an update version that should scan all interfaces found (up to 10). I don't have any
machines with multiple NICs so you'll have to test.
Quote
> ./findshares

findshares version 1.05 Aug 3, 2011
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 172.19.8.182 on wlan0
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0
The 192.168.56 addresses will both be scanned.

    [EDIT]: Newer version attached 3/11/14
Title: Re: Is findshares open source?
Post by: Scooby on March 10, 2014, 10:40:22 AM
I will try it out now and report back.

Thanks for fast update  :)

*edit*

So compiled new code and it found shares however there is a
Segmentation fault at the end of output?

Any way I can find out were it segfaults?

Code: [Select]
findshares version 1.06 Mar 8, 2014
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 172.19.8.156 on wlan0
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0

Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)

Segmentation fault
Title: Re: Is findshares open source?
Post by: Rich on March 10, 2014, 11:27:39 AM
Hi Scooby
Go to the end of the file and change:
Code: [Select]
for(subnet=1; subnet < 255; subnet++)
{
if(SMBshares[subnet] != NULL)
free(SMBshares[subnet]);
}
free(SMBshares);
for(subnet=1; subnet < 255; subnet++)
{
if(NFSshares[subnet] != NULL)
{
for(j=0; j < MAXDIRS; j++)
{
if(NFSshares[subnet]->share[j] != NULL)
free(NFSshares[subnet]->share[j]);
}
free(NFSshares[subnet]);
}
}
free(NFSshares);
NIC--;
}
To:
Code: [Select]
NIC--;
}

for(subnet=1; subnet < 255; subnet++)
{
if(SMBshares[subnet] != NULL)
free(SMBshares[subnet]);
}
free(SMBshares);
for(subnet=1; subnet < 255; subnet++)
{
if(NFSshares[subnet] != NULL)
{
for(j=0; j < MAXDIRS; j++)
{
if(NFSshares[subnet]->share[j] != NULL)
free(NFSshares[subnet]->share[j]);
}
free(NFSshares[subnet]);
}
}
free(NFSshares);
These two lines are what get moved:
Code: [Select]
NIC--;
}
Let me know what happens/
Title: Re: Is findshares open source?
Post by: Scooby on March 10, 2014, 12:24:03 PM
New output of findshares below in code tags( when moved those two lines )
Seems I get repeated info?

I am not used to C but tried to debug following http://www.cprogramming.com/debugging/segfaults.html
It would suggest "Dereferencing an Uninitialized Pointer"

I attached file output.txt some info from gdb and strace in hope it would be useful to you
Obs! this is from the first version, no segfault in second version

Code: [Select]
Local Host Name  = alphaos
Local IP Address = 172.19.8.156 on wlan0
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0

Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)

Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)

Error line 451
Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)
Title: Re: Is findshares open source?
Post by: Rich on March 10, 2014, 12:30:58 PM
Hi Scooby
I was just looking through the program and realized that the fix I gave you would cause other problems. Put it back the way it
was and add a call to  InitGlobals  as shown instead.
From:
Code: [Select]
while(NIC >= 0)
{
tmp=inet_aton((char *) &NICinfo[NIC].ipaddress, (struct in_addr *) &net_ipaddress);
if(tmp < 0) bail(__LINE__);
net_ipbase=net_ipaddress & 0x00FFFFFF; // Base address in network order

if(findSMB)
{
GetShareInfoSMB();
CreateMountlistSMB();
}
To:
Code: [Select]
while(NIC >= 0)
{
InitGlobals();
tmp=inet_aton((char *) &NICinfo[NIC].ipaddress, (struct in_addr *) &net_ipaddress);
if(tmp < 0) bail(__LINE__);
net_ipbase=net_ipaddress & 0x00FFFFFF; // Base address in network order

if(findSMB)
{
GetShareInfoSMB();
CreateMountlistSMB();
}
Sorry about that. The program is fairly complex and I haven't looked at the code in 3 years.
Title: Re: Is findshares open source?
Post by: Scooby on March 10, 2014, 12:41:28 PM
*edit* Sorry will have no more time today. Will try in 32-bit env tomorrow
           Will take some time, have to compile vbox for it and set everything up.
            To be continued...

Tried latest, same output as with the segfault

Sorry about that. The program is fairly complex and I haven't looked at the code in 3 years.

No problems man, happy for help
and yeah it's complex for me too

I think problem is in the code segment we discussed earlier when trying to get rid off
warnings I tried our different versions with same result.
( see output.txt attached in earlier post )

I'm on 64-bit, I will now try to boot into 32-bit and see if problem will manifest there!
Title: Re: Is findshares open source?
Post by: Rich on March 10, 2014, 12:43:28 PM
Hi Scooby
Correction, You also need to add
To:
Code: [Select]
free(SMBshares);
SMBshares=NULL;
for(subnet=1; subnet < 255; subnet++)
{
if(NFSshares[subnet] != NULL)
{
for(j=0; j < MAXDIRS; j++)
{
if(NFSshares[subnet]->share[j] != NULL)
free(NFSshares[subnet]->share[j]);
}
free(NFSshares[subnet]);
}
}
free(NFSshares);
NFSshares=NULL;
NIC--;
}
Added  SMBshares=NULL;  and  NFSshares=NULL;
Actually, the problem is that memory that was allocated has to be freed and re-allocated for each additional interface
being scanned.
Title: Re: Is findshares open source?
Post by: Scooby on March 10, 2014, 12:53:09 PM
OK did what you asked and no segfault
But two outputs of the same share maybe cause the two entries of vboxnet0 ?

on Vbox it says

Adapter IPv4 adress: 192.168.56.1
DHCPCD Server 192.168.56.100
Host machine  192.168.56.101 ?
Linux Lite with samba share 192.168.56.102

Don't really now why network adapter has its own IP?
It comes up under ifconfig->vboxnet0 when executed on host

Maybe problem only on vbox

Now I realy got to go, Will come back tomorrow

Code: [Select]
./findshares
findshares version 1.06 Mar 8, 2014
Copyright Richard A. Rost April 23, 2011

Local Host Name  = alphaos
Local IP Address = 172.19.8.156 on wlan0
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0

Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)

Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    LINUXLITE        192.168.56.102    Samba Server 3.6.3
everyoneshare                 
IPC$                           IPC Service (Samba Server 3.6.3)
Title: Re: Is findshares open source?
Post by: Rich on March 10, 2014, 01:08:59 PM
Hi Scooby
Quote
Local IP Address = 192.168.56.1 on vboxnet0
Local IP Address = 192.168.56.101 on vboxnet0
Actually, I expected the same share to be reported twice, once by each of the listed interfaces. I guess I'll have to add a
message to the output to make that apparent.

I'm afraid I don't really know anything about vbox. Whatever interfaces the operating system reports as available are listed
and scanned.
Title: Re: Is findshares open source?
Post by: Scooby on March 11, 2014, 02:41:37 AM
Actually, I expected the same share to be reported twice, once by each of the listed interfaces. I guess I'll have to add a
message to the output to make that apparent.

Well that seems logical and with added message to output it would be more user friendly.

It probably only shows up in Vbox right?
Title: Re: Is findshares open source?
Post by: Rich on March 11, 2014, 10:31:07 AM
Hi Scooby
Quote
... and with added message to output it would be more user friendly.
I was going to go with user hostile, but your way is good too. ;D
I managed to get the wireless connection on my laptop to work so I could test with multiple NICs. Here is what the output
currently looks like:
Code: [Select]
findshares version 1.06 Mar 11, 2014
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 192.168.1.45 on eth0
Local IP Address = 192.168.2.55 on eth0:1
Local IP Address = 192.168.1.77 on eth0:2
Local IP Address = 10.0.0.3 on eth1

Scanning from 10.0.0.3 on eth1
No shares found

Scanning from 192.168.1.77 on eth0:2
Samba/Windows Shares
--------------------------------------------------------------------------------
MYGROUP
    BITBUCKET        192.168.1.47      TC Samba Server
        public                         Usable by all
        smalldrive                     Temporary workspace
        IPC$                           IPC Service (TC Samba Server)


Server          Remote Resource        Local Mount Point
--------------------------------------------------------------------------------
192.168.1.47    public                 /mnt/bb


Scanning from 192.168.2.55 on eth0:1
No shares found

Scanning from 192.168.1.45 on eth0
Samba/Windows Shares
--------------------------------------------------------------------------------
MYGROUP
    BITBUCKET        192.168.1.47      TC Samba Server
        public                         Usable by all
        smalldrive                     Temporary workspace
        IPC$                           IPC Service (TC Samba Server)


Server          Remote Resource        Local Mount Point
--------------------------------------------------------------------------------
192.168.1.47    public                 /mnt/bb
I've updated the attachment in reply #19 with the current changes, let me know what you think.

Quote
It probably only shows up in Vbox right?
Actually, you can bind multiple IPs to a NIC as illustrated in the output above.
Title: Re: Is findshares open source?
Post by: Scooby on March 12, 2014, 02:36:51 PM
I think it looks good now.


Actually, you can bind multiple IPs to a NIC as illus trated in the output above.

How do you do that? Seems an easier way to test than with Vbox?
Title: Re: Is findshares open source?
Post by: Rich on March 12, 2014, 04:55:58 PM
Hi Scooby
Quote
How do you do that? Seems an easier way to test than with Vbox?
Eth0 was already configured. I just executed:
Code: [Select]
sudo ifconfig eth0:1 192.168.2.55 up
sudo ifconfig eth0:2 192.168.1.77 up
Title: Re: Is findshares open source?
Post by: ko on October 01, 2014, 10:19:23 AM
Hi Scooby
Google won't help you. Findshares is something I wrote partly to learn programming in C and partly because I was not happy
with any of the programs available for performing these functions. Source code is attached.
@Rich:

I registered on this forum just to contact you as author of findshares.  The question "is Findshares open source" has not been fully answered.  In fact, this came up on the Mepis/MX forum after already a lot of work had been done towards a new version of Findshares called MX-Find Shares:

See    http://forum.mepiscommunity.org/viewtopic.php?f=86&t=36929&start=40

Quote from: Adrian
Thanks, the bad news is that I discovered that the findshares CLI program has a custom license that is not compatible with GPL: "You do not include or package it with any software for which a fee is collected." so it means that if we include the program in the ISO people won't be able to sell CDs or USB flashdrives with MX Linux on it.

If anybody has the contact for the author Copyright (C) Richard A. Rost  April 23,2011 maybe we can contact him and see if he's willing to change the license to GPL, BSD, Apache, MIT, or any other free license that doesn't have that kind of clause.

My question:  would you be willing to change the license as suggested? 
We'd very much like to be able to provide an .iso of MX - containing MX-find shares - that may be sold as CD / USB flashdrive by other parties without running into licensing problems.

Please PM me or email me,

Regards,   Ko
Title: Re: Is findshares open source?
Post by: tinypoodle on October 01, 2014, 09:28:41 PM

See    http://forum.mepiscommunity.org/viewtopic.php?f=86&t=36929&start=40 (http://forum.mepiscommunity.org/viewtopic.php?f=86&t=36929&start=40)


The board requires you to be registered and logged in to view this forum.
Title: Re: Is findshares open source?
Post by: Rich on October 01, 2014, 11:12:36 PM
Hi ko
Quote
My question:  would you be willing to change the license as suggested?
Since findshares is freely available for anyone to download and run I currently see no reason to change the copyright.
Title: Re: Is findshares open source?
Post by: ko on October 05, 2014, 11:36:34 AM
Hello Rich:

Regarding your answer regarding our earlier proposal to change the licensing terms for findshares:

We are not selling software, we have no plans to have anyone else sell our software, and we agree with the license.  We intend to include and package your findshares with our MX Find Shares GUI software for use in MX-14 and antiX, the copyright holder of MX Find Shares. Both findshares and MX Find Shares are Free software for which no fees are collected.
Title: Re: Is findshares open source?
Post by: Rich on October 06, 2014, 12:56:19 PM
Hi ko
Thank you for your understanding. I don't know if you read this whole thread, but there are newer source files posted in reply #19
in which findshares will scan all network interfaces in a machine instead of just the first one found.

I'm curious to see what kind of GUI you came up with, where can I find MX-Find Shares?

Quote
See    http://forum.mepiscommunity.org/viewtopic.php?f=86&t=36929&start=40
After joining and logging in it said   "You are not authorised to read this forum."
Title: Re: Is findshares open source?
Post by: ko on October 07, 2014, 06:11:18 AM
@Rich : Thanks for the findshares source version 1.06.   We will upgrade MX Findshares to use 1.06.   
Once the upgraded (1.06) .deb package is available I'll point you to the repository where you can download it.  You will probably need a lot more packages (dependencies) to be able to see what the GUI looks like.

The thread on the Mepis forum that was referenced earlier is in a separate forum section for the Development Team : 
You cannot read that forum because it's one of the MEPIS community restricted forums. Even with a regular account you won't see anything in it.   Sorry about that.

Title: Re: Is findshares open source?
Post by: Rich on October 07, 2014, 07:09:05 AM
Hi ko
You are welcome. Looking forward to seeing what you've come up with.
Title: Re: Is findshares open source?
Post by: ko on October 07, 2014, 10:30:34 AM
Hi ko
You are welcome. Looking forward to seeing what you've come up with.
OK Rich,
While waiting for the 1.06 based MX-Findshares version to arrive:  here's the current (1.05 based) MX-Findshares .deb package for you to have a look at.   
I don't know if you have a Debian Wheezy based distribution CD around to try it on (after HD-installation).... 



Title: Re: Is findshares open source?
Post by: ko on October 07, 2014, 11:32:40 AM
OK - here's the MX-findshare .deb package that uses findshares 1.06
(version 14.2+2)

Title: Re: Is findshares open source?
Post by: Rich on October 07, 2014, 02:14:49 PM
Hi ko
Thank you. By the way, forum rules prohibit attaching binaries to posts so I had to remove them.
I took a quick look through the package, and while you acknowledge me as the author of findshares when the  About  button is clicked
and you did include my licensing terms in the doc directory, I noticed you stripped the version number and copyright message that
used to display when running my program. If for some reason you find the message objectionable every time the program is run, then
at least relocate it to display with the help text.
Title: Re: Is findshares open source?
Post by: ko on October 08, 2014, 06:42:37 AM
Hi ko
Thank you. By the way, forum rules prohibit attaching binaries to posts so I had to remove them.
I took a quick look through the package, and while you acknowledge me as the author of findshares when the  About  button is clicked
and you did include my licensing terms in the doc directory, I noticed you stripped the version number and copyright message that
used to display when running my program. If for some reason you find the message objectionable every time the program is run, then
at least relocate it to display with the help text.
Rich: we apologize for completely removing text that is shown whenever mindshares is run. Of course it must also be clear to you that MX-findshares has its own GPL 3.0 license and we do not really like to show different licenses within the combined package (Findshares CLI + MX-Findshares GUI).  I have asked our guys to re-implement showing your license for findshares when the command # findshares --help  is run.
Once again, our apologies for removing your text without at least showing that text whenever the findshares command is run with the --help argument.  We should have thought of this ourselves
Title: Re: Is findshares open source?
Post by: Rich on October 08, 2014, 07:00:12 AM
Hi ko
Thank you. One of the reasons I mentioned it is someone could unpack the .deb file and separate my program from the package, thus
losing that information.
Title: Re: Is findshares open source?
Post by: ko on October 08, 2014, 10:55:05 AM
OK Rich, the text has been re-introduced into findshares (1.06) which is used in MX-findshares 14.2+2 :

Quote
Adrian wrote:
It's done, it's the same .deb I didn't change the version number because it's not a released package yet, so it's not that relevant to bump the version for any small change.

Quote
Thanks Adrian,
I've checked it (of course...:-))   Completely removed MX findshares and then re-installed the corrected MX-findshares deb.

Code: [Select]
ko@lappy:~
$ su
Password:
root@lappy:/home/ko# findshares --help
Local Host Name  = lappy
Local IP Address = 192.168.0.193 on wlan0

findshares version 1.06 Mar 11, 2014
Copyright Richard A. Rost April 23, 2011

This program attempts to locate remote shares on Windows,
Samba, and NFS servers in the same subnet as the local IP
address. Any remote shares found that are mounted in the
local file system are indicated.

Usage:  findshares [-nn] [--no-nfs] [-ns] [--no-smb]

Options:
   -nn [--no-nfs]   Show only Windows/Samba shares
   -ns [--no-smb]   Show only NFS shares

root@lappy:/home/ko#

Rich: I hope this solution is satisfactory to you.   Can we consider the issue solved now?
If you do want to have the 14.2+2 deb file: here's a download link:

https://github.com/AdrianTM/mx-findshares/raw/master/mx-findshares_14.2%2B2_i386.deb
Title: Re: Is findshares open source?
Post by: Rich on October 08, 2014, 04:58:00 PM
Hi ko
Thank you for your patience and working with me on this. I glad we were able to resolve this to everyones satisfaction.
Title: Re: Is findshares open source?
Post by: ko on October 08, 2014, 11:31:28 PM
Thanks Rich!
Title: Re: Is findshares open source?
Post by: Rich on October 09, 2014, 06:01:47 AM
Hi ko
You are welcome.
Title: Re: Is findshares open source?
Post by: Rich on February 12, 2015, 07:20:06 PM
If anyone is interested version 1.07 of findshares has been posted in the TC4, 5, and 6 repositories.
Changes from version 1.05:

     Scans all configured network interfaces found up to a maximum of 16 interfaces.

     Error messages now default to off. Use  --debug  to enable them.

     Added message to indicate if no shares were found.

     Stripped executable harder using sstrip. Extension size reduced from 12K to 8K. Executable reduced from 15200 bytes to 13928.
Title: Re: Is findshares open source?
Post by: Misalf on July 22, 2016, 04:34:02 AM
Hi Rich

findshares  fails if using a 3G modem connection for internet (ppp0) in conjunction with ethernet for LAN (eth0).

TC-7.2 x86

eth0 and ppp0 active:
Code: [Select]
$ findshares
findshares version 1.07 Feb 9, 2015
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box

Scanning from  on
Network is unreachable: Error line 1097

eth0 only:
Code: [Select]
$ findshares
findshares version 1.07 Feb 9, 2015
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 192.168.0.1 on eth0

Scanning from 192.168.0.1 on eth0
Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    BOX              192.168.0.1       Samba Server
IPC$                           IPC Service (Samba Server)

Cheers
Title: Re: Is findshares open source?
Post by: Rich on July 22, 2016, 10:22:10 AM
Hi Misalf
Attached is the source package. Compile it by running the  compilefindshares  script. Let me know if it's fixed.
Title: Re: Is findshares open source?
Post by: Misalf on July 22, 2016, 10:58:49 AM
Hi Rich
Not fixed.
Code: [Select]
#!/bin/sh  ::  Tiny Core 7.2  ::  Linux 4.2.9-tinycore

19:55:05 tc@box:/tmp/findshares-v1.08/$ > ./compilefindshares
In file included from packetdata.h:10:0,
                 from findshares.c:67:
netrshareenum.h:47:31: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .bytecount=10, .Filename[0]="\\srvsvc" };
                               ^
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
netrshareenum.h:47:31: error: initializer element is not computable at load time
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
In file included from findshares.c:67:0:
packetdata.h:63:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .string[0]="NT LM 0.12" };
              ^
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:63:14: error: initializer element is not computable at load time
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:102:61: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .ansipasswordlen=1, .capabilities=0x00000203, .strings[0]="Guest" };
                                                             ^
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:102:61: error: initializer element is not computable at load time
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:134:65: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .AndXCommand=0xFF, .passwordlen=1, .bytecount=32, .strings[0]="\\\\" };
                                                                 ^
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
packetdata.h:134:65: error: initializer element is not computable at load time
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
findshares.c: In function ‘EnumShares’:
findshares.c:464:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  setup.sessionkey=*(uint64_t*)&rxbuffer[52];
  ^
findshares.c:491:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  treeconn.uid=*(uint16_t*)&rxbuffer[32];
  ^
findshares.c:507:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NTcreate.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:509:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NTcreate.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:513:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:515:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:516:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.FID=*(uint16_t*)&rxbuffer[42]; // File ID
   ^
findshares.c:522:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NetrShareEnum.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:524:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NetrShareEnum.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:584:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumshares.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:586:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumshares.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:619:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  netservergetinfo.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
  ^
findshares.c:621:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  netservergetinfo.uid=*(uint16_t*)&rxbuffer[32]; // User ID
  ^
findshares.c:632:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumservers2.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:634:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumservers2.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c: At top level:
findshares.c:948:13: warning: ‘Hexdump’ defined but not used [-Wunused-function]
 static void Hexdump(void *src, int len)
             ^
   text    data     bss     dec     hex filename
  10947    1656      84   12687    318f findshares
-rwxr-xr-x 1 tc staff 15200 Jul 22 19:55 findshares
Code: [Select]
19:55:07 tc@box:/tmp/findshares-v1.08/$ > ./findshares
findshares version 1.08 Jul 22, 2016
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
19:55:11 tc@box:/tmp/findshares-v1.08/$ > sudo killall pppd
19:55:15 tc@box:/tmp/findshares-v1.08/$ > ./findshares
findshares version 1.08 Jul 22, 2016
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 192.168.0.1 on eth0

Scanning from 192.168.0.1 on eth0
Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    BOX              192.168.0.1       Samba Server
IPC$                           IPC Service (Samba Server)


Title: Re: Is findshares open source?
Post by: Rich on July 23, 2016, 11:32:06 PM
Hi Misalf
Please try again, I updated the attachment in reply #50. I don't know why you are getting all those warnings when you compile.
Maybe the GCC version in Tiny Core 7.2 has extra warnings enabled by default.
Title: Re: Is findshares open source?
Post by: Misalf on July 24, 2016, 04:27:57 AM
Errors as well.
Code: [Select]
./compilefindshares
In file included from packetdata.h:10:0,
                 from findshares.c:67:
netrshareenum.h:47:31: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .bytecount=10, .Filename[0]="\\srvsvc" };
                               ^
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
netrshareenum.h:47:31: error: initializer element is not computable at load time
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
In file included from findshares.c:67:0:
packetdata.h:63:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .string[0]="NT LM 0.12" };
              ^
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:63:14: error: initializer element is not computable at load time
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:102:61: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .ansipasswordlen=1, .capabilities=0x00000203, .strings[0]="Guest" };
                                                             ^
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:102:61: error: initializer element is not computable at load time
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:134:65: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .AndXCommand=0xFF, .passwordlen=1, .bytecount=32, .strings[0]="\\\\" };
                                                                 ^
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
packetdata.h:134:65: error: initializer element is not computable at load time
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
findshares.c: In function ‘EnumShares’:
findshares.c:464:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  setup.sessionkey=*(uint64_t*)&rxbuffer[52];
  ^
findshares.c:491:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  treeconn.uid=*(uint16_t*)&rxbuffer[32];
  ^
findshares.c:507:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NTcreate.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:509:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NTcreate.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:513:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:515:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:516:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   RPCbind.FID=*(uint16_t*)&rxbuffer[42]; // File ID
   ^
findshares.c:522:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NetrShareEnum.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:524:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   NetrShareEnum.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:584:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumshares.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:586:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumshares.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c:619:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  netservergetinfo.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
  ^
findshares.c:621:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  netservergetinfo.uid=*(uint16_t*)&rxbuffer[32]; // User ID
  ^
findshares.c:632:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumservers2.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
   ^
findshares.c:634:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   enumservers2.uid=*(uint16_t*)&rxbuffer[32]; // User ID
   ^
findshares.c: At top level:
findshares.c:948:13: warning: ‘Hexdump’ defined but not used [-Wunused-function]
 static void Hexdump(void *src, int len)
             ^
size: 'findshares': No such file
strip: 'findshares': No such file
ls: cannot access findshares: No such file or directory
Any build deps I might need? Currently only compiletc.tcz installed.
Title: Re: Is findshares open source?
Post by: Rich on July 24, 2016, 10:37:03 AM
Hi Misalf
I'm PMing you a link to download a compiled copy of findshares.
Title: Re: Is findshares open source?
Post by: Misalf on July 24, 2016, 10:54:53 AM
Thanks.
It still only succeeds if eth0 is the only active connection. Now it also tries to scan ppp0 though.

eth0 + ppp0 = Network is unreachable: Error line 1098
Title: Re: Is findshares open source?
Post by: Rich on July 24, 2016, 11:01:24 AM
Hi Misalf
Could you post the actual output of findshares please.
Title: Re: Is findshares open source?
Post by: Misalf on July 24, 2016, 11:41:28 AM
Sure
Code: [Select]
20:38:46 tc@box:~/$ > sudo /usr/local/etc/init.d/samba status

smbd is running.


nmbd is running.

20:38:50 tc@box:~/$ > ifconfig
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:500 (500.0 B)  TX bytes:500 (500.0 B)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:10.207.102.154  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:760 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:476113 (464.9 KiB)  TX bytes:84440 (82.4 KiB)

20:38:53 tc@box:~/$ > /tmp/findshares
findshares version 1.08 Jul 24, 2016
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 10.207.102.154 on ppp0

Scanning from 10.207.102.154 on ppp0
No shares found
20:39:01 tc@box:~/$ > sudo /opt/eth0_ics_server_ppp0.sh
#!/bin/sh  ::  Tiny Core 7.2  ::  Linux 4.2.9-tinycore

#!/bin/sh  ::  Tiny Core 7.2  ::  Linux 4.2.9-tinycore

20:39:22 tc@box:~/$ > ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:85:4D:77:2D 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:500 (500.0 B)  TX bytes:500 (500.0 B)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:10.207.102.154  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:762 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:476113 (464.9 KiB)  TX bytes:84602 (82.6 KiB)

20:39:25 tc@box:~/$ > /tmp/findshares
findshares version 1.08 Jul 24, 2016
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 192.168.0.1 on eth0
Local IP Address = 10.207.102.154 on ppp0

Scanning from 10.207.102.154 on ppp0
Network is unreachable: Error line 1098
20:39:29!tc@box:~/$ > sudo killall pppd
20:39:36 tc@box:~/$ > /tmp/findshares
findshares version 1.08 Jul 24, 2016
Copyright Richard A. Rost April 23, 2011

Local Host Name  = box
Local IP Address = 192.168.0.1 on eth0

Scanning from 192.168.0.1 on eth0
Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
    BOX              192.168.0.1       Samba Server
IPC$                           IPC Service (Samba Server)


Title: Re: Is findshares open source?
Post by: Rich on July 24, 2016, 01:13:41 PM
Hi Misalf
PMing you a new download link.
Title: Re: Is findshares open source?
Post by: Misalf on July 24, 2016, 01:20:46 PM
Hey Rich
This version seems to be good. Thanks!
Title: Re: Is findshares open source?
Post by: Rich on July 24, 2016, 01:41:16 PM
Hi Misalf
Part of the fix was to leave any ppp device off the list so it's ignored and doesn't get scanned. Are ppp devices strictly
external access (i.e. modem) or do they serve as a LAN interface as well?
Title: Re: Is findshares open source?
Post by: Misalf on July 24, 2016, 06:14:00 PM
I'm fine with omitting ppp.
Even though I don't actually know, I doubt Point-to-Point can be used for "local" networking.
However, if it is possible, say one sets up a private server to dial-up into, I'd guess your tool could be neglected in such a case, as whoever would create a setup like this is probably geeky enough to write his/her own code.
Title: Re: Is findshares open source?
Post by: Rich on September 04, 2016, 09:15:01 PM
Hi Misalf
The updated  findshares.tcz  is now available for download in all the repositories.
Title: Re: Is findshares open source?
Post by: Misalf on September 05, 2016, 06:19:50 AM
;)
Title: Re: Is findshares open source?
Post by: CentralWare on June 09, 2018, 07:13:02 AM
@Rich: Any chance you have the updated sources available?  [July 24, 2016 posts]
I was considering porting to 86x64 when I found this thread and it sounds like you and the crew have already ironed out a good number of potential issues.
From the sources included with "mx-findshares" which look to be ~1.06 via gcc 7.2.0
Code: [Select]
In file included from packetdata.h:10:0,
                 from findshares.c:67:
netrshareenum.h:47:31: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .bytecount=10, .Filename[0]="\\srvsvc" };
                               ^~~~~~~~~~
netrshareenum.h:47:31: note: (near initialization for 'NTcreate.Filename[0]')
netrshareenum.h:47:31: error: initializer element is not computable at load time
netrshareenum.h:47:31: note: (near initialization for 'NTcreate.Filename[0]')
In file included from findshares.c:67:0:
packetdata.h:63:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .string[0]="NT LM 0.12" };
              ^~~~~~~~~~~~
packetdata.h:63:14: note: (near initialization for 'protocol.string[0]')
packetdata.h:63:14: error: initializer element is not computable at load time
packetdata.h:63:14: note: (near initialization for 'protocol.string[0]')
packetdata.h:102:61: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .ansipasswordlen=1, .capabilities=0x00000203, .strings[0]="Guest" };
                                                             ^~~~~~~
packetdata.h:102:61: note: (near initialization for 'setup.strings[0]')
packetdata.h:102:61: error: initializer element is not computable at load time
packetdata.h:102:61: note: (near initialization for 'setup.strings[0]')
packetdata.h:134:65: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   .AndXCommand=0xFF, .passwordlen=1, .bytecount=32, .strings[0]="\\\\" };
                                                                 ^~~~~~
packetdata.h:134:65: note: (near initialization for 'treeconn.strings[0]')
packetdata.h:134:65: error: initializer element is not computable at load time
packetdata.h:134:65: note: (near initialization for 'treeconn.strings[0]')
findshares.c: In function 'Copy':
findshares.c:265:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    if(((int)csrc & -256) != 0) csrc+=(count - 1);
        ^
findshares.c:271:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    if(((int)csrc & -256) == 0)
        ^
findshares.c:273:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     *cdest=((int)csrc & 255);
             ^
findshares.c: In function 'GetShareInfoSMB':
findshares.c:875:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
  int tmp, timeout=3;
      ^~~
findshares.c: In function 'ScanInterfaces':
findshares.c:1055:6: warning: variable 's' set but not used [-Wunused-but-set-variable]
  int s, ptr=0;
      ^
Title: Re: Is findshares open source?
Post by: Rich on June 09, 2018, 12:57:27 PM
Hi centralware
The most recent source is version 1.08 which is attached to reply #50 here:
http://forum.tinycorelinux.net/index.php/topic,16735.msg125515.html#msg125515
Title: Re: Is findshares open source?
Post by: CentralWare on June 09, 2018, 01:06:24 PM
Hi @Rich.  I was assuming things might have gone a little past 1.08 based on post #58, but thank you regardless.
If I get a chance, I'll add this one to my x64 projects (x86.tcz->x64.tcz); I already have about half a dozen finished; still another dozen or so in the mix.