Jump to content

Clément

Members
  • Content Count

    357
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Clément

  1. Clément

    TCP ping

    For some devices a TCP connection is required, and I can send 1 or 2 bytes to trigger a response. In this case, for these devices, ICMP is disabled. dhsPinger allows to create a "device type" and choose the ping technology. You have the option to send bytes to trigger an answer.
  2. Clément

    TCP ping

    Yes I know. But this is how it's called. I managed to build a class where I can create a non-blocked socket connection with a timeout parameter. Usually the connection is pretty fast, and when the host doesn't exists, the timeout kicks in. But I'm afraid I don't know ICS internals to use a base ICS class. I still need to polish it. My first "ping" is way off... 8ms... when all other are below 1ms... Another thing, I'm not sure if there's something I can do about it, not all hosts can be "pinged". For example: I can ping "ICMP" 192.168.0.6 and there's a reply. If I ping "TCP" it returns not available host. My tcpPing class can ping any port, but by default it uses port 80. I m using vanilla winsock and winsock2. After some more tests I will post my code here.
  3. Hi, I'm almost releasing "dhsPinger v2.00" . One of the features is recognize a network device manufacturer taking the device MAC Address. Since the first version I'm generating a list with all available MAC vendors in a unit, this latest version has 49978 rows. (The very first release has 16k rows) My MACvendors.data unit is autogenerated, and has 50028 lines. It looks like this: var glbVendors : TDictionary<String,String>; procedure InitializeVendors; begin glbVendors.Add('286FB9','Nokia Shanghai Bell Co., Ltd.'); glbVendors.Add('08EA44','Extreme Networks Headquarters'); glbVendors.Add('F4EAB5','Extreme Networks Headquarters'); {... 49978 rows ...} glbVendors.Add('8C1F64657','Bright Solutions PTE LTD'); glbVendors.Add('8C1F64C9B','J.M. Voith SE & Co. KG '); glbVendors.Add('8C1F64B01','Blue Ocean UG'); end; initialization glbVendors := TDictionary<String,String>.Create(49978); InitializeVendors; finalization glbVendors.free; There's no impact on loading, and I had no problems (so far) using this structure. Getting the MAC and it's vendor is done from within a thread. The IDE (delphi 11) is handling it fine. When rebuilding, almost a minute is required just to compile this unit. But It's a freaking 50k lines unit. Is there any known limit I should be aware of? (Project compiles to windows only, both 32-bit and 64-bit are required ). TIA, Clément
  4. I will take a look at this sample. I'm still using V8.71. Thanks
  5. Cool. I'm using ICS to ping. From Threads Thanks for the link
  6. If I choose to ignore the compilation hick-ups, I had no issue. But for this project, an external file has it's advantages. This application runs on some servers where the internet connection is fiercefully controlled. Among other things, the new engine in this release will run also from a Windows Service. No outside connection will be allowed from this service (security issues) The download will happen from the interface ( the picture I posted in the first message). In the Service version, a notification will be sent to a registered administrator every time a "new device" is detected. One of the requirement is to have as much data as possible to identity it. Up until now, I would have to compile that 50k unit and include that unit in both, the interface and the service. Now both will load an external file.
  7. I'm downloading the CSV files from (https://standards-oui.ieee.org/). Those are the files processed that grew to 50k.
  8. It's a simple lookup. I never expected it to grow so fast. A pre-build event download some files, processes them, generate a unit that is compiled with the project. Everything is packet in a single exe file. I noticed some hick-ups when compiling and found out that unit. I know this not an excuse, but it was supposed to be a simple lookup in a simple application. Thanks for the advice
  9. I meant, I couldn't release the application the way it is now ( 50k unit file). I will generate an external file, and load it at start up.... so a Beta V is on the way.
  10. I just couldn't release the app like that. There will be a Beta V in the near future Thanks all for the insight!
  11. Clément

    How do I execute code after FormShow ?

    But... Message numbers in the second range (WM_USER through 0x7FFF) can be defined and used by an application to send messages within a private window class. These values cannot be used to define messages that are meaningful throughout an application because some predefined window classes already define values in this range. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range should not be sent to other applications unless the applications have been designed to exchange messages and to attach the same meaning to the message numbers. Since I'm explicitly posting a message to a private window that is designed to handle it in a specific way and is not a subclass of a Windows control, it should be safe to use it. Isn't it?
  12. Clément

    How do I execute code after FormShow ?

    If it's a VCL ( or FMX ) application, I prefer using messages: const _UM_AFTER_SHOW = WM_USER +$0001 ; /// SOme constant.. Be sure not to repeat the number Type TForm1 = Class( TForm ) private procedure event_AfterShow( var aMessage : TMessage ); message _UM_AFTERSHOW; end; Implementation procedure TForm1.OnShow( aSender : TObject ); begin Inherited; {.. some code } PostMessage( Handle, _UM_AFTERSHOW, 0 , 0 ); // This will post a message to itself end; procedure TForm1.event_AfterShow( var aMessage : TMessage ); begin // Run the code here end;
  13. Hi, In this project I must use Delphi XE with dbExpress. I'm connecting against a SQL Server 20xx.... There's a customer requesting a TLS 1.2 only setup. Using sslscan I get this result: SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 disabled TLSv1.1 disabled TLSv1.2 enabled TLSv1.3 disabled With this setting I'm unable to connect my sample project ( TSQLConnection only ). When activating the connection an error is raised (attached image) When reactivating the other verions : SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 enabled TLSv1.1 enabled TLSv1.2 enabled TLSv1.3 disabled Everything works fine. I'm searching the web, but the only two parameters I found out, are not working with the XE version of dbExpress. I wondering if there's any way to connect to SQL Server via TLS1.2 only setup. (https://stackoverflow.com/questions/65050540/tls-1-2-sql-server-and-delphi-client) Are there any other parameters I can try? Tia, Clément
  14. Clément

    Delphi XE, dbExpress, SQL Server 2016 and TLS 1.2

    Well... after all, this is a Delphi XE project. This is the first bump after all this time
  15. Clément

    Delphi XE, dbExpress, SQL Server 2016 and TLS 1.2

    I build a small sample using vanila dbExpress using Delphi 11.3 to try to connect to SQL Server in a TLS 1.2 only setup. No joy. (It seems to me dbExpress is linked to Native Client 10 or 11 only) The way I managed to connect is using dbExpress Driver for SQL Server (trial version). From either Delphi XE or Delphi 11.3. Very simple. Good job! Using other tecnologies: ADOConnection, ZConnection, FDConnection etc worked fine on in both IDE. I just can't migrate this project from dbExpress to any of these.
  16. Clément

    Delphi XE, dbExpress, SQL Server 2016 and TLS 1.2

    I will try it. Thanks
  17. Clément

    When will we have a 64-bit IDE version ?

    If I could guess, I would say, 64 bit IDE is not in their short term plans. BUT.... They have been working hard to "clean up" some features. ( Some still need some love) All that work will payoff, and among other things, the availability of 64 bits ( I'm an optimist, shoot me!). <SpyVsSpy> I'm almost certain some fellow developer is trying to compile "the project" in 64 bits and hopefully the hints, warnings and errors are getting lower. </SpyVsSpy>
  18. Clément

    New Grep Expert in GExperts - need a name

    Grep'oMania Greppsody VelociGrepXpert
  19. Hi, I googled to find some hints on how to create my own VPN solution. I'm still researching and I found nothing in Delphi (or pascal) that covers this subject. Some C examples are in linux, but I would like to focus on windows only. Any ideas? TIA
  20. I'm still reading and trying to figure some aspects of this projects. May be I just need to learn a little more to be able to ask my friend the right questions.
  21. This is one of my strongest arguments against this projects. But since it's a friend, I want to make sure I can explain the "why, hows, and don'ts" He considered other applications ( I will ask him about WireGuard ), and most have "extra features" that are not required. He just wanted a "plain old simple VPN" that works without extra features that goes way beyond what he requires. When some specs uses the word "simple", it just makes me run the other way. The problem in this case is the "friend" part. He would have asked if didn't required it. So.. Now that I learned a little more to be scared, I think I can get him scared too .
  22. As far as I can tell, a VPN ( no system-wide local network ) , a "basic" secure channel... I'm gathering information for our next meeting.
  23. N in VPN (local network between peers connected through the channel) I was just talking with a friend, and he would to have his own VPN integrated solution. He asked me if I could do it (write both VPN server and Client in Delphi). And I said that I have no idea! If possible, I would like to use SSTP as protocol and ICS as Client and Server app. After googling up a little and found some python implementation of a "simple VPN server". I found C samples to open a Private Network in windows. Some code (in Python) of a VPN server, and some client application In C too... Unfortunately nothing in Delphi (or pascal). I'm just hoping not to find the word "Driver" in the specifications Anyway, I hope to find a way to implement the basics
  24. Clément

    Click a link in EDGE Browser

    In this project I'm downloading a page in EdgeBrowser. My application is extracting the main table, and displays it nicelly in a TreeView structure. The HTML table has several rows, and the last cell has a "ng-click" which I need to click. My TreeView already has a button, when the user clicks that button, I must click the corresponding "ng-click" and download detailed information about the product and display it. The last cell information looks like this (This is the last cell HTML code.) I have no idea how to reach that "ng-click" fellow: <a href="" class="btn btn-transparent" ng-if="::thisProductInventory.availableBallast && thisProductInventory.isAvailable" ng-class="{'btn-block':$root.mediaQueries['$res-phone-mid-landscape']()}" ng-click="ProductInventory(thisProductInventory, $event)"> There's no Click, onClick or any other option which I'm familiar with. It appears to be some Angular stuff. Can shed some light? I'm using DOM to navigate / extract data from the page. So ideally id would be perfect to reach something like "element.click()". (I have no way to modify the javascript code. All I can do is "interact" through Delphi /Edge with the page.) TIA
  25. Clément

    Click a link in EDGE Browser

    JS is scary! Goes against everything that is safe and sound. I really can't say who ( or what) wrote that code. It be can be a person, a framework or ChatGPT. They prefer to use a "Desktop application" to handle filtering and selection rather than modify the code. This should raise some red flags.
×