1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] Gmail Dot Trick - Any .NET Examples?

Discussion in 'Visual Basic .NET' started by carlx, Mar 31, 2012.

  1. carlx

    carlx Registered Member

    Joined:
    Dec 28, 2008
    Messages:
    95
    Likes Received:
    88
    I am looking for a simple Gmail dot trick for .net, i've found a few things via google but nothing that really works, a lot of 404 pages where the code used to be etc..

    Any help as always is greatly appreciated!
     
  2. carlx

    carlx Registered Member

    Joined:
    Dec 28, 2008
    Messages:
    95
    Likes Received:
    88
    Anybody?
     
  3. roster67

    roster67 Registered Member

    Joined:
    Mar 27, 2012
    Messages:
    69
    Likes Received:
    10
    What are you looking for exactly?
     
  4. carlx

    carlx Registered Member

    Joined:
    Dec 28, 2008
    Messages:
    95
    Likes Received:
    88
    For those who dont knowwhat the gmail dot trick is, it basically means inserting a dot into the email address, for example.

    myemail@gmail.com
    m.y.e.m.a.i.l@gmail.com
    my.email@gmail.com

    would all send mail to the same address - however for registration purposes on websites they are all different - meaning you only need a single gmail account to create thousands of accounts on websites etc.

    It can be done programmatically, i have since come to a work around but i would still like to have a good function that does this for me on any email address.
     
    • Thanks Thanks x 1
  5. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    That 's rather too easy to do. Maybe you need to practice your coding skills more and ask for help less? ;)
     
    • Thanks Thanks x 1
  6. arcticfang

    arcticfang Regular Member

    Joined:
    Aug 7, 2010
    Messages:
    251
    Likes Received:
    209
    This right here.

    It's extremely simple to do, rather than searching for things like '.net gmail dot trick function', you should be searching for how to do the little things that make it up, grabbing the portion before @gmail, inserting .(s) every possible way into that portion, etc. It's just a matter of string manipulation, read up on truncation, insertion, and figure out how to do every possible combination and export them to a list. :)
     
    • Thanks Thanks x 2
  7. sapo

    sapo Power Member

    Joined:
    Feb 25, 2008
    Messages:
    510
    Likes Received:
    281
    Well this thread didn't go the way he thought it would LOL
     
  8. xxpaigexx

    xxpaigexx Registered Member

    Joined:
    Apr 6, 2009
    Messages:
    83
    Likes Received:
    27
    LOL you got that right brother :D

     
  9. carlx

    carlx Registered Member

    Joined:
    Dec 28, 2008
    Messages:
    95
    Likes Received:
    88
    Generally i dont ask for a fully functioning "end product" as i like to learn by doing, however this was for a time critical project that the gmail dot trick would have been perfect for- i tend to work things out myself and ask when i really need help- if time was on my side i would have worked this out myself, in the end i found a work around that did the job, nothing pretty but no problems from it.
     
  10. toosmooth

    toosmooth Registered Member

    Joined:
    Feb 24, 2012
    Messages:
    77
    Likes Received:
    36
    Location:
    canada
    .... That is the coolest trick I've herd of thanks! Now my mind is scrambling thinking of all the possibilities for this ! :D thanks
     
  11. andee

    andee Regular Member

    Joined:
    Jul 24, 2010
    Messages:
    218
    Likes Received:
    83
    yeah well instead of using the dot trick you could of just add +1 or what ever number to the end of the user, ie haroldlee+13@gmail.com

    bingo alot more variations than bothering with the dot trick.
     
    • Thanks Thanks x 1
  12. carlx

    carlx Registered Member

    Joined:
    Dec 28, 2008
    Messages:
    95
    Likes Received:
    88
    Very true, however the site i was targetting had a filter to stop the use of "+" in the email address (this is something i beleive we will be seeing more of in the future) - The dot trick was the only email manipulation trick left open to me and something i had never tried or done before.

    Thanks to articfang i will be reading up on truncating, inserting and string manipulation etc- it is something that is basic but i have not needed to do much of in the past.
     
  13. theMagicNumber

    theMagicNumber Regular Member

    Joined:
    May 13, 2010
    Messages:
    345
    Likes Received:
    195
    I didn't notice this thread till today. Thank you very much for this trick, i wasn't aware of it.
    Anyway here is a C# code that generate all possible combinations. It is not very optimised but will do the job.
    I compiled a DLL(VS 2010 .NET 4.0) for you, so you can use it in VB.NET applications without converting the code.
    Code:
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Combinations;
    
    
    namespace DotTrick
    {
        public static class DotTrickClass
        {
            public static List<string> Generate(string email, int maxEmails)
            {
                string emailName = email.Replace("@gmail.com", string.Empty).Trim();
                List<string> results = new List<string>();
                IEnumerable<int> positions = Enumerable.Range(1, emailName.Length - 1);
                for (int i = 1; i <= positions.Count(); ++i)
                {
                    Combinations<int> positionGenerator = new Combinations<int>(positions, i);
                    foreach (int[] currentPositions in positionGenerator)
                    {
                        StringBuilder emailBuilder = new StringBuilder(emailName);
                        foreach (int currentPosition in currentPositions.Reverse())
                        {
                            emailBuilder.Insert(currentPosition, '.');
                        }
                        results.Add(emailBuilder.ToString());
                        if (results.Count == maxEmails)
                        {
                            return results;
                        }
                    }
                }
                return results;
            }
        }
    }
    
    The Combinations class is downloaded from code project.
    Link removed
    Here is the download link.
    Perhaps you already found a solution, but i thought it might be useful for someone else.
    I will try to upload virustotal scan later.
    Best regards.

    Edit by Jazzc: Add your link only with a VT scan.

    VT:
    https://www.virustotal.com/file/c9b...b9e513fc872dd9c911116ddc373b5ac3049/analysis/
    Detection ratio: 0 / 42
    Project: http://www.mediafire.com/download.php?l694s4qb7fsgnyi
     
    • Thanks Thanks x 1
    Last edited: May 29, 2012