Hallo,
ausgehend von dem Problemchen hier:
https://autoit.de/index.php?page=Thread&threadID=11829
ein Script gebastelt das Texte aller Art für Web-Seiten verschlüsselt, im einfachsten Fall ohne JavaScript auskommt und validen HTML Code erzeugt der dann z.B so aussieht:
AnMich@<!-- IwrTY[uNrdQxd`Sf}aWW -->internet<!-- uO -->.ne<!-- YoiUsVLaOPEdNEYtwGwiNwD}h -->tz
die Steigerungsform, für JavaScript und unescape:
document.write(unescape(%41n\u004D%69ch@%69n<!-- G^hP[\nBzE`WEPz\vb}[{kny -->t\u0065r\u006E<!-- ^pWOx -->et%2En\u0065t\u007A));
einfach mal davon ausgehend, daß diese eMail und Adressen-Sammler nicht unendlich Rechleistung haben um solchen Müll auszusortieren.
!!!
* Nicht auf Seiten anwenden die von Suchmaschinen indexiert werden. Der Text der erzeugt wird ist im Endeffekt nur für den Leser der Seite sichtbar.
* Ein Kopieren des Textes aus der Seite heraus ist ebenfalls nicht mehr möglich - bzw. das kopierte ist nur "Datenmüll"
Um die Ausgabe noch "komplizierter" zu gestalten kann das de_DE Hunspell dictionary in das Programm-Verzeichnis kopiert werden.
Hier das Script:
Spoiler anzeigen
#region Includes
#include <Array.au3>
#include <File.au3>
#endregion Includes
; =============================================================================
; Name ..........: Web-Txt-Scrambler
; Description ...: Makes your text in websites only readable for the user.
; Requirement ...: de-DE.dic (dictionary file of the de_DE Hunspell dictionary)
; AutoIt Version : V3.3.0.0
; Syntax ........: Text to scramble (commandline!)
; Parameter(s): .: $Texttoscramble -
; Return Value ..: Success - Scrambled text
; Failure - ""
; Author(s) .....: Thorsten Willert
; Date ..........: Thu Oct 29 10:35:02 CET 2009
; Version .......: 2.0
; ==============================================================================
Global $mail = $CmdLine[1]
[/autoit] [autoit][/autoit] [autoit]Global $bJavaScript = False ; adding unicode excapes for JavaScript output
Global $bEscape = False; works only with unescape in JavaScript or in URLs
; don't use this for URLs
Global $bComments = True; Comments
Global $bStyle = True; Comments and hidden CSS styles
Global $sWoerterbuch = @ScriptDir & "\de-DE.dic"
[/autoit] [autoit][/autoit] [autoit]Global $iStart = 0
Global $iEnd = 6
If Not $bJavaScript Then $iStart = 1
If Not $bEscape Then $iStart = 2
If Not $bComments Then $iEnd = 4
If Not $bStyle Then $iEnd = 5
Global $aMail = StringSplit($mail, "", 0)
Global $rnd_alt = 10
Global $rnd = 10
Global $Start = 1
Global $sRnd = ""
Global $sID = ""
Global $sDummySpan = ""
Global $aWoerter
If FileExists($sWoerterbuch) Then _FileReadToArray($sWoerterbuch, $aWoerter)
[/autoit] [autoit][/autoit] [autoit]$sID = _RandomString(1)
$sDummySpan = _RandomString(1)
Global $ret = '<style type="text/css">.' & $sID & "{display:none;}" & @crlf & "." & $sDummySpan & "{}</style>" & @CRLF & @CRLF & @CRLF
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aMail[0]
$sRnd = ""
If $aMail[$i] = " " Then
$ret &= " "
ContinueLoop
EndIf
If $aMail[$i] = "@" Then
$ret &= "@"
ContinueLoop
EndIf
While $rnd_alt = $rnd
$rnd = Random($iStart, $iEnd, 1)
WEnd
Switch $rnd
Case 0
$ret &= StringFormat("\\u%0000s", Hex(AscW($aMail[$i]), 4))
Case 1
$ret &= "%" & Hex(AscW($aMail[$i]), 2)
Case 2
$tmp = StringFormat("&#x%02s;", StringReplace(Hex(AscW($aMail[$i]), 2), "0", "F"))
Switch Random(1,2,1)
Case 1
$ret &= $tmp
Case 2
$ret &= '<span class="' & $sDummySpan & '">' & $tmp & '</span>'
EndSwitch
Case 3
$tmp = StringFormat("&#x%04s;", Hex(AscW($aMail[$i]), 4))
Switch Random(1,2,1)
Case 1
$ret &= $tmp
Case 2
$ret &= '<span class="' & $sDummySpan & '">' & $tmp & '</span>'
EndSwitch
Case 4
$tmp = "&#" & Asc($aMail[$i]) & ";"
Switch Random(1,2,1)
Case 1
$ret &= $tmp
Case 2
$ret &= '<span class="' & $sDummySpan & '">' & $tmp & '</span>'
EndSwitch
Case 5
$ret &= StringFormat("<!-- %s -->", _JustRandom(2) ) & $aMail[$i]
Case 6
$ret &= '<span class="' & $sID & '">' & _JustRandom() & '</span>' & $aMail[$i]
EndSwitch
$rnd_alt = $rnd
Next
ConsoleWrite($ret & @CRLF)
[/autoit] [autoit][/autoit] [autoit];===============================================================================
Func _RandomString($iMode, $iMin=10, $iMax=25)
Local $t, $sReturn = ""
Switch $iMode
Case 1 ; 90-97
For $j = 0 To Random($iMin, $iMax)
Do
$t = Random(65, 122)
Until $t > 97 Or $t < 90
$sReturn &= Chr($t)
Next
Case 2
For $j = 0 To Random($iMin, $iMax)
Do
$t = Random(39, 126)
Until ($t > 97 Or $t < 90) And ($t < 59 Or $t > 63)
$sReturn &= Chr($t)
Next
EndSwitch
Return $sReturn
EndFunc
;===============================================================================
Func _RandomWord()
If $aWoerter[0] > 500 Then
Local $sWord = $aWoerter[ Random(20, $aWoerter[0],1) ]
Return StringMid($sWord,1,StringInStr($sWord,"/")-1)
Else
Return _RandomString(1)
EndIf
EndFunc
;===============================================================================
Func _RandomEncode($s)
Switch Random(0,3,1)
Case 0
Return StringFormat("&#x%02s;", StringReplace(Hex(AscW($s), 2), "0", "F"))
Case 1
Return StringFormat("&#x%04s;", Hex(AscW($s), 4))
Case 2
Return "&#" & Asc($s) & ";"
Case 3
Return $s
EndSwitch
EndFunc
;===============================================================================
Func _RandomWordEncode($sWord)
Local $sReturn=""
Local $aString = StringSplit($sWord, "")
For $i = 1 To $aString[0]
$sReturn &= _RandomEncode($aString[$i])
Next
Return $sReturn
EndFunc
;===============================================================================
Func _JustRandom($iMode=4)
Switch Random(1,$iMode,1)
Case 1
Return _RandomWord()
Case 2
Return _RandomString(2, 0)
Case 3
Return _RandomWordEncode(_RandomWord())
Case 4
Return _RandomWordEncode(_RandomString(2))
EndSwitch
EndFunc
Das Ganze ist momentan nur eine Commando-Zeilen Version, deren Parameter nicht beeinflußt werden können (das kommt evtl. noch bzw. eine PHP-Umsetzung)
Viel Spaß damit!
Grüße
Stilgar