Login with username, password and session length

News:

Vent: vent.proshens.com; port 4968

Author Topic: codez at worms  (Read 454 times)

  • Shen's One
  • *
  • Posts: 83
    • View Profile
    • Email
codez at worms
« on: March 30, 2009, 09:33:21 am »
Code: [Select]
#!/usr/bin/python

import socket

mySock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mySock.bind((socket.gethostname(), 31535))
mySock.listen(5)
nicemessage = "Hi, nice to meet you!\n"
meanmessage = "You did not say hello, die in a fire\n"

while(1):
        (clientsocket, address) = mySock.accept()
        data = clientsocket.recv(100)
        if data == "hello\r\n":
                clientsocket.send(nicemessage)
        else:
                clientsocket.send(meanmessage)
        clientsocket.close()


  • Shen's Macro
  • ***
  • Posts: 451
    • MSN Messenger - blargh@gmail.com
    • View Profile
    • http://jentou.com
    • Email
Re: codez at worms
« Reply #1 on: March 30, 2009, 09:34:50 am »
thx, I was looking for that.

  • Banned Virally Yours
  • Administrator
  • I don't shower
  • ******
  • Posts: 2067
  • I want to be a scientist.
    • MSN Messenger - chrisinajar@gmail.com
    • AOL Instant Messenger - chrisinajar
    • Yahoo Instant Messenger - chrisinajar
    • View Profile
    • The People's Republic of Shenanigans
    • Email
Re: codez at worms
« Reply #2 on: March 30, 2009, 11:31:18 am »
Code criticism:
Clearly not C++, this is a problem.

  • Shen's One
  • *
  • Posts: 88
    • View Profile
    • Email
Re: codez at worms
« Reply #3 on: March 30, 2009, 11:49:42 am »
Disreguard that I suck cocks...

  • Shen's Macro
  • ***
  • Posts: 451
    • MSN Messenger - blargh@gmail.com
    • View Profile
    • http://jentou.com
    • Email
Re: codez at worms
« Reply #4 on: March 30, 2009, 03:40:58 pm »
Python here!

  • Supreme Ruler
  • Global Moderator
  • CopyPasta
  • ****
  • Posts: 902
  • "Hey guys, come check out my Meth lab!"
    • AOL Instant Messenger - capncrackpipe106
    • View Profile
    • MAGGOTRY
    • Email
Re: codez at worms
« Reply #5 on: April 03, 2009, 11:42:45 pm »
OH MY GOD WHERE ARE THE CURLY BRACES?  IT'S NOT CODE UNTIL YOU HAVE CURLY BRACES.
Someone's e-Peen just got a little longer.



  • Shen's One
  • *
  • Posts: 88
    • View Profile
    • Email
Re: codez at worms
« Reply #6 on: April 04, 2009, 01:07:49 am »
Disreguard that I suck cocks...