encrypt.vbs / decrypt.vbs

Author Message
vbs0cmd

  • Total Posts : 15
  • Scores: 0
  • Reward points : 0
  • Joined: 8/8/2009
  • Status: offline
encrypt.vbs / decrypt.vbs Saturday, August 08, 2009 11:16 AM (permalink)
0
'encrypt.vbs
set x = createobject("wscript.shell")
txt = inputbox("enter text to be encoded:")
msgbox(encode(""&(txt)))
x.run "notepad"
wscript.sleep "1000"
x.sendkeys(encode(""&(txt)))
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt) / 3)
coded = coded + (newtxt)
Next
encode = coded
End Function

'decrypt.vbs
set x = createobject("wscript.shell")
txt = inputbox("enter text to be decoded:")
msgbox(encode(""&(txt)))
x.run "notepad"
wscript.sleep "1000"
x.sendkeys(encode(""&(txt)))
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt) * 3)
coded = coded + (newtxt)
Next
encode = coded
End Function
 
#1
    TomRiddle

    • Total Posts : 620
    • Scores: 12
    • Reward points : 0
    • Joined: 2/7/2008
    • Location: Australia
    • Status: offline
    Re: encrypt.vbs / decrypt.vbs Friday, March 12, 2010 9:32 PM (permalink)
    0
    I had a look at this because I am making a collection of codes and ciphers written in vbscript, I am baffled at why I had to change nearly every line to make it work.

    BTW it is "Caesar Cipher"
    'encrypt.vbs 
         set x = WScript.CreateObject("WScript.Shell")
         txt = inputbox("enter text to be encoded") 
         msgbox encode(txt) 
         x.Run "%windir%\notepad"
         wscript.sleep 1000 
         x.sendkeys encode(txt)
          
         function encode(s) 
            For i = 1 To Len(s) 
               newtxt = Mid(s, i, 1) 
               newtxt = Chr(Asc(newtxt)+3) 
               coded = coded & newtxt 
            Next 
            encode = coded 
         End Function 
         

         'decrypt.vbs 
         set x = WScript.createobject("wscript.shell") 
         txt = inputbox("enter text to be decoded") 
         msgbox encode(txt) 
         x.Run "%windir%\notepad"
         wscript.sleep 1000 
         x.sendkeys encode(txt)     function encode(s) 
            For i = 1 To Len(s) 
               newtxt = Mid(s, i, 1) 
               newtxt = Chr(Asc(newtxt)-3) 
               coded = coded & newtxt 
            Next 
            encode = coded 
         End Function 

    -join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
     
    #2
      watchmen626

      • Total Posts : 4
      • Scores: 0
      • Reward points : 0
      • Joined: 4/3/2010
      • Status: offline
      Re: encrypt.vbs / decrypt.vbs Saturday, April 03, 2010 12:14 PM (permalink)
      0
      hey this is pretty awesome i like this how long did it take you to figure this out
      i am an emoskaterspartanjediassassininjavampirezombieinspace in other words im a nerdy cool kid haha
       
      #3
        TomRiddle

        • Total Posts : 620
        • Scores: 12
        • Reward points : 0
        • Joined: 2/7/2008
        • Location: Australia
        • Status: offline
        Re: encrypt.vbs / decrypt.vbs Monday, April 05, 2010 11:59 AM (permalink)
        0
        About 10 mins to turn the code in to something that runs you mean?

        It would take under an hour to write it from scratch and i would have done it differently.



        -join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9