-
Aug 5th, 2015, 03:53 AM
#1
Thread Starter
Registered User
Base-64 Error!
Everytime I try to run this, it tells me that I got a base-64 error.
Please help!
SOURCE ATTATCHED HERE
-
Aug 5th, 2015, 07:39 AM
#2
Re: Base-64 Error!
What are you trying to run? What exactly is the problem? What have you done to debug it?
Can't tell a thing without code (an no, you did not attach code - you just posted a link to some obscure thing, which no one in their right mind is going to click).
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Aug 5th, 2015, 08:35 AM
#3
Thread Starter
Registered User
Re: Base-64 Error!
Originally Posted by SJWhiteley
What are you trying to run? What exactly is the problem? What have you done to debug it?
Can't tell a thing without code (an no, you did not attach code - you just posted a link to some obscure thing, which no one in their right mind is going to click).
Where else should I put it?
Besides, I just get a Base-64 Error, and nothing else.
The application is a system locker.
It locks the system.
-
Aug 5th, 2015, 10:54 AM
#4
Re: Base-64 Error!
The best way to post code is to paste it directly into the message, surrounded by [CODE][/CODE] tags, which can be added using the VB or # buttons (though the VB button looks like VE, since the last part of the B is cut off on most browsers).
My usual boring signature: Nothing
-
Aug 5th, 2015, 11:07 AM
#5
Re: Base-64 Error!
Originally Posted by hahagu
Where else should I put it?
Besides, I just get a Base-64 Error, and nothing else.
The application is a system locker.
It locks the system.
Imagine you get into a forum and found a question that says "I get a Base-64 Error". Do you think that in enough info to propose a solution? And imagine that in that same thread, the OP puts a link to a suspicious website that may or may not be infested with malware. Would you click on it? I hope not.
Not trying to be a snob here, welcome to the forum and we are glad to help. Just that in order for us to help you need to provide the background. More details about the error, is it a system message? does it happen when opening your form? does your code compile? And also provide the code in a way that is easy and safe for people to read it. Try not to link to external sites for that. As Shaggy said, paste it right here between code tags.
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Aug 5th, 2015, 10:26 PM
#6
Thread Starter
Registered User
Re: Base-64 Error!
Originally Posted by kaliman79912
Imagine you get into a forum and found a question that says "I get a Base-64 Error". Do you think that in enough info to propose a solution? And imagine that in that same thread, the OP puts a link to a suspicious website that may or may not be infested with malware. Would you click on it? I hope not.
Not trying to be a snob here, welcome to the forum and we are glad to help. Just that in order for us to help you need to provide the background. More details about the error, is it a system message? does it happen when opening your form? does your code compile? And also provide the code in a way that is easy and safe for people to read it. Try not to link to external sites for that. As Shaggy said, paste it right here between code tags.
Here is the virus scan :: https://www.virustotal.com/en/file/c...1935/analysis/
And, since this is a system locker, VBA32 detected it as a virus. ( It may be because it disables the task manager? )
Also, the error I get is
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: The input is not a valid base 64 string as it contains a non base 64 character more than two padding characters or a non white space character among the padding characters
-
Aug 6th, 2015, 06:14 AM
#7
Re: Base-64 Error!
Originally Posted by hahagu
Here is the virus scan :: ...
And, since this is a system locker, VBA32 detected it as a virus. ( It may be because it disables the task manager? )
Also, the error I get is
I'm sure someone will ask you about eels in your hovercraft, soon.
We have no idea how to solve your problem because you have posted no code, have not told us where the error is, and what you have done to solve it. Instead a link to virus stuff and something about task manager. This is a vb.net programmers forum; are you sure you are asking about VB code?
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Aug 6th, 2015, 06:51 AM
#8
Re: Base-64 Error!
So just to summarize, your program:-
locks up a user's system
disables task manager
is detected as a virus
In addition to that you seem to be reticent to post your code.
I have to ask, what is this for?
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Aug 6th, 2015, 09:51 AM
#9
Thread Starter
Registered User
Re: Base-64 Error!
Well, It's large zip file, and I can't upload it here.
Also, It has lots of files, so I can't upload them all too.
-
Aug 6th, 2015, 10:29 AM
#10
Re: Base-64 Error!
Well you need to post the relevant code. If your running this using the IDE then you be able to tell where the error occurs in your code. You should at least be able to tell which event or procedure is causing the error. If this is not the case then you need to provide a full explanation of what's happening.
-
Aug 6th, 2015, 10:46 AM
#11
Re: Base-64 Error!
Someone already pointed this out earlier. If you want help from this forum, this would be "bv.Net Codding" help. You NEED to provide the part of the code that is messing up your project. We are not able to guess where is it, we can't help you otherwise.
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Aug 6th, 2015, 12:11 PM
#12
Thread Starter
Registered User
Re: Base-64 Error!
Code:
Public Function Decrypt(ByVal cipherText As String) As String
Dim passPhrase As String = "!I9.!4:x"
Dim saltValue As String = "ve%Ts4!N"
Dim hashAlgorithm As String = "SHA1"
Dim passwordIterations As Integer = 2
Dim initVector As String = "@1B2c3D4e5F6g7H8"
Dim keySize As Integer = 256
Dim initVectorBytes As Byte() = Encoding.ASCII.GetBytes(initVector)
Dim saltValueBytes As Byte() = Encoding.ASCII.GetBytes(saltValue)
'Right Here
Dim cipherTextBytes As Byte() = Convert.FromBase64String(cipherText)
Dim password As New PasswordDeriveBytes(passPhrase, saltValueBytes, hashAlgorithm, passwordIterations)
Dim keyBytes As Byte() = password.GetBytes(keySize \ 8)
Dim symmetricKey As New RijndaelManaged()
symmetricKey.Mode = CipherMode.CBC
Dim decryptor As ICryptoTransform = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes)
Dim memoryStream As New MemoryStream(cipherTextBytes)
Dim cryptoStream As New CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read)
Dim plainTextBytes As Byte() = New Byte(cipherTextBytes.Length - 1) {}
Dim decryptedByteCount As Integer = cryptoStream.Read(plainTextBytes, 0, plainTextBytes.Length)
memoryStream.Close()
cryptoStream.Close()
Dim plainText As String = Encoding.UTF8.GetString(plainTextBytes, 0, decryptedByteCount)
Return plainText
End Function
This is the code
-
Aug 6th, 2015, 01:12 PM
#13
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Aug 6th, 2015, 01:14 PM
#14
Re: Base-64 Error!
I'm still not clear. Why do you want to lock up a system and disable task manager?
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Aug 6th, 2015, 10:56 PM
#15
Thread Starter
Registered User
Re: Base-64 Error!
Originally Posted by FunkyDexter
I'm still not clear. Why do you want to lock up a system and disable task manager?
It's a system locker
An alternative to the default windows locker.
It re-enables the task manager when it closes.
And why do u think I'll put a virus on the public with my email and stuff in it?
-
Aug 7th, 2015, 07:28 AM
#16
Re: Base-64 Error!
Originally Posted by SJWhiteley
I'm sure someone will ask you about eels in your hovercraft, soon.
Sorry, I was busy at the doctor's telling him "it hurts" and expecting him to fix it.
Originally Posted by kaliman79912
Someone already pointed this out earlier. If you want help from this forum, this would be "bv.Net Codding" help. You NEED to provide the part of the code that is messing up your project. We are not able to guess where is it, we can't help you otherwise.
Sometimes I wonder if it should be "bv.Net Coddling" ....
Originally Posted by hahagu
It's a system locker
An alternative to the default windows locker.
It re-enables the task manager when it closes.
And why do u think I'll put a virus on the public with my email and stuff in it?
Why? because it's happened before. Guy came on, asking for help with something, then posted the program "snake.exe" which turned out to be a virus, partially built with some of the things found around here. It's why compiled bits aren't allowed in uploads here, source code only. We see hackers and less-than nice people all the time here (personally I think the worst are the "hhahaha, I want to play joke on friend, can you help me write cod to scramble his files? hahaha is a joke." ... and they typically follow the pattern of asking questions that most seasoned professionals wouldn't ask (at least not openly), are vague in the problem they are trying to solve, and are reluctant to post their code. Unfortunately your thread fits that very profile... so you're going to get some resistance.
So... now you've thrown some code up at us and are still expecting us to figure it out. I might as well go back to the doctor's and tell him "didn't work. still hurts" ... if you're going to be vague about what the problem is, I can be vague in the solution - remove the eels from your hovercraft and recompile. There's a guide in my signature block that gives you some hints and advice on how to do that.
I realize I may be coming off as a bit snippy and snooty and I don't give a rat's fart (mostly because I don't have a rat's fart to give in the first place). We're all volunteers here, many of us have regular jobs, so we don't really have the time to sit around playing these guessing games with every Tom, Dick and Mort that comes along.
-tg
-
Aug 7th, 2015, 07:33 AM
#17
Thread Starter
Registered User
Re: Base-64 Error!
Originally Posted by kaliman79912
and where is the error?
Srry 4 the late reply :P
Code:
'Right Here
Dim cipherTextBytes As Byte() = Convert.FromBase64String(cipherText)
-
Aug 7th, 2015, 09:07 AM
#18
Re: Base-64 Error!
Originally Posted by hahagu
Srry 4 the late reply :P
Code:
'Right Here
Dim cipherTextBytes As Byte() = Convert.FromBase64String(cipherText)
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: The input is not a valid base 64 string as it contains a non base 64 character more than two padding characters or a non white space character among the padding characters
Hrmmm... well, the exception text tells you what's wrong... what's not so easy is why... well, that's kind of easy, as the short of it is that there's at least one character in the text that isn't Base64 ... so if it's not base64, it can't be converted from Base64. It's kinda like trying to go from a motorcycle and converting it into a truck... it's just not going to work.
Are you SURE you meant to convert FORM Base64 and not TO Base64?
-tg
-
Aug 7th, 2015, 09:30 AM
#19
Re: Base-64 Error!
And why do u think I'll put a virus on the public with my email and stuff in it?
Why? because it's happened before
Yep, that pretty much covers it. Notably, I didn't say you were writing a virus. I simply summarized some of what you'd said in this thread. The fact that you were able to infer that I was suspicious that you were writing a virus is a pretty good indicator that this thread does fit the profile.
Other than that, as TG said, the error message is telling you exactly why this is failing: because cipherText contains non-base 64 characters. So you either shouldn't be converting it From base 64 or you should examine the contents as it's not what you think it is.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Aug 8th, 2015, 12:33 AM
#20
Thread Starter
Registered User
Re: Base-64 Error!
Originally Posted by FunkyDexter
Yep, that pretty much covers it. Notably, I didn't say you were writing a virus. I simply summarized some of what you'd said in this thread. The fact that you were able to infer that I was suspicious that you were writing a virus is a pretty good indicator that this thread does fit the profile.
Other than that, as TG said, the error message is telling you exactly why this is failing: because cipherText contains non-base 64 characters. So you either shouldn't be converting it From base 64 or you should examine the contents as it's not what you think it is.
I used the code from here for the encrypting
Linkand for disabling alt+f4 here
Link and disabling alt+tab, win key and other stuff here
Link This is about it!
And why I'm making an alternative is because the default looks very ugly. lol
The design us based on Windows 10 logon screen design, but more customizable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|