Magnie wrote:
flashgocrazy wrote:
Magnie wrote:
There is a specific way to "redirect" it.
Have you even port-forwarded?What program and what port?
Can't you just write a tut how to do this?What I did to create this program:
Port-forwarded port: 6112
Created and tested the Python Server, Mirror, and project on my computer.
Compiled the Python Mirror into a .exe
Ran the server, went to http://canyouseeme.com, it said "Success! I can see your service!"
I also got my IP from there.
I posted my IP and project here and helped people connect.
I didn't do anything special ( except for redirecting the domain to my IP ).
Do you have to keep the python server app running every time you log on to your computer?
Offline
flashgocrazy wrote:
Magnie wrote:
flashgocrazy wrote:
What program and what port?
Can't you just write a tut how to do this?What I did to create this program:
Port-forwarded port: 6112
Created and tested the Python Server, Mirror, and project on my computer.
Compiled the Python Mirror into a .exe
Ran the server, went to http://canyouseeme.com, it said "Success! I can see your service!"
I also got my IP from there.
I posted my IP and project here and helped people connect.
I didn't do anything special ( except for redirecting the domain to my IP ).Do you have to keep the python server app running every time you log on to your computer?
Yeah, I also have to leave my computer running 24/7 which should change once I get a real server.
Offline
import socket import time from array import array def sendScratchCommand(cmd): n = len(cmd) a = array('c') a.append(chr((n >> 24) & 0xFF)) a.append(chr((n >> 16) & 0xFF)) a.append(chr((n >> 8) & 0xFF)) a.append(chr(n & 0xFF)) return (a.tostring() + cmd) sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) name = raw_input("Name: ") sock.send(sendScratchCommand('broadcast "<chat ' + name + ' has joined!"')) msg = raw_input("Message: ") while msg != "quit": sock.send(sendScratchCommand('broadcast "<chat ' + name + ': ' + msg + '"')) msg = raw_input("Message: ") sock.close()
Magnie's requested code.
Last edited by ohaiderstudios (2011-12-23 17:30:32)
Offline
ohaiderstudios wrote:
Code:
import socket import time from array import array def sendScratchCommand(cmd): n = len(cmd) a = array('c') a.append(chr((n >> 24) & 0xFF)) a.append(chr((n >> 16) & 0xFF)) a.append(chr((n >> 8) & 0xFF)) a.append(chr(n & 0xFF)) return (a.tostring() + cmd) sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) name = raw_input("Name: ") msg = raw_input("Message: ") while msg != "quit": sock.send(sendScratchCommand('broadcast "<chat ' + name + ': ' + msg + '"')) msg = raw_input("Message: ") sock.close()Magnie's requested code.
Sweet, thanks!
Offline
import socket import time sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) start = time.time() sock.send("ping") sock.recv(4) end = time.time() sock.close() print("Response time: " + str(int(round((end - start) * 1000))) + "ms")
A simple ping script
Offline
Why am I no longer able to connect?
Offline
http://jsscratch.co.cc/MirrorApplet.html Doesn't work! I cant go to the page because its blocked. D:
Offline
gangsterpikachu wrote:
http://jsscratch.co.cc/MirrorApplet.html Doesn't work! I cant go to the page because its blocked. D:
Offline
I used to host a scratch server like you,
then I took an arrow to the knee
Offline
flashgocrazy wrote:
I used to host a scratch server like you,
then I took an arrow to the knee
If you did, then you wouldn't be asking all these questions about port-forwarding and servers and stuff.
Offline
Magnie wrote:
flashgocrazy wrote:
I used to host a scratch server like you,
then I took an arrow to the kneeIf you did, then you wouldn't be asking all these questions about port-forwarding and servers and stuff.
its a joke
Last edited by flashgocrazy (2011-12-24 00:03:10)
Offline
flashgocrazy wrote:
Magnie wrote:
flashgocrazy wrote:
I used to host a scratch server like you,
then I took an arrow to the kneeIf you did, then you wouldn't be asking all these questions about port-forwarding and servers and stuff.
its a joke
Whatever, I've never played Skyrim.
Offline
Okay, so after a good two hours on chat with magnie, we got a listening program put together...
import socket import time from array import array def parseScratchCommand(cmd): cmd = cmd[4:] # Remove the first four letters ( it's annoying to deal with ) cmd = cmd.split(' ') # Split the string where there is a space. It helps to find out broadcasts. return cmd # Return the list. ['broadcast/sensor-update', 'valueWord1', 'valueWord2'] sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) sock.send('0000broadcast "^chat"') while True: data = parseScratchCommand(sock.recv(1024)) if data[0] == "sensor-update": data.pop(0) data.pop(0) data = " ".join(data) data = [x for x in data] data.pop(0) data.pop() data = "".join(data) print(data) sock.close()
or...just click here for the executable (no Python needed)
most of the credit goes to Magnie, I just pieced everything together...
Last edited by ohaiderstudios (2011-12-24 02:39:06)
Offline
ohaiderstudios wrote:
Okay, so after a good two hours on chat with magnie, we got a listening program put together...
Code:
import socket import time from array import array def parseScratchCommand(cmd): cmd = cmd[4:] # Remove the first four letters ( it's annoying to deal with ) cmd = cmd.split(' ') # Split the string where there is a space. It helps to find out broadcasts. return cmd # Return the list. ['broadcast/sensor-update', 'valueWord1', 'valueWord2'] sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) sock.send('0000broadcast "^chat"') while True: data = parseScratchCommand(sock.recv(1024)) if data[0] == "sensor-update": data.pop(0) data.pop(0) data = " ".join(data) data = [x for x in data] data.pop(0) data.pop() data = "".join(data) print(data) sock.close()or...just click here for the executable (no Python needed)
most of the credit goes to Magnie, I just pieced everything together...
Thanks for posting it.
Edit: -- Announcement --
Some of you have already noticed, and some of you already know that it was coming out, but there is an auth system being implemented. It is currently unfinished, but it is far enough to release. Currently there are plans for a full set of levels,
* = Awesome Owner ( If you must, please ignore the "Awesome" part, it's an inside joke )
~ = Moderator
+ = Authenticated User
- = Unauthenticated User
! = Failed Login ( It's the same as Unauthenticated User, but means they failed to login )
# = Muted User ( Which you can't see because they are muted )
It's probably pretty obvious what each does. Currently, *, -, !, and # have been added ( well, they are all accessible ).
One of the downsides, is that currently the "name has joined!" does not work, nor does the /me feature because of how the system was programmed in 5 hours without being truly worked on. ( I was spending most of my time chatting instead of programming the system. )
Currently, authenticating/logging in works, but the registration script has not been created. Though due to security reasons ( and the fact I don't want to deal with passwords ), instead of using "passwords" to login, it is called "secret word" which will act as the same thing, but it should not be your password you use for Scratch or for any other site! I suggest finding a password generator and using that to create a password.
I will probably add a little more security to the secret words, but for now, it doesn't contain any security ( secret words are currently stored in plain text, but I guess that is the only insecurity... I need to find SHA256 for Python... ). Just for those of you that know about how the chat project was created, the passwords and usernames themselves are not saved like a normal variable, they are replaced with a message that says whether you logged in or not.
Any suggestions before I start to finish the authentication system? Ways to make it more secure ( other than hashing the passwords )?
Last edited by Magnie (2011-12-24 10:41:48)
Offline
Magnie wrote:
ohaiderstudios wrote:
Okay, so after a good two hours on chat with magnie, we got a listening program put together...
Code:
import socket import time from array import array def parseScratchCommand(cmd): cmd = cmd[4:] # Remove the first four letters ( it's annoying to deal with ) cmd = cmd.split(' ') # Split the string where there is a space. It helps to find out broadcasts. return cmd # Return the list. ['broadcast/sensor-update', 'valueWord1', 'valueWord2'] sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) sock.send('0000broadcast "^chat"') while True: data = parseScratchCommand(sock.recv(1024)) if data[0] == "sensor-update": data.pop(0) data.pop(0) data = " ".join(data) data = [x for x in data] data.pop(0) data.pop() data = "".join(data) print(data) sock.close()or...just click here for the executable (no Python needed)
most of the credit goes to Magnie, I just pieced everything together...Thanks for posting it.
Edit: -- Announcement --
Some of you have already noticed, and some of you already know that it was coming out, but there is an auth system being implemented. It is currently unfinished, but it is far enough to release. Currently there are plans for a full set of levels,* = Awesome Owner ( If you must, please ignore the "Awesome" part, it's an inside joke )
~ = Moderator
+ = Authenticated User
- = Unauthenticated User
! = Failed Login ( It's the same as Unauthenticated User, but means they failed to login )
# = Muted User ( Which you can't see because they are muted )It's probably pretty obvious what each does. Currently, *, -, !, and # have been added ( well, they are all accessible ).
One of the downsides, is that currently the "name has joined!" does not work, nor does the /me feature because of how the system was programmed in 5 hours without being truly worked on. ( I was spending most of my time chatting instead of programming the system. )
Currently, authenticating/logging in works, but the registration script has not been created. Though due to security reasons ( and the fact I don't want to deal with passwords ), instead of using "passwords" to login, it is called "secret word" which will act as the same thing, but it should not be your password you use for Scratch or for any other site! I suggest finding a password generator and using that to create a password.
I will probably add a little more security to the secret words, but for now, it doesn't contain any security ( secret words are currently stored in plain text, but I guess that is the only insecurity... I need to find SHA256 for Python... ). Just for those of you that know about how the chat project was created, the passwords and usernames themselves are not saved like a normal variable, they are replaced with a message that says whether you logged in or not.
Any suggestions before I start to finish the authentication system? Ways to make it more secure ( other than hashing the passwords )?
Use SH512, it's top notch, 128 bytes of hex!
HAng on, I have the code for it somewhere...
>>> import hashlib >>> h = hashlib.sha512("secretword").hexdigest() >>> print h 1820e422c49f9c504bd2f91ab84f33f6c1c338599d124610bdc28f55d9010f160e99dec6280e691552db90e37fba6bce7b8e536f509b244c2c8cb2e5b9dd7c03 >>>
Oh and btw....I CAN'T GET INTO CHAT!!!!!!!!!!
Offline
ohaiderstudios wrote:
Magnie wrote:
ohaiderstudios wrote:
Okay, so after a good two hours on chat with magnie, we got a listening program put together...
Code:
import socket import time from array import array def parseScratchCommand(cmd): cmd = cmd[4:] # Remove the first four letters ( it's annoying to deal with ) cmd = cmd.split(' ') # Split the string where there is a space. It helps to find out broadcasts. return cmd # Return the list. ['broadcast/sensor-update', 'valueWord1', 'valueWord2'] sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) sock.send('0000broadcast "^chat"') while True: data = parseScratchCommand(sock.recv(1024)) if data[0] == "sensor-update": data.pop(0) data.pop(0) data = " ".join(data) data = [x for x in data] data.pop(0) data.pop() data = "".join(data) print(data) sock.close()or...just click here for the executable (no Python needed)
most of the credit goes to Magnie, I just pieced everything together...Thanks for posting it.
Edit: -- Announcement --
Some of you have already noticed, and some of you already know that it was coming out, but there is an auth system being implemented. It is currently unfinished, but it is far enough to release. Currently there are plans for a full set of levels,* = Awesome Owner ( If you must, please ignore the "Awesome" part, it's an inside joke )
~ = Moderator
+ = Authenticated User
- = Unauthenticated User
! = Failed Login ( It's the same as Unauthenticated User, but means they failed to login )
# = Muted User ( Which you can't see because they are muted )It's probably pretty obvious what each does. Currently, *, -, !, and # have been added ( well, they are all accessible ).
One of the downsides, is that currently the "name has joined!" does not work, nor does the /me feature because of how the system was programmed in 5 hours without being truly worked on. ( I was spending most of my time chatting instead of programming the system. )
Currently, authenticating/logging in works, but the registration script has not been created. Though due to security reasons ( and the fact I don't want to deal with passwords ), instead of using "passwords" to login, it is called "secret word" which will act as the same thing, but it should not be your password you use for Scratch or for any other site! I suggest finding a password generator and using that to create a password.
I will probably add a little more security to the secret words, but for now, it doesn't contain any security ( secret words are currently stored in plain text, but I guess that is the only insecurity... I need to find SHA256 for Python... ). Just for those of you that know about how the chat project was created, the passwords and usernames themselves are not saved like a normal variable, they are replaced with a message that says whether you logged in or not.
Any suggestions before I start to finish the authentication system? Ways to make it more secure ( other than hashing the passwords )?Use SH512, it's top notch, 128 bytes of hex!
HAng on, I have the code for it somewhere...Code:
>>> import hashlib >>> h = hashlib.sha512("secretword").hexdigest() >>> print h 1820e422c49f9c504bd2f91ab84f33f6c1c338599d124610bdc28f55d9010f160e99dec6280e691552db90e37fba6bce7b8e536f509b244c2c8cb2e5b9dd7c03 >>>Oh and btw....I CAN'T GET INTO CHAT!!!!!!!!!!
Thanks!
That's odd... cause others are in... did you able Remote Sensors?
Offline
Magnie wrote:
ohaiderstudios wrote:
Magnie wrote:
ohaiderstudios wrote:
Okay, so after a good two hours on chat with magnie, we got a listening program put together...
Code:
import socket import time from array import array def parseScratchCommand(cmd): cmd = cmd[4:] # Remove the first four letters ( it's annoying to deal with ) cmd = cmd.split(' ') # Split the string where there is a space. It helps to find out broadcasts. return cmd # Return the list. ['broadcast/sensor-update', 'valueWord1', 'valueWord2'] sock = socket.socket() sock.connect((socket.gethostbyname("scratch.playfultest.tk"), 6112)) sock.send('0000broadcast "^chat"') while True: data = parseScratchCommand(sock.recv(1024)) if data[0] == "sensor-update": data.pop(0) data.pop(0) data = " ".join(data) data = [x for x in data] data.pop(0) data.pop() data = "".join(data) print(data) sock.close()or...just click here for the executable (no Python needed)
most of the credit goes to Magnie, I just pieced everything together...Thanks for posting it.
Edit: -- Announcement --
Some of you have already noticed, and some of you already know that it was coming out, but there is an auth system being implemented. It is currently unfinished, but it is far enough to release. Currently there are plans for a full set of levels,
It's probably pretty obvious what each does. Currently, *, -, !, and # have been added ( well, they are all accessible ).
One of the downsides, is that currently the "name has joined!" does not work, nor does the /me feature because of how the system was programmed in 5 hours without being truly worked on. ( I was spending most of my time chatting instead of programming the system. )
Currently, authenticating/logging in works, but the registration script has not been created. Though due to security reasons ( and the fact I don't want to deal with passwords ), instead of using "passwords" to login, it is called "secret word" which will act as the same thing, but it should not be your password you use for Scratch or for any other site! I suggest finding a password generator and using that to create a password.
I will probably add a little more security to the secret words, but for now, it doesn't contain any security ( secret words are currently stored in plain text, but I guess that is the only insecurity... I need to find SHA256 for Python... ). Just for those of you that know about how the chat project was created, the passwords and usernames themselves are not saved like a normal variable, they are replaced with a message that says whether you logged in or not.
Any suggestions before I start to finish the authentication system? Ways to make it more secure ( other than hashing the passwords )?Use SH512, it's top notch, 128 bytes of hex!
HAng on, I have the code for it somewhere...Code:
>>> import hashlib >>> h = hashlib.sha512("secretword").hexdigest() >>> print h 1820e422c49f9c504bd2f91ab84f33f6c1c338599d124610bdc28f55d9010f160e99dec6280e691552db90e37fba6bce7b8e536f509b244c2c8cb2e5b9dd7c03 >>>Oh and btw....I CAN'T GET INTO CHAT!!!!!!!!!!
Thanks!
That's odd... cause others are in... did you able Remote Sensors?
What? Yes...I'm using the latest Chat.py and the applet...
I'm listening to you, fresh, and LaPenguino on the listener thiough xD
Please help me!
Offline
I just lost communication from the server...I get an error in both applet and EXE
Pinging...
I still get response from ping with CMD, but not with my special program...:'(
I think it's something over on your side at this point.
Nothing more is coming through the listener either...>
Last edited by ohaiderstudios (2011-12-24 11:59:16)
Offline
ohaiderstudios wrote:
I just lost communication from the server...I get an error in both applet and EXE
Pinging...
I still get response from ping with CMD, but not with my special program...:'(
I think it's something over on your side at this point.
Nothing more is coming through the listener either...>
Okay, I'm back on the listener, still no go for the chat proram itself...
Offline
ohaiderstudios wrote:
ohaiderstudios wrote:
I just lost communication from the server...I get an error in both applet and EXE
Pinging...
I still get response from ping with CMD, but not with my special program...:'(
I think it's something over on your side at this point.
Nothing more is coming through the listener either...>Okay, I'm back on the listener, still no go for the chat proram itself...
What errors are you getting?
Offline
Magnie wrote:
ohaiderstudios wrote:
ohaiderstudios wrote:
I just lost communication from the server...I get an error in both applet and EXE
Pinging...
I still get response from ping with CMD, but not with my special program...:'(
I think it's something over on your side at this point.
Nothing more is coming through the listener either...>Okay, I'm back on the listener, still no go for the chat proram itself...
What errors are you getting?
No errors, just no worky...
Offline
ohaiderstudios wrote:
Magnie wrote:
ohaiderstudios wrote:
Okay, I'm back on the listener, still no go for the chat proram itself...What errors are you getting?
No errors, just no worky...
Hmm... not sure... I'm currently fixing a few other problems, but the server will still be online.
I don't see what's wrong though.
Offline
FreshStudios wrote:
Doesn't work It says "choose a file" when I try 2 open it?
It only works in Python.
Offline