Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

inputfile = "C:\Evernote.html" outputfolder = "c:\" msgbox("launched. press ok to co..

Decoded Output download

<?  inputfile = "C:\Evernote.html" 
outputfolder = "c:\" 
 
 
msgbox("launched. press ok to continue") 
 
 
'create urls1.txt 
Set objFileSystem = CreateObject("Scripting.fileSystemObject") 
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urls1.txt", TRUE) 
 
'read inputfile (evernote exported html)  
Set objFileSystem = CreateObject("Scripting.fileSystemObject") 
Set objInputFile = objFileSystem.OpenTextFile(inputfile, 1) 
html = objInputFile.ReadAll 
objInputFile.Close 
 
 
'split html var 
html = Split(html, "<tr><td><b>Source:</b></td><td><a href=""") 
 
'loop through html array and clean up the results so you get just the urls 
'and write them to urls1.txt 
For i = 1 To UBound(html) 
checkA = InStr(html(i), """") 
    if checkA > 1 then 
        html(i) = Split(html(i), """") 
        urls = html(i)(0) 
        objOutputFile.WriteLine(urls) 
    end if 
Next 
 
 
 
'remove duplicates 
 
'create urls2.txt 
Set objFileSystem = CreateObject("Scripting.fileSystemObject") 
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urls2.txt", TRUE) 
 
'read urls1.txt and remove duplicates and write results to urls2.txt 
Set objFS = CreateObject("Scripting.FileSystemObject") 
strFile = outputfolder & "urls1.txt" 
Set objFile = objFS.OpenTextFile(strFile) 
Set d = CreateObject("Scripting.Dictionary") 
Do Until objFile.AtEndOfStream 
strLine = objFile.ReadLine 
If Not InStr(strLine,"--------") >0 Then 
    If Not d.Exists(strLine) Then  
        d.Add strLine , 0 
    End If  
End If  
Loop 
x=d.Items 
For Each strKey In d.keys 
objOutputFile.WriteLine(strKey) 
Next 
 
 
 
'sort alphabetically 
 
 
 
'read urls2.txt and sort everything alphabetically 
 
 
'read urls2.txt 
Set objFileSystem = CreateObject("Scripting.fileSystemObject") 
Set objInputFile = objFileSystem.OpenTextFile(outputfolder & "urls2.txt", 1) 
urls2 = objInputFile.ReadAll 
objInputFile.Close 
 
'split each line into array 
urls2 = Split(urls2, VBCrLf) 
 
'sort urls2 array by alphabet with bubble sort method 
 
For i = (UBound(urls2) - 1) to 0 Step -1 
For j= 0 to i 
    If UCase(urls2(j)) > UCase(urls2(j+1)) Then 
        strHolder = urls2(j+1) 
        urls2(j+1) = urls2(j) 
        urls2(j) = strHolder 
    End If 
Next 
Next 
 
'write the sorted version of urls2.txt in urlsfinal.txt 
 
'create urlsfinal.txt 
Set objFileSystem = CreateObject("Scripting.fileSystemObject") 
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urlsfinal.txt", TRUE) 
 
'write all sorted vars from urls2 array to urlsfinal.txt 
For i = 0 to UBound(urls2) 
objOutputFile.WriteLine(urls2(i)) 
next 
 
 
 
msgbox("all done") ?>

Did this file decode correctly?

Original Code

inputfile = "C:\Evernote.html"
outputfolder = "c:\"


msgbox("launched. press ok to continue")


'create urls1.txt
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urls1.txt", TRUE)

'read inputfile (evernote exported html) 
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objInputFile = objFileSystem.OpenTextFile(inputfile, 1)
html = objInputFile.ReadAll
objInputFile.Close


'split html var
html = Split(html, "<tr><td><b>Source:</b></td><td><a href=""")

'loop through html array and clean up the results so you get just the urls
'and write them to urls1.txt
For i = 1 To UBound(html)
checkA = InStr(html(i), """")
    if checkA > 1 then
        html(i) = Split(html(i), """")
        urls = html(i)(0)
        objOutputFile.WriteLine(urls)
    end if
Next



'remove duplicates

'create urls2.txt
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urls2.txt", TRUE)

'read urls1.txt and remove duplicates and write results to urls2.txt
Set objFS = CreateObject("Scripting.FileSystemObject")
strFile = outputfolder & "urls1.txt"
Set objFile = objFS.OpenTextFile(strFile)
Set d = CreateObject("Scripting.Dictionary")
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If Not InStr(strLine,"--------") >0 Then
    If Not d.Exists(strLine) Then 
        d.Add strLine , 0
    End If 
End If 
Loop
x=d.Items
For Each strKey In d.keys
objOutputFile.WriteLine(strKey)
Next



'sort alphabetically



'read urls2.txt and sort everything alphabetically


'read urls2.txt
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objInputFile = objFileSystem.OpenTextFile(outputfolder & "urls2.txt", 1)
urls2 = objInputFile.ReadAll
objInputFile.Close

'split each line into array
urls2 = Split(urls2, VBCrLf)

'sort urls2 array by alphabet with bubble sort method

For i = (UBound(urls2) - 1) to 0 Step -1
For j= 0 to i
    If UCase(urls2(j)) > UCase(urls2(j+1)) Then
        strHolder = urls2(j+1)
        urls2(j+1) = urls2(j)
        urls2(j) = strHolder
    End If
Next
Next

'write the sorted version of urls2.txt in urlsfinal.txt

'create urlsfinal.txt
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(outputfolder & "urlsfinal.txt", TRUE)

'write all sorted vars from urls2 array to urlsfinal.txt
For i = 0 to UBound(urls2)
objOutputFile.WriteLine(urls2(i))
next



msgbox("all done")

Function Calls

None

Variables

None

Stats

MD5 a4b6514388c787e435e86b646f3798e0
Eval Count 0
Decode Time 83 ms