-
1 Attachment(s)
Help me i'm drowning in my source code, hey dudes
Dear Formers,
I have a project of mine, that i am working on right about now, then here is the problem of mne. I have some hard coded encription that i have made. the encrption works fine. but then the decription of the source output file, doesn't work right, like so. I am using my ActivEX control that i wrote a good long while ago. it works and the output file, is about 2Bytes in total. Then i have to make the source output of a video that is about 41.8Mb in total file size. Can someone please help me to fix my problem at hand???
!! Thanks in advance !!
Attachment 181747
-
Re: Help me i'm drowning in my source code, hey dudes
So you basicly need to decrypt/decompress a 41.8MB video from a 2 bytes file?
Hmm, there are certain institutions that can help in your case that I can think of as VBForums members tried to explain why this is impossible and generally to help you but they are obviously not qualified for dealing with people that need such help.
cheers,
</wqw>
-
Re: Help me i'm drowning in my source code, hey dudes
I know. I had the encriptor working, it was in the beta version 10Bytes, but then now it's about 2Bytes. So then there was an advancement in the contruction of it, then so
-
Re: Help me i'm drowning in my source code, hey dudes
I'd suggest to make these 2 Bytes of yours -> Zero-Bytes...
Then combine these with a Zero-Point-Device - and you can prodcue basically evrything from that...
(Free-Energy, Black-Matter, Black Suns and what not...).
There's channels on youtube you could subscribe to - but as wqweto already said:
This is the wrong forum for this kind of stuff.. ;)
Olaf
-
Re: Help me i'm drowning in my source code, hey dudes
I'm writing for the Illumanti and it's government agencies that work with defence. it's like the rebirth of the Internet, like so
-
1 Attachment(s)
Re: Help me i'm drowning in my source code, hey dudes
Right i got it to inflate the file with data. However what is the EOF syntax, that i need to have inplace for the file to complete inflation of data, which is now working for me, then so.
-
Re: Help me i'm drowning in my source code, hey dudes
-
Re: Help me i'm drowning in my source code, hey dudes
So we have this central piece of "crypto" code
Code:
Public Sub InitLUT()
Dim X As Long, Y As Long, bChr As Byte
For X = 0 To 255
baLUT(X) = X
Next X
Rnd -1
Randomize 1234
For X = 1 To 255
Y = Int(X * Rnd)
If X <> Y Then
bChr = baLUT(X)
baLUT(X) = baLUT(Y)
baLUT(Y) = bChr
End If
Next X
For X = 0 To 255
backLUT(baLUT(X)) = X
Next X
End Sub
This is based on seeding the VB's built-in pseudo-random number generator with preset starting seed in the "Randomize 1234" line and generating an infinite entries (more like only 64k ones) of randomness to initialize a couple of LUTs (forward and back) so that I/O byte-arrays can be shuffled fast. Similar Caesar ciphers have been broken since millenia and are nowhere near WW2 Enigma strength (which was broken 80 years ago too). . . Anyway.
I couldn't find the compression bits but what exactly is not working here?
cheers,
</wqw>
-
Re: Help me i'm drowning in my source code, hey dudes
I have had the same conversation with TheImp for years.
He doesn't know the difference between hashing, encryption and compression.
Still thinks that you can retrieve the original content for a given hash.
-
Re: Help me i'm drowning in my source code, hey dudes
I'm wondering where did the OP pinched this piece of code from?
It's generally pretty well structured one although not very useful.
cheers,
</wqw>
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
wqweto
I'm wondering where did the OP pinched this piece of code from?
It's generally pretty well structured one although not very useful.
I've uploaded this PRNG-based "crypto-routine" about 20 (25?) years ago in the ms-vb6 NewsGroup.
Olaf
-
Re: Help me i'm drowning in my source code, hey dudes
Can someone please look at my source code and write the possible file making file, using the variable of strBuff, which holds the data to fill the file, with data
Code:
Option Explicit
'
Dim strBuff As String
'
Public Sub Form_Load()
On Error Resume Next
Rem Slient open dialog box form.
With Main.CustomDialog1
.Action = 2
strBuff = .Data
.DefaultFilter = "mkv"
.FileName = "Mask-Ep1.mkv"
.Filter = "mkv"
.FilterEnabled = False
.Path = "C:\Temp\"
End With
strBuff = StrConv(LoadResData("1", "MASK"), vbUnicode)
Open "C:\Temp\Mask-Ep1.mkv" For Input As #1
Line Input #1, strBuff
Close #1
Rem Slient save dialog box form.
With Main.CustomDialog1
.Action = 4
.Data = strBuff
.DefaultFilter = "mkv"
.FileName = "Mask-Ep1.mkv"
.Filter = "mkv"
.FilterEnabled = False
.Path = "C:\Temp\"
End With
Open "C:\Temp\Mask-Ep1.mkv" For Output As #1
Print #1, strBuff
Close #1
MsgBox "Please wait for the computer to finish the processes.", , "Message"
End Sub
I'm working on this for the grab of data process, any ideas on how to make it better, then so.
Code:
Option Explicit
'
Dim strBuff As String
'
Yack Yack
Rem Put something here, then that is so cool, even.
Do While Not EOF(blah)
Line Input strBuff, #1
Debug.Print strBuff
Loop
-
Re: Help me i'm drowning in my source code, hey dudes
Could anyone see the problem with this source code of mine, thanks in advance...
Code:
Dim a As Integer
blah
blah
strBuff = StrConv(LoadResData("a", "MASK"), vbUnicode)
Open "C:\Temp\Mask-Ep1.mkv" For Input As #1
Do While Not EOF(1, 1)
Line Input #1, strBuff
Loop
Close #1
-
Re: Help me i'm drowning in my source code, hey dudes
If you are expecting to get a working movie from what you have in that res file you will surely drown. The res file is less than 100 bytes. Thats not even enough for the header info much less the actual audio and video of a movie. There is no such thing as a compression routine that can take a 100mb file and compress it to under 100 bytes then restore the original from those <100 bytes and compressed movie files are usually 500mb or more if they have any quality to them.
-
Re: Help me i'm drowning in my source code, hey dudes
it works with txt windows text files, then why not more than that, one
-
Re: Help me i'm drowning in my source code, hey dudes
A movie file should be handled by binary file IO.
Thus "Open For Binary" instead "Open For Input" or "Open For Output"
Also use "Put" and "Get" instead of "Print" and "Line Input"
Also DON'T use StrConv(), that's for text only!
-
Re: Help me i'm drowning in my source code, hey dudes
okay then. What should the source code look-like then. I am using Open For Binary in the CustomDialogBox Control. I thought that i should run it with it, but then not sure on the right mix of source code, for me to use on it
-
Re: Help me i'm drowning in my source code, hey dudes
Explain what this code should do.
Quote:
Code:
Dim a As Integer
'blah
'blah
' First action: Filling the variable strBuff with data from the resource file
strBuff = StrConv(LoadResData("a", "MASK"), vbUnicode)
' the content of strBuff is completely ignored and overwritten with parts of a MKV file
Open "C:\Temp\Mask-Ep1.mkv" For Input As #1
Do While Not EOF(1, 1)
' Replacing the content of strBuff with a single line from a file..
Line Input #1, strBuff
Loop
Close #1
' Here strBuff only contains the last text line from the .MKV
' But: MKV files are binary files, not text files
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
it works with txt windows text files, then why not more than that, one
Text files compress better than most types but even a text file can not be compressed from 100mb to less than 100b unless of course they contain pretty much nothing other than white space. If you put a text file into a zip file for example it is likely to be much smaller than the original but if you do the same thing with an avi file the zip file will be very close in size to the original. AVI and other popular movie formats are already compressed. To actually get a movie into a res file is possible for sure but that res file is going to be 100s of megabytes in size.
-
Re: Help me i'm drowning in my source code, hey dudes
But then with the powerful encription then you could use it to your advantage
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
Arnoutdv
Explain what this code should do.
Well that source code, is able to extract the file from the resource file. then it writes the file as a normal data file, then so
-
Re: Help me i'm drowning in my source code, hey dudes
No, it reads data from the resource in a string buffer, which should be a byte array.
Then you open a file for reading and try to read text file lines from a binary file, in the same string buffer
-
Re: Help me i'm drowning in my source code, hey dudes
Yeah to open the resource file, then to reopen it and save it as a normal file and then not a resource
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
I'm writing for the Illumanti and it's government agencies that work with defence. it's like the rebirth of the Internet, like so
The government of Elbonia? Holy crap, I finally get it. This is a 14 year long troll account by Scott Adams. Well done.
-
Re: Help me i'm drowning in my source code, hey dudes
Who is Scott Adams, then so???
my name is: Richard Graeme Ambra, okay then
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
wqweto
So you basicly need to decrypt/decompress a 41.8MB video from a 2 bytes file?
Hmm, there are certain institutions that can help in your case that I can think of as VBForums members tried to explain why this is impossible and generally to help you but they are obviously not qualified for dealing with people that need such help.
cheers,
</wqw>
Are you always so pedantic in the responses or do you stop every 2 post?
Each response of yours is, one to denigrate people and the other to help. You can be "valuable" in a forum, but if you are a disgusting person, any troll that registers is the same. I've been seeing your answers for a long time
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
AthlonArg
Are you always so pedantic in the responses or do you stop every 2 post?
Each response of yours is, one to denigrate people and the other to help. You can be "valuable" in a forum, but if you are a disgusting person, any troll that registers is the same. I've been seeing your answers for a long time
You should go back and read the OP's posts from the last several years. They might be enlightening.
-
Re: Help me i'm drowning in my source code, hey dudes
-
Re: Help me i'm drowning in my source code, hey dudes
Here in the block quotes of Bold, etc says that I have an error in the EOF, which was before than, then it was LOF. Can someone spot the trouble, here then
Code:
Option Explicit
'
Dim a As Integer
Dim strBuff As Byte
'
Blah
Blah
Blah
strBuff = StrConv(LoadResData("a", "MASK"), vbUnicode)
Open "C:\Temp\Mask-Ep1.mkv" For Input As #1
Do While Not EOF(1, 1)
Line Input #1, strBuff
Loop
Close #1
-
Re: Help me i'm drowning in my source code, hey dudes
Do you have the MSDN library files installed for VB 6.0?
"EOF Function
Syntax
EOF(filenumber)
The required filenumber argument is an Integer containing any valid file number."
-
Re: Help me i'm drowning in my source code, hey dudes
Could you please state the syntax of that???
i believe the syntax is something like this:
-
Re: Help me i'm drowning in my source code, hey dudes
This is the command LOF being used in my project, to work with the ReDim command, then.
Code:
ReDim bAry(LOF(1) - 1)
If i were able to substitue the LOF for EOF, and also paged the EOF into a ReDim, then get rid of the bAry, which is a function in my encriptor, deencriptor, also then so. What would the syntax of that,look like then???
-
Re: Help me i'm drowning in my source code, hey dudes
I promised myself I wasn't going to do this but...
Quote:
i were able to substitue the LOF for EOF, and also paged the EOF into a ReDim
You can't "page" the EOF... it's a single thing and it stands for End Of File.. it is the marker that is put at the End Of a File to mark its termination.
I don't know what LOF is supposed to be or what you're trying to do there, but you're not doing what you're saying. Opening a file for input isn't opening it for writing... and Line Input READS text... it doesn't write... you need to open your file for OUTPUT probably OUTPUT AS BINARY (or something like that) ... and then use a PUT statements (I think that's right, it's been a while since I've written byte arrays in VB6) to write the byte data to the file...
Your code doesn't do what you think it does. Not even close.
-tg
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
This is the command LOF being used in my project, to work with the ReDim command, then.
Code:
ReDim bAry(LOF(1) - 1)
If i were able to substitue the LOF for EOF, and also paged the EOF into a ReDim, then get rid of the bAry, which is a function in my encriptor, deencriptor, also then so. What would the syntax of that,look like then???
LOF and EOF are two very different functions.
Thinking they are related reminds me of a story Bill Gates has told. He said on two different occasions, Donald Trump asked Bill Gates if HPV and HIV were related.
Whoa, wait a minute. L and E are 7 letters apart. P and I are also 7 letters apart. 7!
Holy crap, Illuminati connection confirmed! Aaaaaaaaaaaaahhhhhhhhhhhh1
-
Re: Help me i'm drowning in my source code, hey dudes
actually I am refering to the source code, of LOF, which means Line Of File, which is somewhat of a bit of a naughty way of making the program scan for a line by line, access route to saving or reading files, to the disk, even.
-
Re: Help me i'm drowning in my source code, hey dudes
Could this source code snippet work, right or then not so, even like that one for me to use or not, like
Code:
Dim Item1 As Byte
Blah
Blah
ReDim Item1(EOF(1) - 1)
-
Re: Help me i'm drowning in my source code, hey dudes
I have been able to make a breakthrough with my working project, as of now, even so. The source code, is as follows:
Code:
Option Explicit
'
Dim a As Integer
Dim strBuff As String
'
Public Sub Form_Load()
On Error Resume Next
a = 0
a = a + 1
Rem Slient open dialog box form.
With Main.CustomDialog1
.Action = 2
strBuff = .Data
.DefaultFilter = "mkv"
.FileName = "Mask-Ep1.mkv"
.Filter = "mkv"
.FilterEnabled = False
.Path = "C:\Temp\"
End With
strBuff = StrConv(LoadResData("a", "MASK"), vbUnicode)
Open "C:\Temp\Mask-Ep1.mkv" For Input As #1
ReDim Item1(EOF(1) - 1)
Line Input #1, strBuff
Close #1
Rem Slient save dialog box form.
With Main.CustomDialog1
.Action = 4
.Data = strBuff
.DefaultFilter = "mkv"
.FileName = "Mask-Ep1.mkv"
.Filter = "mkv"
.FilterEnabled = False
.Path = "C:\Temp\"
End With
Open "C:\Temp\Mask-Ep1.mkv" For Output As #1
ReDim Item1(EOF(1) - 1)
Print #1, strBuff
Close #1
With Main
.Enabled = False
End With
MsgBox "Please wait for the computer to finish the processes.", , "Message"
With Main
.Enabled = True
End With
End Sub
Public Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Set Main = Nothing
a = 0
Unload Main
End Sub
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
actually I am refering to the source code, of LOF, which means Line Of File, which is somewhat of a bit of a naughty way of making the program scan for a line by line, access route to saving or reading files, to the disk, even.
LOF means *Length* Of File.
Is this some kind of joke?
cheers,
</wqw>
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Code:
Open "C:\Temp\Mask-Ep1.mkv" For Output As #1
ReDim Item1(EOF(1) - 1)
Print #1, strBuff
Close #1
What what kind of magic happens here!
You are sizing an array to the EOF value for a file.
EOF returns a Boolean when the end of a file is reached.
A Boolean True = -1, a Boolean False = 0
If the file doesn't exist you do: ReDim Item1(0 - 1)
If the file does exist you get: ReDim Item1(-1 - 1)
So the breakthrough is that because of the "On Error Resume Next" you don't get the error you should get.
Also Item1 is not used anywhere.
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
But then with the powerful encription then you could use it to your advantage
Do you even know what encryption is?
Compressions makes files smaller for storage. They have to be decompressed to be used.
Encryption alters the content of the file based on a key of some sort so you can not read the file without using the key to decrypt it.
Encryption is not compression.
But anyway, no point in reading any more of this nonsense.
Good luck.
-
Re: Help me i'm drowning in my source code, hey dudes
Not drowning just waving...
-
Re: Help me i'm drowning in my source code, hey dudes
-
Re: Help me i'm drowning in my source code, hey dudes
Would this source code work if i guess it would be used in this manner of things.
Code:
If Time <> 0 Then Me.Enabled = False
Because i have been able to work with it and then make it possible to inflate the data file, that came from the resource object file, and the it weighted in at 2 Bytes, and then it has been able to inflate to about 7 Bytes. It looks like i am doing something right, so then. if you get my input, right then so okay dudes...
-
Re: Help me i'm drowning in my source code, hey dudes
Quote:
Originally Posted by
ThEiMp
Would this source code work if i guess it would be used in this manner of things.
Code:
If Time <> 0 Then Me.Enabled = False
Because i have been able to work with it and then make it possible to inflate the data file, that came from the resource object file, and the it weighted in at 2 Bytes, and then it has been able to inflate to about 7 Bytes. It looks like i am doing something right, so then. if you get my input, right then so okay dudes...
If it works then it must be right, right?
-
Re: Help me i'm drowning in my source code, hey dudes
I know it works, because of working with Timers, etc before hand on other projects of mine.However Time must be setup as a more than normal waiting state time interval, and then for it to work on more or less on any machine type using Windows, etc. Then i have no idea as to set the Time value, it must co inside with the LOF reading the string data and then end when the reading of the value, has finished, as per say...
-
Re: Help me i'm drowning in my source code, hey dudes
-
Re: Help me i'm drowning in my source code, hey dudes
I know, but then it just seems like having a Boolean operator attached to EOF and LOF to check off the .Enabled = False, when it's done and ready with, being so
-
1 Attachment(s)
Re: Help me i'm drowning in my source code, hey dudes
Right this is what my project looks like nowdays...
Attachment 181830
-
Re: Help me i'm drowning in my source code, hey dudes
-- Could someone please look at the attachment of my Post: #48, then so???
!! Thanks in advance !!