Re: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Bob Sneidar via use-livecode
Plus sudo will require authentication, yes? That would not be automated. The 
purpose of my function is to be able to detect the default adapter and compare 
it to a stored last known adapter to see if it has changed. If it has, I have 
my app re-authenticate.

Bob S


On Apr 13, 2021, at 9:06 PM, Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

How do you tell which is the default adapter?

Bob S


On Apr 13, 2021, at 8:00 PM, Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On linux it's very easy

sudo arp-scan -l

will give you a nice sorted list.

--
Mark Wieder
ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Bob Sneidar via use-livecode
How do you tell which is the default adapter?

Bob S


> On Apr 13, 2021, at 8:00 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On linux it's very easy
> 
> sudo arp-scan -l
> 
> will give you a nice sorted list.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Mark Wieder via use-livecode

On linux it's very easy

sudo arp-scan -l

will give you a nice sorted list.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Bob Sneidar via use-livecode
On Windows it's pretty easy. On MacOS it's a little trickier. Here's a function 
I wrote to get the default connection, which contains methods for getting the 
network adapters for Windows and MacOS. Enjoy:

FUNCTION getDefaultNetwork pMode
   -- leave pMode empty for just IP and MAC info. Pass "Detail" to get more info
   IF the platform contains "WIN" THEN
  set hideconsolewindows to true
  put "netsh interface ip show config" into tShellCommand
  
  TRY
 put shell(tShellCommand) into tDefaultAdapter
  CATCH tError
 return tError
  END TRY
  
  -- if pMode is detail just return these results
  IF pMode is "Detail" THEN return tDefaultAdapter
  
  -- get the default adapter and Gateway IP addresses
  put lineoffset("IP Address:", tDefaultAdapter) into tIPAddressLine
  put word -1 of line tIPAddressLine of tDefaultAdapter into tLocalIPAddress
  put lineoffset("Default Gateway:", tDefaultAdapter)  into tGWAddressLine
  put word -1 of line tGWAddressLine of tDefaultAdapter into tGWIPAddress
  
  -- get the default adapter and gateway MAC addresses
  put "ipconfig /all" into tShellCommand
  
  TRY
 put shell(tShellCommand) into tConfigData
  CATCH tError
 return tError
  END TRY
  
  put lineoffset(tLocalIPAddress, tConfigData) -3 into tLocalMACLine
  put word -1 of line tLocalMACLine of tConfigData into tLocalMACAddress
  put "arp -a" into tShellCommand
  
  TRY
 put shell(tShellCommand) into tArpData
  CATCH tError
 return tError
  END TRY
  
  put lineoffset(tGWIPAddress, tArpData) into tGWMACAddressLine
  put word 2 of line tGWMACAddressLine of tArpData into tGWMACAddress
  
  put tLocalIPAddress && tLocalMACAddress & cr & \
 tGWIPAddress && tGWMACAddress into tCurrentAdapterInfo
   ELSE
  -- first we need to get the default adapter
  put "route get default" into tShellCommand
  
  TRY
 put shell(tShellCommand) into tDefaultAdapter
  CATCH tError
 return tError
  END TRY
  put lineoffset("Interface: ", tDefaultAdapter) into tInterfaceLine
  
  IF tInterfaceLine = 0 THEN
 return "ERROR: No default interface found!"
  END IF
  
  -- now we need the detail of the interface
  put word 2 of line tInterfaceLine of tDefaultAdapter into 
tDefaultInterface
  put "ipconfig getpacket " & tDefaultInterface into tShellCommand
  
  TRY
 put shell(tShellCommand) into tInterfaceDetail
  CATCH tError
 return tError
  END TRY
  
  -- if we didn't specifically ask for the interface and router MAC 
addresses, return here
  IF pMode is "Detail" THEN return tInterfaceDetail
  
  -- now we get  the interface MAC address
  put lineoffset("chaddr", tInterfaceDetail) into tInterfaceMACLine
  put word -1 of line tInterfaceMACLine of tInterfaceDetail into 
tDefaultMACAddress
  
  -- and the IP address
  put lineoffset("yiaddr", tInterfaceDetail) into tInterfaceIPLine
  put word -1 of line tInterfaceIPLine of tInterfaceDetail into 
tDefaultIPAddress
  
  -- next we get the router IP address
  put lineoffset("router (ip_mult): ", tInterfaceDetail) into tRouterLine
  put word 3 of line tRouterLine of tInterfaceDetail into tRouterIPAddress
  put char 2 to -2 of tRouterIPAddress into tRouterIPAddress
  
  -- next we get the MAC address of the router interface
  put "arp " & tRouterIPAddress into tShellCommand
  
  TRY
 put shell(tShellCommand) into tArpReply
  CATCH tError
 return tError
  END TRY
  
  put word 4 of tArpReply into tRouterMACAddress
  
  -- finally we return the MAC addresses of the default interface and the 
router interface
  put tDefaultIPAddress && tDefaultMACAddress & cr & \
 tRouterIPAddress && tRouterMACAddress into tCurrentAdapterInfo
   END IF
   
   return tCurrentAdapterInfo
END getDefaultNetwork

Bob S

> On Apr 13, 2021, at 05:27 , Tiemo via use-livecode 
>  wrote:
> 
> Thanks Matthias and Andre for pointing out for these options
> 
> Tiemo
> 
> 
> -----Ursprüngliche Nachricht-
> Von: use-livecode  Im Auftrag von 
> Andre Garzia via use-livecode
> Gesendet: Dienstag, 13. April 2021 11:38
> An: How to use LiveCode 
> Cc: Andre Garzia 
> Betreff: Re: Offtopic: Can anybody create a small DLL for me?
> 
> Tiemo,
> 
> Maybe it is possible to parse the result of
> 
> shell(“ipconfig /all”)
> 
> To get the same information. I’m not sure which information you’re collecting 
> but 

AW: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Tiemo via use-livecode
Thanks Matthias and Andre for pointing out for these options

Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode  Im Auftrag von Andre 
Garzia via use-livecode
Gesendet: Dienstag, 13. April 2021 11:38
An: How to use LiveCode 
Cc: Andre Garzia 
Betreff: Re: Offtopic: Can anybody create a small DLL for me?

Tiemo,

Maybe it is possible to parse the result of

shell(“ipconfig /all”)

To get the same information. I’m not sure which information you’re collecting 
but I just run that on my windows and I could see every interface and the info 
about them.

Best
A

> On 12 Apr 2021, at 10:43, Tiemo via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> over ten years ago, I included a windows dll into one of my main LC 
> programs, which was created by a programmer, to whom I no more have 
> any contact.
> 
> The dll only has one single function, it reads all MAC addresses from 
> the device with all related informations, like name and kind of 
> address and gives all the data back to LC.
> 
> 
> 
> Now I would like to build a 64Bit version of my program and therefor 
> need a 64Bit version of this dll. I don't have the source, so it has 
> to be created from the scratch.
> 
> 
> 
> If there is anybody, who is willing to do this paid job for me, please 
> contact me PM: toolb...@kestner.de <mailto:toolb...@kestner.de>
> 
> 
> 
> Thank you
> 
> 
> 
> Tiemo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Offtopic: Can anybody create a small DLL for me?

2021-04-13 Thread Andre Garzia via use-livecode
Tiemo,

Maybe it is possible to parse the result of

shell(“ipconfig /all”)

To get the same information. I’m not sure which information you’re collecting 
but I just run that on my windows and I could see every interface and the info 
about them.

Best
A

> On 12 Apr 2021, at 10:43, Tiemo via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> over ten years ago, I included a windows dll into one of my main LC
> programs, which was created by a programmer, to whom I no more have any
> contact.
> 
> The dll only has one single function, it reads all MAC addresses from the
> device with all related informations, like name and kind of address and
> gives all the data back to LC.
> 
> 
> 
> Now I would like to build a 64Bit version of my program and therefor need a
> 64Bit version of this dll. I don't have the source, so it has to be created
> from the scratch.
> 
> 
> 
> If there is anybody, who is willing to do this paid job for me, please
> contact me PM: toolb...@kestner.de  
> 
> 
> 
> Thank you
> 
> 
> 
> Tiemo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Offtopic: Can anybody create a small DLL for me?

2021-04-12 Thread matthias rebbe via use-livecode
Tiemo,

if you do not find a developer for a 64bit .dll you might consider to use a 
Windows shell command to get a list of all available network adapters, their 
mac address and their status.

getmac /v /FO csv

for example returns a list of the Adapters as CSV with a header line

getmac /v /NH /FO csv
this one returns the same as the above one, but without a header line

This command has to be run with Administrator right, but i am sure your dll 
also needed Admin rights.

Regards,


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 12.04.2021 um 11:43 schrieb Tiemo via use-livecode 
> :
> 
> Hello,
> 
> 
> 
> over ten years ago, I included a windows dll into one of my main LC
> programs, which was created by a programmer, to whom I no more have any
> contact.
> 
> The dll only has one single function, it reads all MAC addresses from the
> device with all related informations, like name and kind of address and
> gives all the data back to LC.
> 
> 
> 
> Now I would like to build a 64Bit version of my program and therefor need a
> 64Bit version of this dll. I don't have the source, so it has to be created
> from the scratch.
> 
> 
> 
> If there is anybody, who is willing to do this paid job for me, please
> contact me PM: toolb...@kestner.de  
> 
> 
> 
> Thank you
> 
> 
> 
> Tiemo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Offtopic: Can anybody create a small DLL for me?

2021-04-12 Thread Tiemo via use-livecode
Hello,

 

over ten years ago, I included a windows dll into one of my main LC
programs, which was created by a programmer, to whom I no more have any
contact.

The dll only has one single function, it reads all MAC addresses from the
device with all related informations, like name and kind of address and
gives all the data back to LC.

 

Now I would like to build a 64Bit version of my program and therefor need a
64Bit version of this dll. I don't have the source, so it has to be created
from the scratch.

 

If there is anybody, who is willing to do this paid job for me, please
contact me PM: toolb...@kestner.de  

 

Thank you

 

Tiemo

 

 

 

 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode