Current time: 01-12-2008, 08:45 PM | Shoutbox Hello There, Guest! (LoginRegister)


Post Reply  Post Thread 
[VBS] Google Translator
Author Message
Langy
Administrator
*******


Posts: 8.209
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 7
Post: #1
[VBS] Google Translator

Autore: ctrl_alt_canc

Code:
' Ctrlaltcanc SECURITY BLOG
'http://ctrlaltcanccorp.altervista.org/Blog/

On Error Resume Next
stringainput = inputbox("Inserisci una parola inglese da tradurre: ","")

If Trim(stringainput) = "" Then
wscript.quit
Else

url = "http://translate.google.com/translate_t?langpair=en|it&text=" & stringainput

Set conness = CreateObject("MSXML2.XMLHTTP")
conness.Open "GET", url, FALSE
conness.Send
traduz = conness.ResponseText

Function RegExpTest(patrn, strng)
    Dim regEx, Match, Matches    
    Set regEx = New RegExp    
    regEx.Pattern = patrn    
    regEx.IgnoreCase = True    
    regEx.Global = True  
    Set Matches = regEx.Execute(strng)    
    For Each Match in Matches    
       RegExpTest = Match.Value  
    Next
End Function

traduz = RegExpTest("<div id=result_box dir=ltr>[a-zA-Z]+</div>", traduz)

traduz = replace(traduz, "<div id=result_box dir=ltr>", "")

traduz = replace(traduz, "</div>", "")
Dim aaa
set aaa   = CreateObject("Scripting.FileSystemObject")
Set uu = CreateObject("Wscript.Shell")

Wait 1, "Sto traducendo"

Sub Wait(Seconds, Message)
On Error Resume Next
Dim unz
If IsEmpty(unz) Then Set unz = CreateObject("wscript.shell")
unz.Popup Message, 1, "Attendere", 80000
End Sub
set aaa = nothing
Msgbox  traduz,,"Traduzione:"
End If


"There is no patch for human stupidity" - K. D. M.

This post was last modified: 30-12-2007 12:56 PM by Langy.

unknown browser unknown system
Browser e O.S.: 
30-12-2007 12:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [C] Google Dorking xylitol2 1 530 14-05-2008 11:21 PM
Last Post: Langy

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites