« first day (670 days earlier)      last day (2510 days later) » 

12:01 AM
RELOAD!
[Cardshifter/Cardshifter] 1 commit. 7 additions. 1 deletion.
[Cardshifter/HTML-Client] 4 issue comments.
[Hosch250/roslyn] 123 commits. 13043 additions. 72022 deletions.
[retailcoder/Rubberduck] 1 commit. 99 additions. 39 deletions.
[rubberduck-vba/Rubberduck] 3 commits. 3 opened issues. 1 closed issue. 14 issue comments. 1826 additions. 68 deletions.
[Vannevelj/VSDiagnostics] 2 opened issues. 3 issue comments.
 
I think I'm going to get all the windows hook stuff out of Rubberduck.dll and use the EventHook library instead - it seems more stable than what I came up with, and it makes that much COM/Win32 out of Rubberduck
 
Your code looks pretty solid from a COM level actually - you just have to remember that the message pump isn't executing in your thread. That means that you need to ensure thread safety for the callback arguments.
 
lol, that's the part I'm lost with
 
12:18 AM
@Comintern are the indenter command implementations hooked up? last I tried they weren't doing anything...
 
Yes, but the settings aren't. I was going to do that this evening.
Injecting an IndenterSettings might still be problematic - there's a circular reference problem.
 
there isn't. the indenter assembly defines and uses the interface; the main assembly does the binding at runtime, so the two are fully decoupled
IoC FTW :)
 
Yeah, what I can't sort out is how to get around having to duplicate a concrete implementation of some piece of IConfigurationService and XmlConfigurationServiceBase on SmartIndenter.
On the one hand, if I split part of the IConfigurationService interface off into SmartIndenter and have IConfigurationService implement it, it creates an ambiguous reference because XmlConfigurationServiceBase inherits from it.
On the other hand, if I only inject an IIndenterSettings it runs into the same timing issues I was having the other day.
 
12:36 AM
ugh. dat config API... you're right... we need to extract that IConfigurationService interface into something like a Rubberduck.Core assembly
 
Or maybe just a simple Rubberduck.SettingsProvider. That would also give some more flexibility in addressing the issue that was raised in #1290 about how local settings have the potential to interfere with source control.
 
Good point
 
It would make it easier to implement some sort of enterprise-wide provider.
I.e., if a team relies on a common configuration for reasons of source control, style guidelines, whatever, then can just pop in a different SettingsProvider.
 
I fully support this - you got a green light on it :-)
 
...or change the configuration to look for a database or a Rubberduck.config in a static location or whatever.
I'll try to make it quick and keep in sync with next - might be a bitch of a merge.
 
1:39 AM
@Mat'sMug does the resolver know what a document-type module's implicit WithEvents variable is? For example, does the resolver know that a ThisWorkbook module with a workbook_open signature relates to a Workbook object?
 
depending on how I did with the COM reflection code, it should
 
How do you tell whether a document-type module is, for example, a Workbook, or a Worksheet?
 
hmm I think I can't don't
 
Does/Will that impact inspections and refactorings?
 
IIRC there's a hard-coded list of prefixes we look for
e.g. a method starting with Workbook_ is deemed a workbook event handler
 
1:58 AM
Hmmm, so adding an ActiveX control to a sheet, and naming it workbook wouldn't be ideal.
 
it would be dumb... and it might actually confuse VBA itself...
 
2:16 AM
Sure, it's a dumb example, but given enough hosts and document-types, plus ActiveX controls, there's scope for collisions. I don't think VBA gets confused, as iirc, it keeps the details in the module, but doesn't export them.
 
I might be free from Roslyn tomorrow.
@Comintern Hey, while you are at it, you might be interested in letting RD load a custom config rather than the hard-coded one.
You could really just copy the saved config to the default file too.
 
But the reason I ask is because I'd like a way to view all document event handlers. For example, I just opened a workbook with 50+ sheets. I wanted to find the workbook and all of the sheets that had event handlers. The only way I can think of in VBE, is to search Worksheet_ in ObjectExplorer.
 
TIL git push origin hotkeywatcher != git push origin HotkeyWatcher ...dammit
but stupid VS Team Explorer doesn't know
and stupid GitHub-for-Windows doesn't know either
great
 
2:46 AM
delete all and re-clone worked great
@ThunderFrame you could expand the code explorer nodes and have a visual on them... no? (well, once the code explorer is stabilized that is)
And if you want to know who has a Worksheet_Activate handler, just type "activate" in the find symbol navigation tool
 
 
11 hours later…
1:35 PM
0
Q: Manage InputBox method reference entry

Máté JuhászExploring a bit VBA Application.InputBox method I've realized that catching user cancellation is tricky when type is reference, so return value is a range object. As cancellation's return value is False I can't assign it to an object with Set, so I've created a UDF to return Nothing when user p...

 
 
2 hours later…
3:51 PM
> This issue is also causing the Ready state to "stick", due to stale/duplicate VBComponent objects floating around in the _moduleStates dictionary with a Ready parser state.
 
@Mat'sMug Sure, if RD didn't crash my computer every time I reinstall it. — Kaz 1 min ago
I wonder how many of the 2.5K+ downloads ended up that way ... -_-
 
Kaz
@Mat'sMug All I can say is, I really want RD 2.0
Having been exposed to Source Control, having to code without it is driving me crazy.
 
trust me, I really want it too :)
 
Kaz
Due in 5 weeks, right?
 
something like that
hope all goes well
 
Kaz
4:03 PM
Can't Wait.
 
4:36 PM
> Related: ParserState is reporting Ready state as soon as one component is ready, which is wrong.
 
5:29 PM
[retailcoder/Rubberduck] retailcoder pushed commit d95999b8 to next: fixes #1311; problem reporting error state now
 
that's pretty cool - you can see inspection results update as the parser completes. the fix for #1307 shows that the "ghost declarations" occur when setting error state... which is a problem, because now there's no error state anymore
 
[rubberduck-vba/Rubberduck] build for commit d95999b8 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
ugh. nuget
 
6:02 PM
and failing tests
dammit
 
6:19 PM
@Duga From what I can see that shouldn't be the case...
EvaluateParserStateshould only return ParserState.Ready when all modules are Ready
 
@Mat'sMug Implement Interface works again, almost.
It says "Selection not valid", and I have to click OK, after it creates the interface but before it implements it.
 
woot! all tests pass again!
 
[retailcoder/Rubberduck] retailcoder pushed commit 36c9a648 to next: fixed parser issue with iCS_B_MemberCall precedence
 
            var moduleStates = _moduleStates.Values.ToList();

            var prelim = moduleStates.Max();
            if (prelim == ParserState.Parsed && moduleStates.Any(s => s != ParserState.Parsed))
            {
                prelim = moduleStates.Where(s => s != ParserState.Parsed).Max();
            }
            return prelim;
@Vogel612 if one is Ready and one is Parsing, prelim is Ready and the if evaluates to false, so Ready is returned.
 
right... same logic again ?
 
[rubberduck-vba/Rubberduck] build for commit 36c9a648 on unknown branch: AppVeyor build failed
BUILD FAILURE! (NOT YOUR ROSLYN BUILD @Hosch250)
 
6:50 PM
yeah
 
@Duga You almost gave me a heartattack. I thought it might be my Roslyn build for some reason.
 
lol
wait a minute... no. the tests that were failing pass. the tests that were passing fail.
FML
 
LOL.
 
I broke the grammar
now Option Explicit is parsed as a procedure call
I need coffee
 
BUILD SUCCESS
 
7:34 PM
bookmark:
Sub CrackPassword()


  Dim v1 As Integer, u1 As Integer, w1 As Integer
  Dim v2 As Integer, u2 As Integer, w2 As Integer
  Dim v3 As Integer, u3 As Integer, w3 As Integer
  Dim v4 As Integer, u4 As Integer, w4 As Integer
  On Error Resume Next

  For v1 = 65 To 66: For u1 = 65 To 66: For w1 = 65 To 66
  For v2 = 65 To 66: For u2 = 65 To 66: For w2 = 65 To 66
  For v3 = 65 To 66: For u3 = 65 To 66: For w3 = 65 To 66
  For v4 = 65 To 66: For u4 = 65 To 66: For w4 = 32 To 126


 ActiveSheet.Unprotect Chr(v1) & Chr(u1) & Chr(w1) & _
 
@Mat'sMug: what is the reason for the function CrackPassword?
 
7:55 PM
Unprotecting a worksheet that you don't have a pwd for :-)
It basically brute-forces all possibilities
I think
 
I doubt that this will work.
 
It does :-)
 
It absolutely works. It doesn't bruye force
It finds hash collisions, and there are many
Char 65 and 66 are a and b and you can find a collision with not much more than a sequence of a's and b's
I don't think it works on the stronger levels of encryption that are optionally availabale in 2013+
So not so much brute force as mild force, but typically it's cracked in under a second.
 
@ThunderFrame look at the w4 loop
It's brute force relying on hash collision ;-)
 
> not much more than a's and b's
Brute forcing the second last character, and all the rest are either a or b
 
8:09 PM
That what my thoughts were as well.
And what happens if the password is longer than 12 characters?
 
IIRC it works at unlocking Workbooks too.
@INOPIAE it doesn't matter what length the actual password is. Excel only compares the hash.
 
With not enough salt :-)
 
unsalted
 
Hash is bad enough. I bet it would be awful if it was salted.
And no, I haven't tried it, and I'm not going to.
It is my personal opinion that smoking hash is worse for the environment than driving cars.
 
I need to think about this but this seams to me
like security by obscurity
 
8:14 PM
I've seen production code with that module in it, and called when a sheet needs to be unprotected.
 
LOL, VBA is old. It was probably pretty much sufficient when it was released...
 
I am just testing it.
 
The VBA hook trick makes unprotecting VBA projects trivial.
 
I will show the source code one of my crypto guys.
 
But it's only relatively new. Previously it required minimal use of a hex editor.
@INOPIAE just add a debug.print of the passwords, and you'll see how a working password ends up as something like aaaaaaaabaga
Actually, the code I've used in the past, tries to unprotected, then checks if the sheet is no longer protected, then exits the function.
3
Q: Cracking Sheet Password with VBA

Mariusz GórskiI found this VBA code to unlock sheets without knowing the password: Sub PasswordBreaker() Dim i As Integer, j As Integer, k As Integer Dim l As Integer, m As Integer, n As Integer Dim i1 As Integer, i2 As Integer, i3 As Integer Dim i4 As Integer, i5 As Integer, i6 As Integer On Error...

 
8:25 PM
I cannot really believe it. But that is not anything near what I claim to be secure.
Some how my expectaions differ from the one of MS. ;-)
 
Encryption was a banned US export until 2000, so MS had to limit the encryption.
IIRC, there used to be a "Not for export" warning on the Office retail box. Just like there used to be a US version of Netscape and an International version
 
And I know that there is no real code signing available in MS Access. Which is mandatory in some business cases in Germany VBA codes in financal products.
At least in MS Access 2010 and younger
 
Well, decompilers can do a pretty good job of .Net IL and VB6.
 
@ThunderFrame: code signing is not encryption
 
Yes, I know -but Access doesn't offer the "Disable access to VBIDE" option, so if the project can be unprotected (which it can, if it isn't an ACCDE/MDE) then a malicious user can add their own code.
And even if it is an ACCDE/MDE then the pcode can be decompiled into VBA.
See my answer here for VBA protections:
5
A: Hide MS VBA screen in Excel 2010

ThunderFrameOnce you give your users physical access to a PC, you can't guarantee that your security won't be defeated. The whole industry even says as much: If a bad guy has unrestricted physical access to your computer, it's not your computer anymore Password protection is at best a deterrent. If you...

And this for Access (from the same guys that make vbWatchdog)
 
8:39 PM
You know the differnce between digital signing (here code signing) and encryption?
 
yes
but, IIUC, I could pull all of the code and data from a signed project, and rebuild in an fresh, unsigned project, and then do whatever I wished?
 
But than the integrity of the code I signed is broken and I do not have any liability of the code anymore.
 
9:08 PM
Yes, so unless the regulator forces the user to only be able to run signed code, then the requirement that code be signed on publish is not much of a protection.
But that's a bit like saying that users should only use approved calculations in a calculator. The whole point of a calculator is that it can do any calculation that it's capable of.
So like you say, you don't have liability for the code anymore, and like I say in the SO answer.. You need to make best efforts and educate users about policy, and know that determined users will find a way, and make sure the regulator can see your best efforts and policies.
 
 
1 hour later…
10:35 PM
[retailcoder/Rubberduck] retailcoder pushed commit 436a197a to next: added moduleOption parser test
Revert "fixed parser issue with iCS_B_MemberCall precedence"

This reverts commit 36c9a648aa524b09ca42502619eae77f28cc90ad.
[rubberduck-vba/Rubberduck] build for commit 4f724da1 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 

« first day (670 days earlier)      last day (2510 days later) »