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))
Error line 445
That refers to line 445 in the source code. You will find:return(__LINE__)
throughout the source code. When a strategy fails, the program reports where the failure occurred and move on to thec:1055:6: warning: variable 's' set but not used
Harmless. Some variable I stopped using but did not remove the definition.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:From:
*cdest=((int)csrc & 0x000000FF);
To:
*cdest=((long)csrc & 255);
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> ./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
> 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
> 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
> ./findsharesThe 192.168.56 addresses will both be scanned.
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
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
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: 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: NIC--;
}
Let me know what happens/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)
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: 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.Sorry about that. The program is fairly complex and I haven't looked at the code in 3 years.
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;./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)
Local IP Address = 192.168.56.1 on vboxnet0Actually, I expected the same share to be reported twice, once by each of the listed interfaces. I guess I'll have to add a
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.
... 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
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.It probably only shows up in Vbox right?Actually, you can bind multiple IPs to a NIC as illustrated in the output above.
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?Eth0 was already configured. I just executed:
sudo ifconfig eth0:1 192.168.2.55 up
sudo ifconfig eth0:2 192.168.1.77 up
Hi Scooby@Rich:
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.
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.
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. |
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.
See http://forum.mepiscommunity.org/viewtopic.php?f=86&t=36929&start=40After joining and logging in it said "You are not authorised to read this forum."
Hi koOK Rich,
You are welcome. Looking forward to seeing what you've come up with.
Hi koRich: 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.
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.
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.
Thanks Adrian,
I've checked it (of course...:-)) Completely removed MX findshares and then re-installed the corrected MX-findshares deb.
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#
$ 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
$ 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)
#!/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
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)
./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.
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)
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;
^