GEOSoft Posted March 15, 2007 Posted March 15, 2007 (edited) It just gives you a reasonably safe bit of HTML code to paste into your HTML web pages. Enter the Email address and the text you want displayed and then press the Enter key. I know there are lots of these around but I don't think anyone has done it in AutoIt yet.Edit; The forum converted one line of code to plain text so a posted scipt would not work I'm including the script in a Zip file instead.Edit2: I updated the attachment to get rid of the "clopboard" Edit3: Attachment removed. Download fromNoSpam.zip Edited December 23, 2007 by GEOSoft George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
WeMartiansAreFriendly Posted March 15, 2007 Posted March 15, 2007 (edited) clopboard, lol i dont know how it stops spam heres one that encodes the email, but it uses javascript. *yuck* expandcollapse popup$Frm_Main = GUICreate ('No Spam Email', 260, 120) $Lbl_Ad = GuiCtrlCreateLabel('Address',10,10, 60, 20) $In_Ad = GUICtrlCreateInput('',70,10,180,20, 1) $Lbl_Txt = GuiCtrlCreateLabel('Display text',10, 40, 60) $In_Txt = GUICtrlCreateInput('Email me', 70,40, 180, 20, 1) $Btn_Go = GUICtrlCreateButton('Convert', 95, 80, 60,20, 1) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case - 3 Exit Case $Btn_Go $cOut = '<a href="mailto:' $tOut = StringLower(StringStripWS(GUICtrlRead($In_Ad),8)) $tOut = StringReplace($tOut, Chr(64), '@') $tOut = StringReplace($tOut, Chr(46), '.') $cOut &= $tOut & Chr(34) & '>' & GUICtrlRead($In_Txt) & '</a>' $cOut = '<script>document.write(unescape("'& _URLEncode($cOut,1) &'"));</script>' $cOut &= '<noscript>Javascript needs to be enabled.</noscript>' GUICtrlSetData($In_Ad, '') ClipPut($cOut) MsgBox ( 262192, 'Finished', "The HTML code has been placed on the clopboard." & _ @CRLF & @CRLF & "Just paste it into your HTML file" & @CRLF & @CRLF & "It's as easy as that.", 5) EndSwitch Wend Func _URLEncode($toEncode, $encodeType = 0) Local $strHex = "", $iDec Local $aryChar = StringSplit($toEncode, "") If $encodeType = 1 Then ;;Encode EVERYTHING For $i = 1 To $aryChar[0] $strHex = $strHex & "%" & Hex(Asc($aryChar[$i]), 2) Next Return $strHex ElseIf $encodeType = 0 Then ;;Practical Encoding For $i = 1 To $aryChar[0] $iDec = Asc($aryChar[$i]) if $iDec <= 32 Or $iDec = 37 Then $strHex = $strHex & "%" & Hex($iDec, 2) Else $strHex = $strHex & $aryChar[$i] EndIf Next Return $strHex ElseIf $encodeType = 2 Then ;;RFC 1738 Encoding For $i = 1 To $aryChar[0] If Not StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", $aryChar[$i]) Then $strHex = $strHex & "%" & Hex(Asc($aryChar[$i]), 2) Else $strHex = $strHex & $aryChar[$i] EndIf Next Return $strHex EndIf EndFunc Edited March 15, 2007 by mrRevoked Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
GEOSoft Posted March 15, 2007 Author Posted March 15, 2007 mrRevoked said: clopboard, lol Case $Btn_Go $cOut = '<a href="mailto:'Hmmmm............ since it's Windows then clopboard might be a better name. I'll change it in my script but I'm not going to update the Zip file for that.Did you see what I posted about the forum breaking the code?Compare the line $cOut = '<a href="mailto:'to the $cOut = line in the zip file.Email harvesters look for a line that says "Mailto:" (among others) The forum repaced part of the actual string with "Mailto:" so it would be of no benefit.There are a large number of methods that can be used but most of the safer ones use javascript. This is just a quick solution, nothing fancy about it. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
WeMartiansAreFriendly Posted March 15, 2007 Posted March 15, 2007 k Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
ptrex Posted March 16, 2007 Posted March 16, 2007 @GEOSoft Quote but I don't think anyone has done it in AutoIt yetDid you look in my signature for Email Encoder regards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Impulse08 Posted March 16, 2007 Posted March 16, 2007 This is great GEOSoft. I hope this helps remove some spam my site's email gets. ptrex - I tried running Email Encoder and it kept making my email address be www.mydomain.com/emailaddress@mydomain.com. I do like your idea of changing the whole email address to hex because I could see spammers to start to look for the characters for @ and . GEOSoft, have you noticed a decrease in the amount of spam you get from changing the mailto's and email addresses? Thanks, great script. -- If the apocalypse comes... beep me.
GEOSoft Posted March 16, 2007 Author Posted March 16, 2007 ptrex said: @GEOSoftDid you look in my signature for Email Encoder regards,ptrexObviously not. But then again your sig is staring to read like a hort novel. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now