Jump to content

No Spam (TOO SIMPLE!)


GEOSoft
 Share

Recommended Posts

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" :whistle:

Edit3: Attachment removed. Download from

NoSpam.zip

Edited by GEOSoft

George

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!"

Link to comment
Share on other sites

clopboard, lol

i dont know how it stops spam heres one that encodes the email, but it uses javascript. *yuck*

$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 by mrRevoked
Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

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

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!"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@GEOSoft

Did you look in my signature for Email Encoder :P

regards,

ptrex

Obviously not. :whistle: But then again your sig is staring to read like a hort novel.

George

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!"

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...