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

Truncate Twitter Passowrds in a Certain format

Discussion in 'Black Hat SEO Tools' started by kwakuo, Apr 10, 2012.

  1. kwakuo

    kwakuo Junior Member

    Joined:
    Nov 21, 2010
    Messages:
    194
    Likes Received:
    41
    Guys,
    Any script/bot to get rid of twitter passwords in a file?
    Its arranged like this:
    username: password

    I have to get rid of the ": password" version. Guys, any script/bot/command to do this for bulk accounts in notepad or Textpad? Just the
    ": password" bit.

    Thanks.
     
  2. HybridTF

    HybridTF Newbie

    Joined:
    Dec 4, 2011
    Messages:
    2
    Likes Received:
    0
    Python code to do what you wanted.

    Code:
    import re
    
    
    f = open('input.txt', 'r')
    f2 = open('output.txt', 'w')
    
    
    for line in f:
        port = re.split(': ',line)[0]
        print(port)
        f2.write(port)
        f2.write('\n')
    
    
    
    
    f.close()
    f2.close()
    
    Input file:
    Output file:
     
  3. kwakuo

    kwakuo Junior Member

    Joined:
    Nov 21, 2010
    Messages:
    194
    Likes Received:
    41
    Cheers! Another forumer, Kolokolo75 gave me this little piece that works great in notepad++ or textpad