ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   can vba import code to vba project ? (https://www.excelbanter.com/excel-programming/305267-can-vba-import-code-vba-project.html)

Mike Iacovou

can vba import code to vba project ?
 
OK. There must be a gas leak in the house & i'm not thinking straight, but i have an idea regarding VBA security i'd like y'all to gun down just so i don't spend hours tinkering and bombaring this place with questions...

It seems that VBA be used to add code to a given module from an external file ie .txt or formal .bas etc If (and it is a very big if) the importing procedure involved actual processing of the data on-the-fly, then core code could be stored in an encrypted external file & imported at runtime and decrypted on the fly (i think there is even a blowfish class for excel around etc).

( Obviously, this sort of flight of fancy would only come to someone who has no idea how to convert a multi-module / form VBA system into a COM / VB app ! )

If code can't be appended, end of discussion. If it can, i suggested on-the-fly decryption as i assumed that "garbage" in would cause some compile errors before the decrpyt system could correct it... it may need to be imported to a blank sheet, decrpyted there and then copied to code - on-the-fly decryption will only work for a few algorythms now i think about it (ie MD5 would need whole string to parse for it to work)

Any comments ? (be gentle - i'll start things with "learn VB...")

Frank Kabel

can vba import code to vba project ?
 
Hi Mike

and I will just 'hack' your import/decrypt routine (which
will be in VBA) and see your decrypted code without a
problem :-))

So if you want secruity you need a VB6/COM add-in

-----Original Message-----
OK. There must be a gas leak in the house & i'm not

thinking straight, but i have an idea regarding VBA
security i'd like y'all to gun down just so i don't spend
hours tinkering and bombaring this place with questions...

It seems that VBA be used to add code to a given module

from an external file ie .txt or formal .bas etc If (and
it is a very big if) the importing procedure involved
actual processing of the data on-the-fly, then core code
could be stored in an encrypted external file & imported
at runtime and decrypted on the fly (i think there is even
a blowfish class for excel around etc).

( Obviously, this sort of flight of fancy would only come

to someone who has no idea how to convert a multi-module /
form VBA system into a COM / VB app ! )

If code can't be appended, end of discussion. If it can,

i suggested on-the-fly decryption as i assumed
that "garbage" in would cause some compile errors before
the decrpyt system could correct it... it may need to be
imported to a blank sheet, decrpyted there and then copied
to code - on-the-fly decryption will only work for a few
algorythms now i think about it (ie MD5 would need whole
string to parse for it to work)

Any comments ? (be gentle - i'll start things with "learn

VB...")
.


Mike Iacovou

can vba import code to vba project ?
 
thanks frank. of course any vba project passwords can be "exploited" in seconds using existing workarounds... and then the code is available. You can then reverse the decrypting routine - except that things like blowfish are open source - i had the idea of the blowfish system - the only way to decypt the code even having the decyption code is to brute force the password... the hard part then is to actually have the decryption password "safe"... was just a point for discussion.
cheers.


All times are GMT +1. The time now is 11:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com