Recent

Author Topic: Open Source Program I have been working on lately on github and source forge.  (Read 4828 times)

vonskie

  • Full Member
  • ***
  • Posts: 184
https://sourceforge.net/projects/ipavailabilityscanner/ (with installer)

https://youtu.be/mxMzqQNjofU

https://github.com/vrwallace/IPAvailabilityScanner

Plus I have many other free pascal tools there as well.


This utility efficiently scans IP addresses and gathers host names and MAC addresses. It offers the capability to export scan results and includes features for port scanning of selected hosts. Enhanced with a multithreaded framework, the tool delivers increased speed, supporting functionalities like trigger actions and banner grabbing during port scans.

For more advanced options, right-click on the displayed grids. This context menu includes options for port scanning, copying results, and network diagnostics tools like ping and traceroute. Additionally, it allows for easy access to ports using standard protocols such as SSH.

A convenient feature is the ability to quickly identify the manufacturer of a MAC address with a simple mouse click.

Moreover, the interface is user-friendly, enabling sorting of information by simply clicking on the column headers in the display grid.

Now connects via SSL/TLS so its better at grabbing banners

Features
IP Scanner Pings, resolves Host Name and MAC address
Port Scanner, sends triggers and does a banner capture
Multithreaded so faster than nmap.
Allows you to copy results to clipboard
Will find hidden devices on your network via arp
Will open default app for ports it finds open ssh:// or \\ or etc.
Small executable
Written in Free Pascal using Lazarus IDE
Right Click Grids for more options
Ping
Traceroute

Handoko

  • Hero Member
  • *****
  • Posts: 5100
  • My goal: build my own game engine using Lazarus
Interesting, thank you for sharing it.

Unfortunately you didn't provide installer for Linux users. So I downloaded the source code and I saw the Windows unit in the uses clause. I am a Linux user.  :'(

KodeZwerg

  • Hero Member
  • *****
  • Posts: 1970
  • Fifty shades of code.
    • Delphi & FreePascal
Can you share "ssl_openssl3" unit? It is missing on my system.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

paweld

  • Hero Member
  • *****
  • Posts: 933
@KodeZwerg: you must install the synspse component from svn: https://sourceforge.net/code-snapshots/svn/s/sy/synalist/code/synalist-code-r278-trunk.zip
Best regards / Pozdrawiam
paweld

vonskie

  • Full Member
  • ***
  • Posts: 184
To get it to work you have to open the package file for synapse and tell it to add the openssl3.pas file or whatever its called. Once you add it to the packaged compile it and use it.


vonskie

  • Full Member
  • ***
  • Posts: 184
Took me awhile to get that sorted out.


vonskie

  • Full Member
  • ***
  • Posts: 184
Interesting, thank you for sharing it.

Unfortunately you didn't provide installer for Linux users. So I downloaded the source code and I saw the Windows unit in the uses clause. I am a Linux user.  :'(

I want to make a mac / linux version.

I am using a windows dll to do the send arp, not sure how to accomplish this with linux, may have to run the arp command and parse the output. At least that is what chat gpt says.



vonskie

  • Full Member
  • ***
  • Posts: 184
@KodeZwerg: you must install the synspse component from svn: https://sourceforge.net/code-snapshots/svn/s/sy/synalist/code/synalist-code-r278-trunk.zip

And I recently switched over to using the above also.


vonskie

  • Full Member
  • ***
  • Posts: 184
Another trick is you need the accesscontrol plugin for nsis so it will grant all users access to the programdata\ip Avail..etc directory so it can update the MAC database as it is stored there the installer script sets the rights for that directory.
 

abouchez

  • Full Member
  • ***
  • Posts: 110
    • Synopse
I am using a windows dll to do the send arp, not sure how to accomplish this with linux, may have to run the arp command and parse the output. At least that is what chat gpt says.
On Windows, there is indeed an official API to send ARP messages.
Chat GPT should have said that on Linux/POSIX the ethernet layer is available only for root due to security considerations, unless you set the CAP_NET_RAW capability for the executable.
Note that the "arp" command is not available by default on most distributions.

vonskie

  • Full Member
  • ***
  • Posts: 184
I am using a windows dll to do the send arp, not sure how to accomplish this with linux, may have to run the arp command and parse the output. At least that is what chat gpt says.
On Windows, there is indeed an official API to send ARP messages.
Chat GPT should have said that on Linux/POSIX the ethernet layer is available only for root due to security considerations, unless you set the CAP_NET_RAW capability for the executable.
Note that the "arp" command is not available by default on most distributions.

I originally wrote this as an experiment some 10 years ago single threaded. Then one day I was like I could use chat gpt to help with the multithreading. And before I knew it I was adding other features with chat gpt.
« Last Edit: December 12, 2023, 10:31:36 pm by vonskie »

Wallaby

  • Jr. Member
  • **
  • Posts: 76
I want to make a mac / linux version.

I am using a windows dll to do the send arp, not sure how to accomplish this with linux, may have to run the arp command and parse the output. At least that is what chat gpt says.
For Linux: while running the arp command sounds the easy way, I would discourage that. This command is not present on newer Linux distros and is basically a UI for kernel ARP tables. Instead it's better need to create a AF_NETLINK socket of type NETLINK_ROUTE and then request RTM_GETNEIGH to fetch kernel ARP tables (for IPv4 and IPv6).

Nothing too complicated, but you would need to translate the underlying C-structs to Pascal. Likewise, sending a ping is more complicated on Linux than Windows: creating AF_INET/SOCK_DGRAM/IPPROTO_ICMP socket and craft the packet headers. It then may not work and require root to open SOCK_RAW, so you have to fall back to running a hidden ping command and parse it's output (it's a SUID executable)....

For macOS: you would need to use sysctl vector like this CTL_NET/NET_RT_FLAGS/RTF_LLINFO to dump kernel ARP tables and find the IP-to-MAC address matches there. Sending a ping is similar to Linux except SOCK_DGRAM & IPPROTO_ICMP always work and root is not required.

I wrote a closed-source (try before you buy) Network Scanner app in Lazarus that makes use of those things, so I thought I might share the expertise.

vonskie

  • Full Member
  • ***
  • Posts: 184
I want to make a mac / linux version.

I am using a windows dll to do the send arp, not sure how to accomplish this with linux, may have to run the arp command and parse the output. At least that is what chat gpt says.
For Linux: while running the arp command sounds the easy way, I would discourage that. This command is not present on newer Linux distros and is basically a UI for kernel ARP tables. Instead it's better need to create a AF_NETLINK socket of type NETLINK_ROUTE and then request RTM_GETNEIGH to fetch kernel ARP tables (for IPv4 and IPv6).

Nothing too complicated, but you would need to translate the underlying C-structs to Pascal. Likewise, sending a ping is more complicated on Linux than Windows: creating AF_INET/SOCK_DGRAM/IPPROTO_ICMP socket and craft the packet headers. It then may not work and require root to open SOCK_RAW, so you have to fall back to running a hidden ping command and parse it's output (it's a SUID executable)....

For macOS: you would need to use sysctl vector like this CTL_NET/NET_RT_FLAGS/RTF_LLINFO to dump kernel ARP tables and find the IP-to-MAC address matches there. Sending a ping is similar to Linux except SOCK_DGRAM & IPPROTO_ICMP always work and root is not required.

I wrote a closed-source (try before you buy) Network Scanner app in Lazarus that makes use of those things, so I thought I might share the expertise.

Impressive program you developed...

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1026
  • Professional amateur ;-P
🤔 .oO( There's something quite wrong when your GIT repository looks more like a binary file system than a text only version control 🤨. More than 400 MiB for a repository?!?!? 🤬 )

Hey Y'all,

Humm, nonetheless I'm gonna attempt to do a tidy up by putting files where they should be according to the latest Open Source unwritten rules and maybe conjure up some Ci/CD to have Windows/Linux and macOS binaries on the releases.

Wish me luck :D

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1026
  • Professional amateur ;-P
Hey Y'all!!

The first tab of four is now complete and released: Test IP Scanner latest release.

This one was the easy one, since it's just an HTTP call to a service that returns one's public IP address.

The next one is the IP range scanner with threads and a thread pool, so 🤞 I can make it work.

As you can see this is gonna be featured in my Test 🌟 series, eventually( done ).

Cheers,
Gus
« Last Edit: December 16, 2023, 07:49:59 am by Gustavo 'Gus' Carreno »
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018