Results 1 to 20 of 20

Thread: Base-64 Error!

  1. #1

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Base-64 Error!

    Everytime I try to run this, it tells me that I got a base-64 error.
    Please help!
    SOURCE ATTATCHED HERE

  2. #2
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    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."

  3. #3

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Re: Base-64 Error!

    Quote Originally Posted by SJWhiteley View Post
    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.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    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

  5. #5
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Base-64 Error!

    Quote Originally Posted by hahagu View Post
    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

  6. #6

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Re: Base-64 Error!

    Quote Originally Posted by kaliman79912 View Post
    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

  7. #7
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: Base-64 Error!

    Quote Originally Posted by hahagu View Post
    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."

  8. #8
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    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

  9. #9

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    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.

  10. #10
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    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.

  11. #11
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    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

  12. #12

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    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

  13. #13
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Base-64 Error!

    and where is the error?
    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

  14. #14
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    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

  15. #15

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Re: Base-64 Error!

    Quote Originally Posted by FunkyDexter View Post
    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?

  16. #16
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,538

    Re: Base-64 Error!

    Quote Originally Posted by SJWhiteley View Post
    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.

    Quote Originally Posted by kaliman79912 View Post
    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" ....

    Quote Originally Posted by hahagu View Post
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  17. #17

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Re: Base-64 Error!

    Quote Originally Posted by kaliman79912 View Post
    and where is the error?
    Srry 4 the late reply :P
    Code:
     'Right Here
            Dim cipherTextBytes As Byte() = Convert.FromBase64String(cipherText)

  18. #18
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,538

    Re: Base-64 Error!

    Quote Originally Posted by hahagu View Post
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  19. #19
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    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

  20. #20

    Thread Starter
    Registered User
    Join Date
    Aug 2015
    Posts
    8

    Re: Base-64 Error!

    Quote Originally Posted by FunkyDexter View Post
    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
  •  



Click Here to Expand Forum to Full Width