Leaderboard
Popular Content
Showing content with the highest reputation on 02/25/2025 in all areas
-
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
genius257 and one other reacted to SOLVE-SMART for a topic
@argumentum Understood, well you're right and I will change the slashes. Important: of course I am the "sql sensei" - everybody knows that π€£ - irony mode off. The project was not planned as a teaching tool. I wanted to have an easy starting point when it came to questions about SQLite usage. Then I could add concrete examples. The current ones are just tiny showcases, not more. That's why I have to think about how this can and should develop. Thank you too @genius257 for your statementπ€ . I am not sure yet. But as you can read few lines above, I try to figure out how this can and should develop. Exactly, this is intended for now. Please see this litte paragraph - I don't try to create another SQL(ite) UDF. I like that summary very much, thanks. I also have to think about it - but sounds very reasonable. All fine genius257, I appreciate every ideas, suggestions etc. so thanks again. Agreed, I will use "\" slashes and will be consistent throughout the project. π‘ At the moment, my intention was to test the current state. Test by different situations/systems/circumstances. It's a pretty early version of the project, so there will probably more changes soon. And I am very curious what you guys will say about the upcoming (bigger projects). Stay tuned π . Best regards Sven2 points -
CryptoNG UDF - Cryptography API: Next Gen
Werty and one other reacted to argumentum for a topic
... Func __CryptoNG_BcryptImportKeyPair($hAlgorithmProvider, $sKeyBlobFile, $sKeyBlobType, $xKeyBlob = Binary("")) If $__gbDebugging Then _DebugOut(@CRLF & "Function: __CryptoNG_BcryptImportKeyPair()") Local $aResult[0] Local $iError = 0, _ $iStatusCode = 0 Local $tBuffer = "" Local $hFile = -1, _ $hKey = -1 ;~ Local $xKeyBlob = Binary("") If $xKeyBlob = Binary("") Then ;Make sure file exists If Not FileExists($sKeyBlobFile) Then Return SetError(3, 0, "") ;Read binary blob file $hFile = FileOpen($sKeyBlobFile, $FO_BINARY) If $hFile = -1 Then Return SetError(4, 0, "") $xKeyBlob = FileRead($hFile) FileClose($hFile) EndIf ... Placing $xKeyBlob as a parameter I think would work nicely2 points -
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
Danyfirex reacted to SOLVE-SMART for a topic
Hi everyone π , thank you in advance for looking at the little project and for thinking about supporting it (me) π . Introduction I have a small AutoIt + SQLite GitHub project (sqlite-showcase). This serves at 1οΈβ£. glance to demonstrate how to use SQLite using concrete examples. If questions arise in the English or German forum about SQLite, I can provide direct assistance using the project and its example data. As 2οΈβ£. perspective, this project is intended as a module for a subsequent project that deals with something more than "just" AutoIt + SQLite - but more on that another time. I deliberately refrain from writing and explaining too many details here, because it is important to me, among other things, that the explanation on GitHub, in the form of a README file, can be handled or whether I need to make improvements there. Testing So far I have been able to test the project under Windows 10 (x64), with AutoIt v3.3.16.1 and with SQLite v3.49.0. Due to the support of the german AutoIt forum member(s), I could also test with Windows 11. Now I would be very happy if someone among you (several people are welcome) π€ would test other system configurations. See the following table: The test consists of the following parts: Read the README, understand what to do ==> If there are already problems understanding this, then I have to make improvements. Setting up the project (getting started) ==> Is the explanation in the README sufficient? You can test it on Windows 10 x86? Then please, great. Do you have an old version of AutoIt that you can test with? That's exactly what I need ==> Thanks. You want to try a different SQLite version? Why not, I appreciate it. Are the few SQLite functions running correctly or are there any errors? They shouldn't, but if they do, please let me know. Preconditions You don't need Git or GitHub, although Git is an advantage. A simple download of the project (zip) is completely sufficient (see README). Just a little time, curiosity, interest in learning something new or putting my approach to the test π . π₯ CHANGELOG can be found here. --------------------------------- Thank you very much for your interest and for your support. If you have any questions, please let me know. Thanks. Best regards Sven Update: Testing complete.1 point -
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
SOLVE-SMART reacted to genius257 for a topic
Hi @SOLVE-SMART, The main purpose of this is to show best practices for error handling and logging? What ideal level of AutoIt experience is this for? I feel like this wraps too much of the original SQLite UDF, without extending it much. The issue i see is that this seems most like a implementation template. Meaning currently if followed, potential bug fixes and improvements won't be easy to add later, for a bigger project. Better error handling and logging is great, but should be it's own UDF/Project. This will reduce the code needed and allow upgrading the dependency later on, by replacing the dependency with the new version and following a simple laid out upgrade guide, if necessary. Maybe I'm in the wrong, but it just seems like too much code spread out, for demonstrating simple concepts? Not trying to be a douche, just my critique π But really great idea, wanting to have a good introduction to usage and best practices!1 point -
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
SOLVE-SMART reacted to argumentum for a topic
In my view, this is for Windows OS and it does not use forward slashes. Giving that most users copy and paste ( ..well, that's what I do ), setting an example..., sets an example. Therefore: as a teaching tool, we do it as correct as possible and comment as much as possible because we ( well, you ) are guiding young minds and everything should be impeccable. You are now to be known as the "sql sensei" Think of it as writing a book. A good example is better than a book, in my book.1 point -
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
argumentum reacted to SOLVE-SMART for a topic
Thanks @argumentum for statement and review π . Function _PathFull() have to correct my slashes, so do you recommend to change it directly? Hmm π€ , I will think about it - because there is no real issue with that an I enjoy the VSCode extension "Path Intellisense" which auto-completes paths while I write them - but only in case of forward slashes. That's why I use them. Interesting and funny. I am absolutely not finished with the project and I don't know how far this could be more framework'ish or more simple ... time will show I guess. Thanks. Best regards Sven1 point -
[Completed] Volunteers wanted π to test an AutoIt + SQLite project
SOLVE-SMART reacted to argumentum for a topic
$mSqlite.Path = _PathFull('../lib/sqlite/') ; based from the location of main.au3 it uses maps and that is newer. Forward slash that: Func _PathFull($sRelativePath, $sBasePath = @WorkingDir) If Not $sRelativePath Or $sRelativePath = "." Then Return $sBasePath ; Normalize slash direction. Local $sFullPath = StringReplace($sRelativePath, "/", "\") ; Holds the full path (later, minus the root) ... has to correct. As a project to show how to use obscure things ( for the uninitiated ) is a good idea as a teaching tool. But it looks more like a framework, and with that I have issue, given that "it leads the subject", as they say in court/lawyer/judge type of TV drama, to use the framework's workflow more than SQLing** with SQLite. ** SQL-ing [Verb]: To do SQL stuff. [ Encyclopedia Britannica, 2045 ] ( yes, one day in the future, people will say sqling, and you saw it here first ) My 2 cents. Glad to see that someone (you) is putting together a teaching tool. Nice1 point -
CryptoNG UDF - Cryptography API: Next Gen
argumentum reacted to kroman82 for a topic
Thank you very much argumentum !1 point -
CryptoNG UDF - Cryptography API: Next Gen
kroman82 reacted to argumentum for a topic
ok, here is my running code/idea: <removed> I will remove this file in a few days to save in forum file space. I hope this is all you are after @kroman82 ( I worked on it because I've got things to do but I don't wanna do 'em but am anxious π€ͺ ) Edit: removed zip. New v2.4.0 can now accept the public/private key blob as either a string containing the file path to the key blob file or as binary data containing the key blob itself.1 point -
Hello TheXman I have a question that again goes a little beyond the scope of this UDF but may be your or anybody else can help me please? question: How can I encrypt a message with a public key (yes, the new RSABLOB format) without saving the public key to file? I have a binary format public key $serverPubkey = 525341310008000003000000000100000000000000000000010001c8f5ec669823656ebd398d7a3678980aed425cacb1699829103e2c5d3c0dfbd3ad485c86e20e282125837a051a595fa8fecb18e6111208685f5a363226330052f61f9aeac61f7037b294027231327207caf85d181bf69f88969464f57877b9cfdf1a712178f64eb384bef0ea83c1eb8afc8182a7d9ae4d899a091a7b3e2b835f27224955312fd8de31bec7677eebe0f9d35023ae3af187f4941d8f19164be6757981c5f498fbcb88bcdf08c9806ba70bd428c7da73c30a9483404bef917c1eaa3fbd63e2607ccd81325be1e15c1d6233c23c860ca0c3eecf6f5b9a12e9bb4dd02e99c8fa2315d756919d3f351933b9281d6272275a5e413f7fbaf29b486654ab and tryed to use it in a function Func _CryptoNG_RSA_EncryptData($sText, $sPublicKeyBlobFile = Binary('0x'&$serverPubkey), $iPadding = Default, $sProvider = Default) and again Func _CryptoNG_RSA_EncryptData($sText, $sPublicKeyBlobFile = Binary($serverPubkey), $iPadding = Default, $sProvider = Default) and other crazy variants with no luck...1 point
-
Here another approach to display large MsgBox (based only on mouse). I had this code for WMI when lots of properties need to be shown : #include <Constants.au3> #include <WinAPIProc.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> #include <WinAPIConstants.au3> Opt("MustDeclareVars", True) Global Const $tagMOUSEHOOKSTRUCT = $tagPOINT & ";hwnd hwnd;uint wHitTestCode;ulong_ptr dwExtraInfo;dword mouseData;" Global $hHook Example() Func Example() Local $hStub = DllCallbackRegister(WH_MOUSE, "LRESULT", "int;wparam;lparam") $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE, DllCallbackGetPtr($hStub), 0, _WinAPI_GetCurrentThreadId()) Local $sList = "First line here" & @CR For $i = 2 To 200 $sList &= "Line " & $i & @CR Next $sList &= "Last line here" Local $iRep = MsgBox($MB_OKCANCEL, "Example", $sList) _WinAPI_UnhookWindowsHookEx($hHook) DllCallbackFree($hStub) EndFunc ;==>Example Func WH_MOUSE($iMsg, $wParam, $lParam) If $iMsg Then Return _WinAPI_CallNextHookEx($hHook, $iMsg, $wParam, $lParam) Local $tMouse = DllStructCreate($tagMOUSEHOOKSTRUCT, $lParam) Local $hWnd = _WinAPI_GetAncestor($tMouse.hwnd, $GA_ROOT) If $wParam = $WM_MOUSEWHEEL Then Local $iDir = _WinAPI_HiWord($tMouse.mouseData) WinMove($hWnd, "", WinGetPos($hWnd)[0], WinGetPos($hWnd)[1] + ($iDir / 3)) ElseIf $wParam = $WM_LBUTTONDOWN Then If $tMouse.hwnd = $hWnd Then WinMove($hWnd, "", WinGetPos($hWnd)[0], 0) ElseIf $wParam = $WM_RBUTTONDOWN Then WinMove($hWnd, "", WinGetPos($hWnd)[0], @DesktopHeight - WinGetPos($hWnd)[3] - 50) EndIf Return _WinAPI_CallNextHookEx($hHook, $iMsg, $wParam, $lParam) EndFunc ;==>WH_MOUSE Left click will bring you to top Right click will bring you to bottom Mouse wheel to scroll the MsgBox Enjoy !1 point
-
Thank you very much TheXman ! You make my day! So one issue gone... now I'm have the last one issue (this is out of scope, but may be...): It would be nice to find solution how to convert PEM-formatted public key to "RSA blob" format (CryptoNG API's) (I'm not sure but maybe it can be done just a moving header from "MS blob" file to "RSA blob" file)1 point
-
Hello TheXman Thank you very much for your UDF! Sorry my english! I'm try to use this with windows and linux and have some problem ( func "rsa_public_private_key_encrypt_decrypt_data_example()" works well Than I'm create public+private key pair in Ubuntu with openssl: openssl genrsa -out privkey.pem 1024 openssl rsa -in privkey.pem -pubout -out pubkey_server.blob -outform "MS PUBLICKEYBLOB" and transfer pubkey_server.blob to windows next I'm insert this public key into your example Func rsa_public_private_key_encrypt_decrypt_data_example() Const $ALG_ID = $CNG_BCRYPT_RSA_ALGORITHM, _ $MESSAGE = "This is a super-secret message.", _ $PUBLIC_KEY_FILE = "pubkey_server.blob", _ $PRIVATE_KEY_FILE = "example_rsa_privatekey.blob" Local $sDecryptedMessage = "" Local $xEncryptedMessage = Binary("") and get error ERROR: Bad data supplied to function. Done My goal is -> get public key from "server" -> than encrypt data (text message for example) and -> send data to server server must can decrypt this message. Please, can you help me to solve this issue? Where I'm wrong? Is this "padding" issue? Too many questions... sorry!1 point