Jump to content

Crash

Active Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Crash

  1. Thank you. I got it working with #include <GUIConstantsEx.au3> #include <WinAPITheme.au3> $GUI = GUICreate("Test", 200, 300) GUISetBkColor(0x000000) ; black GUI GUICtrlSetDefBkColor(0x000000) ; black bg controls GUICtrlSetDefColor(0xFFFFFF) ; white text controls $chk1 = GUICtrlCreateCheckbox("You can't see me", 25, 50) $chk2 = GUICtrlCreateCheckbox("You saw me", 25, 100) ; strip XP theme ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($chk2), "wstr", 0, "wstr", 0) _WinAPI_SetWindowTheme(GUICtrlGetHandle($chk2), 0, "") ; gui stuff GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE
  2. #include <GUIConstantsEx.au3> $GUI = GUICreate("Test", 200, 300) GUISetBkColor(0x000000) ; black GUI GUICtrlSetDefBkColor(0x000000) ; black bg controls GUICtrlSetDefColor(0xFFFFFF) ; white text controls $chk1 = GUICtrlCreateCheckbox("You can't see me", 25, 50) $chk2 = GUICtrlCreateCheckbox("You saw me", 25, 100) ; strip XP theme DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($chk2), "wstr", 0, "wstr", 0) ; gui stuff GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSEHere you go I couldn't have came up with the theme stripping code myself. Good thing I found that in forum The white dotted border below is just Windows showing that control is active. The key here is that the text is not recoloured by GUICtrlSetColor (or in my case, GUICtrlSetDefColor) Remarks from GUICtrlSetColor help: If anyone could actually contribute to the help file, it'd be great to add in the strippnig code. It isn't very obvious to a beginner like me.
  3. Haha I certainly don't know how I feel about this. I think it's nice for beginners like me who don't quite know our ways around. It would be quite frustrating if a function doesn't work. But I agree that in this particular case the constants shouldn't be commented out but instead only be warned in the help files. Recently a big head scratching moment for me when I tried to change the text colour on checkboxes. Although it is noted that GUICtrlSetColor wouldn't work on checkboxes with XP theme, I'm on Win 10 as far as I'm concerned. It took a long time to figure that that the "XP theme" is at fault and I should strip the theme first. These little moments made me wanna shout at my screen. Oh I hope AutoIt admins are reading this; I hope they will implement Windows 10 custom colour changing title bar. Or the task bar item acting as progress bar. Or Windows 10 notification centre.
  4. Ahh thank you I forgot to search the forum before posting a new topic. I apologise. I followed some links and MSDN confirmed that SHA-2 is not supported under XP SP3: (This is going to be useful for other forum searcher) My current implementation includes a fallback. I'm not a good programmer and this is not tested on XP, but here goes: #include <Crypt.au3> Const $algo = 0x0000800c ; SHA-256 Const $algofallback = $CALG_SHA1 $passwd = ...... ; typed by user $salt = ...... ; generated with _Crypt_GenRandom Local $hash = _Crypt_HashData($passwd & $salt, $algo) If @error Then $hash = _Crypt_HashData($passwd & $salt, $algofallback) ; fall backI hard coded SHA-256 code to improve compatibility when others compile my code, and uses @error to see if SHA-256 can be used. I hope that's secure Any constructive criticisms welcomed!
  5. haha Windows XP isn't supported now anyway so I think this lack of SHA-2 is the least of their concerns. Thanks for the confirmation!
  6. Dear AutoIt communities, I wish to perform SHA-256 hashing with AutoIt. I noticed Help File shows the use of MD2, MD4, MD5, SHA1. To my knowledge, all of these aren't cryptographically secure anymore and SHA-2 (SHA-256, SHA-384, SHA-512) is the way to hash passwords. I poked around Crypt.au3 and found SHA-2 constants are commented out. Why is this? I'm using latest public release, v 3.3.14.2 ; #CONSTANTS# =================================================================================================================== Global Const $PROV_RSA_FULL = 0x1 Global Const $PROV_RSA_AES = 24 Global Const $CRYPT_VERIFYCONTEXT = 0xF0000000 Global Const $HP_HASHSIZE = 0x0004 Global Const $HP_HASHVAL = 0x0002 Global Const $CRYPT_EXPORTABLE = 0x00000001 Global Const $CRYPT_USERDATA = 1 Global Const $CALG_MD2 = 0x00008001 Global Const $CALG_MD4 = 0x00008002 Global Const $CALG_MD5 = 0x00008003 Global Const $CALG_SHA1 = 0x00008004 ; Global Const $CALG_SHA_256 = 0x0000800c ; Global Const $CALG_SHA_384 = 0x0000800d ; Global Const $CALG_SHA_512 = 0x0000800e Global Const $CALG_3DES = 0x00006603 Global Const $CALG_AES_128 = 0x0000660e Global Const $CALG_AES_192 = 0x0000660f Global Const $CALG_AES_256 = 0x00006610 Global Const $CALG_DES = 0x00006601 Global Const $CALG_RC2 = 0x00006602 Global Const $CALG_RC4 = 0x00006801 Global Const $CALG_USERKEY = 0 Global Const $KP_ALGID = 0x00000007 I thought this could be compatibility issues, and older Windows doesn't support SHA-2. Without knowing what I am doing, MSDN help appears to say SHA256 is available since Windows Platform 10 (https://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256(v=vs.110).aspx) However other sources said SHA-2 has been supported since Win XP SP 3. What is happening? How can I implement SHA-2 with confidence that it will work on Win XP? Unfortunately I do not have an older computer or virtual PC to test it out. I'm running latest Windows 10 and SHA-256, SHA-384, SHA-512 all works fine. (If you like to try on your machine, I've attached the help file hashing example with SHA-2 algo added) Thank you yet again Crash sdfsdaf.au3
  7. Thanks everyone for the reply. I appreciate your time. Thanks for the confirmation of doubt. I guess it's because AutoIt is closed-source that no one is able to confirm how it works under the hood, huh. I can now see why C is still such a popular language today although it is pretty much ancient relic. It's very low level and gives you a lot of control. (I denied learning C and had learnt AutoIt instead; secretly hoping C would die. Almost 10 years later, C is still around and strong.)
  8. Thanks. I understand a variable local to a function is scoped within it, and that means the variable is not accessible outside of the function. I am as unsure as you are whether if the memory gets cleared out. Although I might not be able to access it, the password may remain around as scrap data in some part of memory! D: Thanks for the advice! I'm not training in programming and that is quite startling. Is it because AutoIt is too high-level? Too many stuff in between that may compromise security? Thanks for your reply. You lost me completely XD I'm as fuzzy as the theory suggests. haha. Thank you for the reminder; I have forgotten about this. To others, you can declare a local variable with the same name as a global variable and they'll be treated differently. If you don't write 'Local' within your function, the compiler will think that you're referring to the global variable and overwrites its value instead. Ah THANKS! I think this is the answer I'm satisfied with XD So atrocious, much evil!
  9. A long time ago, Windows allow a file called autorun.inf to tell Windows which file to run automatically; this is EXACTLY what you asked for. Insert, say, an installation disc, and Windows will run the correct install.exe, because autorun.inf tells Windows which file to run. Then, malware came along and used this to their advantage. They tell Windows to automatically run themselves when USB is plugged into another computer, thus they spread that way. If you hear about autorun malware, this is what they meant. As BetaLeaf said, Microsoft appeared to have reconsidered this and turned it off by default now. You can still turn on autorun manually, and autorun.inf would still work, but on most modern computers, it wouldn't.
  10. Hi AutoIt community! I have a quick question. According to AutoIt help file on Variables, So what the meaning of "auJasperatically destroyed"? Is it completely destroyed or might be destroyed? I am writing a security software and it is important to not let any password lingers in the memory. In a function, I have saved the password typed by user in a local var. I am not sure if I need to reset this variable before the function ends. (Or is there any better security practices?) Thanks very much!
  11. Basically some functions are created to 'pause' and 'terminate'. Then you have a While 1... WEnd command which loops until the script is terminated/paused. You can put the clicking command within the While loop, and it should click furiously for you.
  12. ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here ;;;; While 1 Sleep(100) //Click command here? WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc I see that this is a fully working script.
  13. Buggie! If you have enable password protection, maybe create some journals and close Journal.exe. Then delete all the entries. Open Journal.exe again and try to change password. You will get this error: C:\Users\Crash\Desktop\Journal.au3 (212) : ==> Subscript used with non-Array variable.: $progress = $files[0] > 50 $progress = $files^ ERROR Buggie 2! In the $instructions variables, this is typed: When switching computer your password will be forced to create a new passwordon the new computer....... Please add a space between password and on. Thanks. PS. Nice program. Please perhaps zip a compressed version for people to download? I don't have any icons for the Journal.exe
  14. Using WinSetState will help you. To hide the IE Window, use this: WinSetState("[CLASS:IEFrame]", "MSN.com", @SW_HIDE) Note that the word MSN.com is used to tell AutoIt which window to hide. Replace it by the title of the IE window you are trying to hide. Say, you went to google. The title bar will have the word "Google - Windows Internet Explorer", so your coding will be: WinSetState("[CLASS:IEFrame]", "Google", @SW_HIDE) If you went to http://misc314.com, your codings will be: WinSetState("[CLASS:IEFrame]", "Misc314", @SW_HIDE) You can also make it into: WinSetState("[CLASS:IEFrame]", "Misc314 - Windows Internet Explorer", @SW_HIDE) (With Windows Internet Explorer added) But I don't advice that. If the user has the words removed, your script probably won't work anymore. To show the IE window again: WinSetState("[CLASS:IEFrame]", "", @SW_SHOW) You don't need to add anything, say MSN.com, into the double-quotes above. More more information, you can type 'WinSetState' in the AutoIt SCITE window and press F1. The help file can really help you a lot. Cheers, and good luck.
  15. What is the script to make a tiny square pop up above the taskbar near the clock. I mean just like when someone signs in Windows Live Messenger, you'll get a pop up as in the picture below:
  16. 99ojo: Thanks for telling me the trick!! Now I fully understand! Richard Robertson: Too bad, isn't it? But thanks to you too! But for me, it'll be better is AutoIt can't, because if it can, it will be further abused by virus programmer. Don't you think so? There are already many "autoit viruses" out there. For your info, XMSS virus is also programmed using AutoIt.
  17. Melba: Oh sorry. It's because 'please' is written as 'pls' in Asia. It's short-cut for your info. By the way, what does the Reference link do? Others: Thank you all very much. But I still need to figure out the scripts first.
  18. Kafo: Wow, even a useless code can become a useful one when it's passed through your hands! PhilipG: Yohohohoho, I'm glad. Credits go to me!! Jk jk.. Credits still goes to others. I did nothing
  19. Try this: #include <DateTimeConstants.au3> ;For the date control $dateinput=GUICtrlCreateDate(@YEAR&"/"&@MON&"/"&@MDAY, 670, 67, 155, 20) ;Create the control- for reference $DTM_SETFORMAT_ = 0x1032 ;Will start to change the style $style = "d MMM yy"
  20. Hi, let's don't beat about the bush and cut straight to the topic. I have 2 files. One main.exe and one action.exe (both autoit programs) Main.exe will interact with users and sends commands to action.exe and action.exe is supposed to carry out the actions. So like if I want action to do action 1, I will execute it like this: ShellExecute("action.exe", "1") But the problem now is, how do action.exe know the parameter? I mean, how to make it READ the parameter? Pls Please help me If you're asking me why I want to make them into 2 separate files instead of one. It's simple: because of UAC problems. action.exe will request admin rights and main.exe don't. So anyway, pls please help me!!! Thanks in advance!!
  21. Sorry I can't be much of help, but to say that your word "address" is spelled wrongly.
  22. I don't really understand what you mean, by I can help if you want to break for example "appleisgoodforme" into "appleis" and "good for me". For this, you can use the code StringSplit ( "string", "delimiters" [, flag ] ) I myself is not so good with this, so you can really check out the Help File. Hope I'm helping.
  23. This is an additional question from the post http://www.autoitscript.com/forum/index.php?showtopic=106698 By the way, all the answers here are provided by trancexx. Many thanks to you! So my question is how do AV get their permission (although you said that I granted it)? I did not type my password or whatever. I just installed it and it is able to run in full permission mode. How is it done so?
  24. I am creating a program and make itin such a way so that every user can run the program will full admin rights without having to call UAC and enter the password. I have think of letting the admin type his/her username and password and my program will save it inside the computer. Whenever my program needs to execute another exe (my program got many exe files), it will use RunAs() function and include the username and password. But this is all too risky. What I need to know is that: -When I attempt to delete a file in my HomeDrive (c:) using AutoIt, the file is sometimes deleted and sometimes not. (Mostly not) FileDelete("C:\lalala.txt") Is there a way to delete the file without elevating UAC? Antiviruses program can even delete a file (virus) from system directories without permission granted. P.S. If you say that AV programs are able to delete viruses because viruses are not protection by the system; then why is my innocent (and useless) TXT file protected? P.P.S. If there a way to edit registry keys without UAC elevating too? Many thanks if solutions or ideas are provided.
×
×
  • Create New...