xp2KeyCrypt 1.4.1 Final - August 12, 2013

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 FINAL - August 5, 2013

Post by Kilmatead » 2013 Aug 05, 21:04

On the plus side, considering how many lines of assembler it takes just to tie your shoes in the morning, 10,000 lines is really not that many - relatively speaking. :D

I learned Z80 assembler when I was 12 - does that count? The Basic that came with machines in those days was so slow that the only way to "smoothly" move bitmap graphics around for games was to do it "the hard way". What, you think a snotty 12-year-old had more noble motives? What's more noble than playing games? Leave this stuff up to adults and they just make boring things like... well... I don't know what adults did with it. I was 12. 12-year-olds don't give a fig for adults, unless it's dinnertime or they need a school permission slip signed.

All I knew is that I wanted my glowing green photonic caterpillar to move faster, so raster interrupts were the key. And let me tell you - nothing will stand between a 12-year-old and controlling his raster interrupts, certainly nothing so silly as a little assembler.

I have since forgotten pretty much all of it, but like swagger and chutzpah the important thing is where it gets you, rather than how long you hold on to it (this is what allows women to fall in love with bumbling idiots - if you can act like a non-idiot for more than 3 seconds even once in your life, you've already done that hard part). In my case, it made my photonic caterpillar move - which was worth more to me than all the adult cares and woes of the 20th-century combined.

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 06, 04:27

Sorry :oops:. I realized that I did not compile the program in Unicode. The new version have been uploaded now to the first post. You can now pass Unicode paths command-line parameters into it and it will properly forward it to xplorer2. It should now be final.

Just as a comment. It's the right tools for the job isn't it? It's great to know those Assembly and Fortran but sometimes it's not just not a great idea to use it for everything right? That's why a lot of programmers tend to use "easier" languages because they just need to get it working and do something instead of spending the time to find bugs and make sure it all work. Of course a lot of the more mission critical stuff is still written in the lower level language for the right reasons. But the right reasons are also why "easier" language are used. For example, LabView and Matlab code is excellent to use to design control theory systems. However when it's time to implement the final system, it's re-written to C and Assembly. It's horrible for the final system to use Matlab but it's also horrible to use C and Assembly to design and test the initial control system.

*Student write control code in LabView to test and run a helicopter
Professor: Excellent work! It works magnificently!
*Student implement the control code in LabView into helicopter
Professor: I'M NOT GETTING IN THAT HELICOPTER. NOT GIVING MY LIFE TO LABVIEW!!
*Student rewrote control code into C
Professor: Let's have a jolly good time!

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 06, 07:19

Enternal wrote:Just as a comment. It's the right tools for the job isn't it?
To be fair, the only people who "need" to know assembly these days (aside from critical optimisations) are BIOS writers - those are one of the few things which require the bespoke touch, as they are by default hardware dependant.

The question is not really one of "easier" or "right" (that's more or less up to the programmer involved if he has any respect for himself) - it's that the curriculum taught these days (as far as I can tell) seems to cover as broad a swathe as possible, with the basis geared towards familiarisation, and (weirdly) away from standardisation. Very few people seem to question the rather massive splintering/forking which seems to have occurred in language design (and whether or not it's justified or mere fashion) - at odds with the cross-platform trumpeting which echoes in empty streets. If I take an established language, arbitrarily turn the syntax on its head (just to be different), build in random support for two or more API systems - is any of it necessary? I get the idea that this sort of thing is aimed more towards who controls the proprietary interests of an implementation rather than the efficiency with which anything actually gets done.

As Drac pointed out, what's missing from "easier" languages is the discipline necessary to recognise how something works (on the lower level) so one can best see what causes the sloppiness and graft that inevitably slips in when people care more about the end-result than they do the whole-process. This is fine when one starts from the ground-up in the first place and is aware of why and how they are cheating the reaper... but for those who don't know... well, they fall into the "easier" trap and quickly find themselves out of their depth when the floods come.

Maybe that's what passes for industry Darwinism these days. :shrug:
Enternal wrote:I realized that I did not compile the program in Unicode.
And I wondered why my usual password of Sør3nK13rk3gårdAndRumpelst1ltsk1nAreΛάθος wasn't working... :wink: You don't want to hear this, but I'm getting way too many first-run failures from a cold-start to be comfortable with. Subsequent executions are fine and immediate, but the initial one is what gets people's attention. It'd almost just be simpler to change the delay to 10 seconds and be done with it. If x2 doesn't start in 10 seconds, people have bigger problems than passwords that are too long for hourly testing. It wouldn't be so bad if x2 didn't make quitting-out so difficult when it's in its "license demanding" phase.

In fairness, I'm intentionally testing for launching from an external drive with full protection overkill turned on and the I/O bus maxed out to better simulate "real world" conditions where one has no control over the host machine one plugs into. Essentially, the user ought never be greeted with a license failure, as not only does that look bad in front of a client :shock:, but it's also just a pain in the arse.

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 06, 08:05

Kilmatead wrote:To be fair, the only people who "need" to know assembly these days (aside from critical optimisations) are BIOS writers - those are one of the few things which require the bespoke touch, as they are by default hardware dependant.

The question is not really one of "easier" or "right" (that's more or less up to the programmer involved if he has any respect for himself) - it's that the curriculum taught these days (as far as I can tell) seems to cover as broad a swathe as possible, with the basis geared towards familiarisation, and (weirdly) away from standardisation. Very few people seem to question the rather massive splintering/forking which seems to have occurred in language design (and whether or not it's justified or mere fashion) - at odds with the cross-platform trumpeting which echoes in empty streets. If I take an established language, arbitrarily turn the syntax on its head (just to be different), build in random support for two or more API systems - is any of it necessary? I get the idea that this sort of thing is aimed more towards who controls the proprietary interests of an implementation rather than the efficiency with which anything actually gets done.

As Drac pointed out, what's missing from "easier" languages is the discipline necessary to recognise how something works (on the lower level) so one can best see what causes the sloppiness and graft that inevitably slips in when people care more about the end-result than they do the whole-process. This is fine when one starts from the ground-up in the first place and is aware of why and how they are cheating the reaper... but for those who don't know... well, they fall into the "easier" trap and quickly find themselves out of their depth when the floods come.

Maybe that's what passes for industry Darwinism these days. :shrug:
Well it might be an issue about money as well. If you love computers and love programming, it's more natural that you will start to investigate how the computers work at a lower level. Most people however are learning programming and Computer Science because it's the current "In" for making money (or so they thought) so they don't have any interests in anything other than what they need to make money. I love computers so I know quite well how computers work and a deep enough understanding of the lower level. I on the other hand don't love programming much so my depth of knowledge is not as high compared to many others who are definitely into it.

On the other hand, even if there's a lot of forking of languages, doesn't it seem that generally the useful and good ones are the one that succeed? The rest just become toys or past-time test drives as far as I can see. Or there's something I'm just missing?
Kilmatead wrote:And I wondered why my usual password of Sør3nK13rk3gårdAndRumpelst1ltsk1nAreΛάθος wasn't working... :wink: You don't want to hear this, but I'm getting way too many first-run failures from a cold-start to be comfortable with. Subsequent executions are fine and immediate, but the initial one is what gets people's attention. It'd almost just be simpler to change the delay to 10 seconds and be done with it. If x2 doesn't start in 10 seconds, people have bigger problems than passwords that are too long for hourly testing. It wouldn't be so bad if x2 didn't make quitting-out so difficult when it's in its "license demanding" phase.

In fairness, I'm intentionally testing for launching from an external drive with full protection overkill turned on and the I/O bus maxed out to better simulate "real world" conditions where one has no control over the host machine one plugs into. Essentially, the user ought never be greeted with a license failure, as not only does that look bad in front of a client :shock:, but it's also just a pain in the arse.
:lol: I actually do want to hear it because when you told me about how xp2KeyCrypt was being "grumpy", I wanted to just forget it but here I am sitting around trying to figure out how to make it work for the past few hours and I decided that... screw it. I'm just going to make it simple and add a long delay instead of trying to figure out how to make it detect that a second instance xplorer2 is running because it just ain't doing it when you start launching more than one instance. Or a better way is to remove "xplorer2 Not Starting Correctly. Quitting." and therefore if it's grumpy, it can be silently grumpy instead of popping up a dialog which the user has to hit OK. The reason is the second of xplorer2 IS starting so no need for that dialog.

EDIT: Hmm... I'm really starting to think I should just go for that idea of adding a 10 second delay and be done with it since we both have the same thought. If it's not starting, there are other issues. The program does do an initial check to see if the xplorer2 executable is there so what I'm doing now is unnecessarily complicating it.

I'm currently having similar issues with the XYplorer's version. The problem with that one is XYplorer has File -> Restart. That means, my program is going to lose track of whether XYplorer is still running or not when someone decided to restart the program. I currently have a nasty method (made by someone else) to do it but it's just not working nicely with Unicode for some reason so I can't compile the program in Unicode at all because it will break it. I also decided on that one to have a Window popup "Are You Finished With XYPlorer? Hit OK" and then the program will continue to encrypt and wipe the license/configuration file once the user hits OK. :lol:

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 06, 10:21

Regarding xp2KeyCrypt, I'd say a little extra applied logic at startup wouldn't hurt either - only ask for LIC if LIC does not actually currently exist - one of the most common things when programmes are slow to start is for people to just keep clicking the launcher ("a watched kettle never boils", etc), and can end up with multiple password requests. I don't mind multiple instances of x2 itself, but xp2KeyCrypt could just as happily die all the deaths of Hamlet without the drama. After all, even if the parent process dies two seconds (ultimate efficiency) or two minutes after the initial launch, the end user is unlikely to notice the actual difference. Again, this sort of thing is more ergonomic than important, but while you're still tinkering, the cheap-seats will keep heckling and clambering for more... :twisted:
Enternal wrote:...even if there's a lot of forking of languages, doesn't it seem that generally the useful and good ones are the one that succeed? The rest just become toys or past-time test drives as far as I can see. Or there's something I'm just missing?
I wasn't thinking so much in terms of people knowing how the hardware itself works for the language to be relevant - I was considering the implications of how design itself is approached (and limited) given the "easy" languages available.

For example, one of the reasons MS inadvertently shot itself in the foot (not for the first or last time) when it started introducing the .NET platform was that it encouraged programmers to use the library functions liberally (indeed, within the .NET environment you didn't have much choice). The problem was those libraries were buggy as hell and would crash and fail irregularly with very little the programmer himself could do about it without a lot of gymnastics.

Many languages suffer from this, with some people eschewing any form of library dependencies whatsoever - which is a bit of an extreme reaction, but if nothing else will teach people "how to think" about programming rather than just looking in the reference-index for a function that "looks good" and does all the work for them.

Plus, technically speaking, virtually every language these days is usually written in C to begin with, either the compilers themselves or the interpreter modules - so it's just one more level of abstraction away from what people could be using (with, admittedly, a few extra trusted libraries) anyway. The odd thing is that many students are never told this until much later in the courses - when they loudly exclaim "Hey, C is just like Javascript!" - and pretty much everyone in ear-shot suddenly feels the urge to instantly kill themselves out of shame. :wink:

Does anyone even bother teaching (or studying) bootstrapping anymore? Or is it purely considered an intellectual exercise for the bored and the nostalgic? (Wait, don't answer that... :wink:)

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 06, 11:28

Kilmatead wrote:Regarding xp2KeyCrypt, I'd say a little extra applied logic at startup wouldn't hurt either - only ask for LIC if LIC does not actually currently exist - one of the most common things when programmes are slow to start is for people to just keep clicking the launcher ("a watched kettle never boils", etc), and can end up with multiple password requests. I don't mind multiple instances of x2 itself, but xp2KeyCrypt could just as happily die all the deaths of Hamlet without the drama. After all, even if the parent process dies two seconds (ultimate efficiency) or two minutes after the initial launch, the end user is unlikely to notice the actual difference. Again, this sort of thing is more ergonomic than important, but while you're still tinkering, the cheap-seats will keep heckling and clambering for more... :twisted:
Ok I added that simple logic (haven't uploaded the executable yet though since still seeing what else I can do) and that's an excellent idea. I would have never thought about that but when I think about, I do remember seeing it quite often when I was younger in school as well. People just don't have the patience at times lol. Anyway I'm just going to stick with the silently grumpy method for now while I continue to decide :lol: and tinker with the other stuff to see how it goes. I think I'm already spending waay to much time on this already which is not what I intended to do in the first place haha. The XYplorer version is still unfinished as well since I need to get Unicode working.
Kilmatead wrote:For example, one of the reasons MS inadvertently shot itself in the foot (not for the first or last time) when it started introducing the .NET platform was that it encouraged programmers to use the library functions liberally (indeed, within the .NET environment you didn't have much choice). The problem was those libraries were buggy as hell and would crash and fail irregularly with very little the programmer himself could do about it without a lot of gymnastics.

Plus, technically speaking, virtually every language these days is usually written in C to begin with, either the compilers themselves or the interpreter modules - so it's just one more level of abstraction away from what people could be using (with, admittedly, a few extra trusted libraries) anyway. The odd thing is that many students are never told this until much later in the courses - when they loudly exclaim "Hey, C is just like Javascript!" - and pretty much everyone in ear-shot suddenly feels the urge to instantly kill themselves out of shame. :wink:

Does anyone even bother teaching (or studying) bootstrapping anymore? Or is it purely considered an intellectual exercise for the bored and the nostalgic? (Wait, don't answer that... :wink:)
My mechanical engineering professor hates the Arduino for that reason even though it's also C (albeit with a lot of new libraries). He said that C already comes with the true-and-tried libraries that were made long ago so he trusts them much more than those that comes with the Arduino which are "made by programmers who are motivated more by money than the stability of the libraries themselves" so he will only write hardware in pure C with the standard libraries and nothing else. As a result, his final projects for that class was really really time consuming yet we ended learning so much about the interfacing of electronics and mechanical systems. Plus C with the standard libraries are everywhere like you have said. So it's tested, tried, reliable, stable, and it works.

Bootstrapping? Like how one of the Ruby compiler projects involved writing the interpreter in Ruby itself? Nope I don't know :lol:

Tuxman
Platinum Member
Platinum Member
Posts: 1483
Joined: 2009 Aug 19, 07:49

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Tuxman » 2013 Aug 06, 14:36

Kilmatead wrote:To be fair, the only people who "need" to know assembly these days (aside from critical optimisations) are BIOS writers
... and security researchers, digging into undocumented code.
Tux. ; tuxproject.de ; Windows 10 x64
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012

User avatar
drac
Bronze Member
Bronze Member
Posts: 138
Joined: 2013 Jan 08, 00:14

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by drac » 2013 Aug 06, 18:33

It is NOT about making ones life harder, it is about learning the basics of ones craft - and programming is more an art than a science. Assembler gives one a perspective and an insight into the workings of the beast that one does not get from a high level language. Again, I was not suggesting the use of assembler forever - just for a period sufficient to learn and understand what is going on. This knowledge can be useful in high level language programming to write efficient code. If you are writing a little app to do a simple task you probably do not need to write efficient code - but if you are creating a program to perform difficult tasks in real time, you cannot afford to have an inefficient program. In large loops, every microsecond counts. And you don't learn that level of efficiency without a much more in depth understanding.

If you have never written a program that required you to shave execution time or memory space in order to meet the specs, you probably will not understand what I am trying to say. However, if you had to write a program that had a specific set of requirements that had to fit in 512 bytes of memory, you might appreciate the need for efficiency. I am sure that Kilmatead could say it better than I have.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 06, 20:16

drac wrote:I am sure that Kilmatead could say it better than I have.
Hey, it's my job to play the fool around here - holding me to some imaginary standard will get you nowhere. :wink:

Besides, I would imagine youngsters these days were all born after the apocryphal "640K ought to be enough for anybody" quote. As such, you'll never be able to sell them on the Art vs. Science interpretation any more than you could sell the Renaissance to Jacques de Molay. :shrug:

To seek the ephemera is a religious quest - to understand it is an artistic one. Despite all the odds, there is yet hope for the coder's holy grail. :D

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 07, 18:52

OOoh I found something! Remember when you said about finding the Windows class and using the FindWindow but the issue is with the documentation? I found some examples and it's simply:

Code: Select all

FindWindow_("ATL:ExplorerFrame",0)
So the 0 tells it to go through all process and look for any window with the class ATL:ExplorerFrame for xplorer2 or ThunderFormRT6 in the case of XYplorer. It works perfectly! Been testing it and it works really well!

However currently playing with another method that someone helped me which was another 100 lines of code. It can detect if the process being run matches up with the path. So that means if you go to your friend's house and he/she has her own xplorer2 process going on, xp2KeyCrypt could know the difference since the process path will be different than the one you ran. Still testing it though but it looks good.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 07, 19:33

Enternal wrote:So that means if you go to your friend's house and he/she has her own xplorer2 process going on, xp2KeyCrypt could know the difference since the process path will be different than the one you ran.
Keep in mind that x2 will by default run as a shared-process unless the user specifically launches via the /P argument. That means that if no /P is designated then no matter where x2 is launched from (even a physically separate path) its aegis will automatically be subsumed by the existing process - although appearing to all the world as a separate instance.

When incest is known to exist in a family tree, those little school projects about "Where Did You Come From?" the daughters announce at the dinner table are quietly and surreptitiously swept aside for the promise of a new dog and a trip to Coney Island, and never spoken of again.

One of the adages of programming (and, for that matter, masochism) is to calculate the value-to-return ratio - if it's not in your favour by natural design, call it an act of God and live to fight another day.

Personally (and I am in the minority here), I always give to the Benevolent Masochists Christmas Fund. Read into that what you may, though it usually involves the phrase "Can of Worms". :D

And you said this programming thing wasn't for you... seems your heart may not be listening to your brain. :wink: (Many projects, and many more illegitimate progeny, have been born from such a confluence of ills and vapours.)

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 07, 22:14

Kilmatead wrote:Keep in mind that x2 will by default run as a shared-process unless the user specifically launches via the /P argument. That means that if no /P is designated then no matter where x2 is launched from (even a physically separate path) its aegis will automatically be subsumed by the existing process - although appearing to all the world as a separate instance.
So you mean that if xplorer2_UC runs from C:\Users\ and another version run afterwards from I:\Users\, according to the system, both were run from C:\Users\? So basically what I'm trying to do will be useless? Darn. I guess I might really need to stick with the Windows Class method instead...
Kilmatead wrote:When incest is known to exist in a family tree, those little school projects about "Where Did You Come From?" the daughters announce at the dinner table are quietly and surreptitiously swept aside for the promise of a new dog and a trip to Coney Island, and never spoken of again.

One of the adages of programming (and, for that matter, masochism) is to calculate the value-to-return ratio - if it's not in your favour by natural design, call it an act of God and live to fight another day.

Personally (and I am in the minority here), I always give to the Benevolent Masochists Christmas Fund. Read into that what you may, though it usually involves the phrase "Can of Worms". :D
So... I'm opening up a can of worms? I think I agree... but temptations can be so hard to control at times :lol: But if what you said above is true, then maybe I should not proceed...
Kilmatead wrote:And you said this programming thing wasn't for you... seems your heart may not be listening to your brain. :wink: (Many projects, and many more illegitimate progeny, have been born from such a confluence of ills and vapours.)
:lol: Nah. It's just I have a somewhat bad habit of trying to make sure things take into account of all possible situations that whatever I'm doing may encounter. Right now I'm feeling really frustrated but I MUST make sure that the program does not fail under odd circumstances. Pretty much I'm making it harder for myself but... I really need to stop haha. The whole time when I was writing this program, I was thinking "What if the user does this? That? How about this? What if the program does this? that?". Ok I will need to force myself to stop... after I finish this writing this part of the prpogram :lol:

EDIT: Ok. I decided not to do the path checking method for the xplorer2 version (the XYplorer use it due to how the users use it so it really needs that feature). Also I finally use the debugger to check and fix any other errors that might have shown up. That's actually my first time ever using a debugger so that was interesting and fun! Don't ask me why I never used it :lol:. Anyway I have attach a semi-final version of it here so you can you please play with it and see if there are any other suggestions that you can give me. Other than that, I think I'm done now. :bigsmile:
LINK REMOVED. Up-To-Date Version Now Uploaded On First Post.
Last edited by Enternal on 2013 Aug 13, 22:42, edited 1 time in total.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 08, 07:05

Enternal wrote:So you mean that if xplorer2_UC runs from C:\Users\ and another version run afterwards from I:\Users\, according to the system, both were run from C:\Users\? So basically what I'm trying to do will be useless?
In the absence of a specific /P switch, that's exactly what I'm saying. (Never mind that I have no idea what would happen if one instance used the registry settings and the other one referenced its own INI. Hence the worms.)
Enternal wrote:It's just I have a somewhat bad habit of trying to make sure things take into account of all possible situations that whatever I'm doing may encounter.
Do.
Not.
Have.
Children. :wink:

When Helmuth von Moltke the Elder wrote "no plan survives contact with the enemy" he was thinking of you. Take his words to heart and save yourself some future ulcers.

Ok, thus far (not to be taken as future-proof) this revision of xp2KeyCrypt seems much more solid. The only concern I can see (aside from a few pointless Delay() calls) is at the end of "Setup" the LIC is destroyed after the 7za.exe converts it into the DAT - except there is no check that the DAT was successfully created.

For example, if the user (for whatever reason) did not have write-permission to that folder or an over-anxious security programme decided to choke up, the 7za.exe call would fail (silently or not) and the script would continue to (convincingly) destroy the existing LIC no matter what.

One could pedantically argue that if the user does not have write permission he probably wouldn't have delete permission either, but that's splitting hairs and forgetting how much sunspots and alien invasions actually influence our daily lives. :wink:

A wee check to verify DAT's existence would be nice, if not the integrity of the archive itself (you are, after all, destroying the user's only potential on-site copy of his or her key).

I will endeavour to find something else to break. :D

Addendum: Also, as an ergonomic suggestion, since you now are comfortable using the FindWindow_() results, and emulating a launcher, if the user attempts to launch another instance right now (and the LIC exists) you just have the programme exit (no extra instance is launched, as would be expected). But if the LIC does not exist, and an x2 instance is already active the poor user still has to go through all the trouble of laboriously typing in "Sør3nK13rk3gårdAndRumpelst1ltsk1nAreΛάθος" every time. This seems like an overly-anal policeman. Image

Oh, and a /Cappuccino command-line switch would be just dandy. Necessary even. Really. Withdrawal is setting in. I can feel it. The world is going dim... :wink:

Enternal
Member
Member
Posts: 54
Joined: 2013 Aug 03, 05:28

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Enternal » 2013 Aug 08, 11:10

Kilmatead wrote:
Enternal wrote:So you mean that if xplorer2_UC runs from C:\Users\ and another version run afterwards from I:\Users\, according to the system, both were run from C:\Users\? So basically what I'm trying to do will be useless?
In the absence of a specific /P switch, that's exactly what I'm saying. (Never mind that I have no idea what would happen if one instance used the registry settings and the other one referenced its own INI. Hence the worms.)
Haha I'm glad I'm going to avoid this can of worms. To be honest, I'm actually quite tired now. Both this and XYplorer version initially started out extremely similar but over the past week, they keep diverging and integrating one thing from one version to the next got a bit tedious :evil:
Kilmatead wrote:Do.
Not.
Have.
Children. :wink:

When Helmuth von Moltke the Elder wrote "no plan survives contact with the enemy" he was thinking of you. Take his words to heart and save yourself some future ulcers.
Suggestion taken! :lol:
Kilmatead wrote:Ok, thus far (not to be taken as future-proof) this revision of xp2KeyCrypt seems much more solid. The only concern I can see (aside from a few pointless Delay() calls) is at the end of "Setup" the LIC is destroyed after the 7za.exe converts it into the DAT - except there is no check that the DAT was successfully created.

For example, if the user (for whatever reason) did not have write-permission to that folder or an over-anxious security programme decided to choke up, the 7za.exe call would fail (silently or not) and the script would continue to (convincingly) destroy the existing LIC no matter what.

One could pedantically argue that if the user does not have write permission he probably wouldn't have delete permission either, but that's splitting hairs and forgetting how much sunspots and alien invasions actually influence our daily lives. :wink:

A wee check to verify DAT's existence would be nice, if not the integrity of the archive itself (you are, after all, destroying the user's only potential on-site copy of his or her key).
Ok. It's been implemented. Good thing 7-zip already has the function built-in so I can just simply call it up to verify the archive's integrity! Now... I think I did something kind of cool. I have put the 7za binary information directly inside the file. So now whenever it starts, it will write 7za.exe in the running directory and when it finishes or exit for any reason, it will delete it. That reduce 2 executable down to 1! On the bad side, the overal executable size now is around 300 KB. Plus with that size, I can't really upload it onto the forum. So I guess I will make "two" version. One where they can download 7za themselves with xp2KeyCrypt uploaded to the forum. The other is the xp2KeyCrypt with 7za integrated which will be on Dropbox.
Kilmatead wrote:I will endeavour to find something else to break. :D
Lol! I already expected that.
Kilmatead wrote:Addendum: Also, as an ergonomic suggestion, since you now are comfortable using the FindWindow_() results, and emulating a launcher, if the user attempts to launch another instance right now (and the LIC exists) you just have the programme exit (no extra instance is launched, as would be expected). But if the LIC does not exist, and an x2 instance is already active the poor user still has to go through all the trouble of laboriously typing in "Sør3nK13rk3gårdAndRumpelst1ltsk1nAreΛάθος" every time. This seems like an overly-anal policeman. Image
Hmmm... I think I'm still confused what you mean. Or it's probably because it's now 4am over here. I think I will go to sleep and think about it tomorrow... plus a RPG game is coming tomorrow so... lol. I might be a bit "busy".
Kilmatead wrote:Oh, and a /Cappuccino command-line switch would be just dandy. Necessary even. Really. Withdrawal is setting in. I can feel it. The world is going dim... :wink:
:lol: I know this is an xplorer2 forum but XYplorer supports a really powerful scripting feature (as far as I can see, much more powerful than what xplorer2 or Directory Opus have to offer). One of the scripting commands though is somewhat of an easter but the command ":makecoffee" makes coffee for you!
MakeCoffee.jpg
Anyway, I have uploaded the new binaries at: https://www.dropbox.com/sh/n73u54twqpzoko8/GdBtgdej9A
It's now stored with my XYplorer version since it makes it easier for me to keep track of all things in one location. Also you don't need to download 7za.exe since the new binaries have 7za integrated. *sigh I think I really need a break from this for a day or too lol.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xp2KeyCrypt 1.3 Final (Unicode) - August 5, 2013

Post by Kilmatead » 2013 Aug 08, 13:04

Maybe it's just me not reading the PB logic right...

Code: Select all

While ProgramRunning(Integrity7z) : : Wend
If ExitCode = 2
	MessageRequester("xp2KeyCrypt Error " ... )
	EndCleanup()
EndIf
Wipe("X2.LIC")
But considering that EndCleanup() is nothing more than a removal of the 7za.exe, it looks rather like the Wipe() is executed regardless of a successful integrity check or not. I haven't intentionally created a fail-state to check it yet (in case PB is sneakier than I thought), but it doesn't look right.

Also, just after that (when setup is complete), you conveniently re-launch the program to save the user the trouble of clicking the shortcut again, except you forgot to pass any initially given arguments. Ain't minutia fun?

I have no doubt that many anti-virus toys will just love the idea of your binary unpacking another binary just to execute it - usually that sort of thing is reserved for static resources or DLL's. There's nothing wrong with doing it, and it is "cleaner" - but there may be pitfalls. :shrug: On that same theme, if you're still playing with UPX compression, you'll note that that's one of the main causes of AutoIt/AHK scripts being flagged as evil-doers...

Regrettably x2's "scripting" is indeed a limited affair, forcing us to be more inventive than your average litter of kittens. Having an open and practical API is one of those things that never seemed to dawn on Nikos, and x2 suffers for it - but such is life. Considering that file managers are niche-products anyway, the actual percentage of users who would delve to such a level is virtually non-existent - so it's kind of a chicken-vs-egg argument. He did not exactly imagine 10 years ago when x2 was initially pushing kicking and screaming into this life that weirdo's like myself would be messing with its entrails. :shrug:

xyplorer's quite impressive for a manager written in basic, but it can never seem to get away from the "shiny" impression of too many niche-requests being granted for the sake of customer relations, and not enough attention brought to the depth of the shell itself. The same applies to x2 in reverse - a little more thought put into fluffy GUI nonsense (because people like their fluffy) wouldn't hurt. But that's just my opinion - at the end of the day all file managers essentially do the same thing and the users are just quibbling about the paint-job. Besides, we're not here to play comparison games, enough of that goes on elsewhere. (Although I will point out that your own xyKeyCrypt seems to have suffered a lukewarm reception so far on that forum - no discussions of assembly, no humour, no suggestions... where's the fun? You'll need to work harder to wake them up, the grumpy bunch. :wink:)

Post Reply