Python love bot

Reply to topic Page 1 of 1 [ 13 posts ]
Author Message

Offline C4rD1n4lCh405

St0n3r Fuck


User avatar


Joined: Sun Sep 14, 2008 4:29 am

Posts: 229

PostPosted: Mon Oct 06, 2008 12:55 pm   Post subject: Python love bot   

Not mine... but i found it on google and thought i'd share

#! /usr/bin/python
from mechanize import Browser
import sys
import yaml

luvread = file('.luv', 'r')
luvwrite = file('.luv', 'w')

##methods time
def PrintMessage():#Print message and die
   print "Luv, the Bebo Luv (and message) sender, by Danny Riordan (dannyriordan@gmail.com) and Shane O' Brien (shane@duairc.com)"
   print "Syntax:"
   print "luv.py MemberID Luv(Y/N) username password \"Message\""
   print "luv.py -add Name MemberID"
   print "luv.py -h"
   print "To be released under the terms of the GNU/GPLv2"

def Initialise():
   print "Initialising..."
   global browser
   browser = Browser()

def Login(username, password):
   print "Connecting..."
   browser.open('http://bebo.com/SignIn.jsp')
   browser.select_form(nr=1)
   browser["EmailUsername"] = username
   browser["Password"] = password
   print "Logging in..."
   browser.submit()
   print "Logged in..."

def SendComment(member, message, luv):
   browser.open('http://bebo.com/ProfileCommentPost.jsp?MemberId='+ member)
   browser.select_form(nr=1)
   browser['Message'] = message
   browser["counter"] = str(1000 - len(message))
   if luv == 'Y':
      try:
         browser['LuvInd'] = ['Y']
      except:
         print "You've already given your love for today, sorry :(."
   print "Sending..."   
   browser.submit()
   print "Sent, :)."

def Lookup(name):
   contacts = yaml.safeload(luvread)
   print "Searching..."
   if Number(name):
      return name      
   else:
      if contacts.has_key(name):
         return contacts[name]
      else:
         print ("Name not found, sorry. Remember to add with -add")
         sys.exit()

def Add(name, number): # add contact to file, serialways
   print "Adding " + name + "..."
   luvlist = yaml.safe_load(luvread)
   luvlist[name] = number
   yaml.dump(luvlist, luvwrite)
   print name + " added."

'''def LoadContacts():
   print "Loading contacts..."
   try:
      if yaml.safe_load(luvread):
         return yaml.safe_load(luvread)
   except:
      return ['nobody']
'''
def Number(num):
   try:
      int(num)
      return True
   except ValueError:
      return False

##check help time
if len(sys.argv) < 2 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
   PrintMessage()
elif sys.argv[1] == "-add":
   Add(sys.argv[2], sys.argv[3])


#luvread is the file object for reading .luv
#luvwrite is the file object for writing to.luv
#luvlist is the list containing the strings for contact name


'''
Requires:
   python2.5
   python-mechanize
   python-yaml
'''



_________________
cardinal
of the greatest importance; fundamental.
— DERIVATIVES cardinalate cardinally cardinalship.
— ORIGIN Latin cardinalis, from cardo ‘hinge’.
chaos
complete disorder and confusion.
— DERIVATIVES chaotic chaotically.
— ORIGIN Greek khaos ‘vast chasm, void’.
Top Profile E-mail 

Offline Matt2oo9

Gold Member


User avatar


Joined: Mon Jun 23, 2008 7:25 pm

Posts: 2263

Location: Dublin ( Ireland ) ☘

PostPosted: Mon Oct 06, 2008 4:24 pm   Post subject: Re: Python love bot   

Could you do a screen shot tutorial of how/where to put that code in vb :haha:

_________________
Image ๏̯͡

I r guy, hu gon t33ch u l3ss0n!
Top Profile E-mail 

Offline Brucey

Bruce Juice


User avatar


Joined: Sun Aug 05, 2007 6:03 pm

Posts: 2622

Location: England

PostPosted: Mon Oct 06, 2008 4:26 pm   Post subject: Re: Python love bot   

Its written in Python, not VB

_________________
Aciid Forums - http://www.bebo.com/brucey - Bruce Juice

9 out of 10 times you don't know what the fuck you're talking about
Top Profile E-mail 

Offline Matt2oo9

Gold Member


User avatar


Joined: Mon Jun 23, 2008 7:25 pm

Posts: 2263

Location: Dublin ( Ireland ) ☘

PostPosted: Mon Oct 06, 2008 4:29 pm   Post subject: Re: Python love bot   

Oh..Damn
Isnt that a dodgy program?

_________________
Image ๏̯͡

I r guy, hu gon t33ch u l3ss0n!
Top Profile E-mail 

Offline MrPD

Gold Member


User avatar


Joined: Mon Jun 16, 2008 5:41 pm

Posts: 1197

Location: Tallaght

PostPosted: Mon Oct 06, 2008 5:16 pm   Post subject: Re: Python love bot   

Code Is Kinda Like vb Coz WebBrowser And Browser So It Uses WebBrowser Control
Top Profile E-mail 

Offline C4rD1n4lCh405

St0n3r Fuck


User avatar


Joined: Sun Sep 14, 2008 4:29 am

Posts: 229

PostPosted: Tue Oct 07, 2008 1:43 am   Post subject: Re: Python love bot   

Matt2oo8 wrote:
Oh..Damn
Isnt that a dodgy program?


its a scripting language, this script is for linux by the looks of it.

_________________
cardinal
of the greatest importance; fundamental.
— DERIVATIVES cardinalate cardinally cardinalship.
— ORIGIN Latin cardinalis, from cardo ‘hinge’.
chaos
complete disorder and confusion.
— DERIVATIVES chaotic chaotically.
— ORIGIN Greek khaos ‘vast chasm, void’.
Top Profile E-mail 

Offline Nemesis

The Bizzle


Joined: Sat Aug 25, 2007 10:50 pm

Posts: 1701

Location: Hull, North Lincolnshire

PostPosted: Tue Oct 07, 2008 5:29 pm   Post subject: Re: Python love bot   

Some people have made Symbain Apps from Python. Nokia N95 runs on the Symbain OS and people have coded Apps for them using Python. :geek:

_________________
Ally, don't reply to my topics.
Image
Top Profile E-mail 

Offline MrZaur

Gold Member


User avatar


Joined: Fri Oct 10, 2008 7:51 pm

Posts: 278

Location: Chinese Border.

PostPosted: Sat Oct 18, 2008 4:23 pm   Post subject: Re: Python love bot   

Matt2oo8 wrote:
Isnt that a dodgy program?


No, one of the best hacker coding languages around.

_________________
Image
Click The Zombie
Top Profile 

Offline hasnaat

Gold Member


User avatar


Joined: Mon Sep 08, 2008 7:04 pm

Posts: 832

PostPosted: Sat Oct 18, 2008 4:31 pm   Post subject: Re: Python love bot   

So how would you use this? >.<
Off topic but w00t Arsenal 2-1

_________________
Image
Image
^^ Clickk The Picturee ^^

Hidden:
http://hasnaat.bebo.com

Dont Clicck!! ^^^^^
Top Profile E-mail 

Offline Intoxic

The Don


Joined: Sun Jan 27, 2008 6:38 pm

Posts: 1025

Location: Sheffield, UK

PostPosted: Sat Oct 18, 2008 4:36 pm   Post subject: Re: Python love bot   

hasnaat wrote:
So how would you use this? >.<
Off topic but w00t Arsenal 2-1


google.com

_________________
Image
Top Profile E-mail 

Offline fatcandle

Gold Member


Joined: Sun Sep 28, 2008 2:37 pm

Posts: 256

PostPosted: Sat Oct 18, 2008 4:37 pm   Post subject: Re: Python love bot   

C4rD1n4lCh405 wrote:
Matt2oo8 wrote:
Oh..Damn
Isnt that a dodgy program?


its a scripting language, this script is for linux by the looks of it.

Well no you just need the mechanize module http://wwwsearch.sourceforge.net/mechanize/#download
and yaml module http://pyyaml.org/wiki/PyYAML
And python of course.
Top Profile E-mail 

Offline sheligalo

Internet Pirate


User avatar


Joined: Sun Sep 30, 2007 6:57 pm

Posts: 1401

Location: Behind you.

PostPosted: Wed Oct 22, 2008 11:11 am   Post subject: Re: Python love bot   

fatcandle wrote:
C4rD1n4lCh405 wrote:
Matt2oo8 wrote:
Oh..Damn
Isnt that a dodgy program?


its a scripting language, this script is for linux by the looks of it.

Well no you just need the mechanize module http://wwwsearch.sourceforge.net/mechanize/#download
and yaml module http://pyyaml.org/wiki/PyYAML
And python of course.


XD

_________________
Top Profile E-mail 

Offline fatcandle

Gold Member


Joined: Sun Sep 28, 2008 2:37 pm

Posts: 256

PostPosted: Wed Oct 22, 2008 1:00 pm   Post subject: Re: Python love bot   

MrZaur wrote:
Matt2oo8 wrote:
Isnt that a dodgy program?


No, one of the best hacker coding languages around.


I would say perl is the best "hacker" language if your relating to malicious type hacker just look at all the exploits on milw0rm.com,
but if you're talking about a code hacker then I would say it's good because It has a big open source community, but I would say C is the best.
Top Profile E-mail 
Display posts from previous:  Sort by  
Reply to topic Page 1 of 1 [ 13 posts ]

 
 •  

Who is online
Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum