I wanted to find out if anyone knew how to make a username reporter block!
You know, like what I am logged on my computer as.
Ive seen it done in a mod, but couldnt edit it!
Offline
I was thinking of this last night, I can do it, give me some time.
Offline
Hm... I was using panther for the file blocks but I found it doesn't let me use the line of file block, it reports nothing, oh, I used the file block, LOL. Lemme see. Much easier code for the url line. The line url block gets it different than view-source:scratch.mit.edu I cannot tell what line its on, on the view source its line 77, but panther IDk.
Last edited by Pecola1 (2011-04-02 09:45:48)
Offline
If you can get it to read the right line read the line, then use 'copyReplaceAll: '<p>' with: ''
and 'copyReplaceAll: '</p>' with: ''.
It should work then.
Offline
Pecola1 wrote:
If you can get it to read the right line read the line, then use 'copyReplaceAll: '<p>' with: ''
and 'copyReplaceAll: '</p>' with: ''.
It should work then.
I think BigDolphin is asking for the use you are logged on as on the local machine, not the scratch website.
Bingo has a similar (if not identical) block. It's open source now, so go check it out
Offline
Can anyone do the website login though?
Offline
LS97 wrote:
Pecola1 wrote:
If you can get it to read the right line read the line, then use 'copyReplaceAll: '<p>' with: ''
and 'copyReplaceAll: '</p>' with: ''.
It should work then.I think BigDolphin is asking for the use you are logged on as on the local machine, not the scratch website.
Bingo has a similar (if not identical) block. It's open source now, so go check it out![]()
Is it the user path?
Offline
Im meaning the computer username that you are logged on as.
Offline
Pecola1 wrote:
LS97 wrote:
Pecola1 wrote:
If you can get it to read the right line read the line, then use 'copyReplaceAll: '<p>' with: ''
and 'copyReplaceAll: '</p>' with: ''.
It should work then.I think BigDolphin is asking for the use you are logged on as on the local machine, not the scratch website.
Bingo has a similar (if not identical) block. It's open source now, so go check it out![]()
Is it the user path?
it is. you just need to trace back the code for it and you'll find the user.
Offline
I've tried this. The problem is that you don't log into Scratch through the computer, you log in through the browser, which means I could be logged in on Firefox and logged off or onto another account in IE which means you are always logged off in Panther whenever you read the Scratch website in Panther with the URL blocks you are logged off. The username is therefore not visible.
Offline
BigDolphin wrote:
Im meaning the computer username that you are logged on as.
You're going to have to get the user directory, I believe you can't do this with the normal FileDirectory class but I think there is another way. I can look it up if you want.
Offline
sparks wrote:
I've tried this. The problem is that you don't log into Scratch through the computer, you log in through the browser, which means I could be logged in on Firefox and logged off or onto another account in IE which means you are always logged off in Panther whenever you read the Scratch website in Panther with the URL blocks you are logged off. The username is therefore not visible.
I'm pretty sure BigDolphin asked for "what I am logged on my computer as."
Offline
LS97 wrote:
sparks wrote:
I've tried this. The problem is that you don't log into Scratch through the computer, you log in through the browser, which means I could be logged in on Firefox and logged off or onto another account in IE which means you are always logged off in Panther whenever you read the Scratch website in Panther with the URL blocks you are logged off. The username is therefore not visible.
I'm pretty sure BigDolphin asked for "what I am logged on my computer as."
We know, but we still think this would make a good block.
Offline
How does it work that out? You don't need to log in to use Scratch itself (or Panther) so there would be no login info on your page. One possible suggestion would be that you could locate the cookie storing the username and password of a user on that computer and then read it to find the username though some problems might arise:
It could be considered a breach of privacy.
It would be hard to find the correct filepath, especially as the computer's user's name will be somewhere in the path.
If the username cookie could be read, so could the password if it is not stored in MD5 or some other encrypted form which is quite scary as something like Panther with the file blocks could easily send that information to a MySQL server and make a note of it, something that means I would never run or upload a project someone sent me that could find my username by cookie.
Offline
sparks wrote:
How does it work that out? You don't need to log in to use Scratch itself (or Panther) so there would be no login info on your page. One possible suggestion would be that you could locate the cookie storing the username and password of a user on that computer and then read it to find the username though some problems might arise:
It could be considered a breach of privacy.
It would be hard to find the correct filepath, especially as the computer's user's name will be somewhere in the path.
If the username cookie could be read, so could the password if it is not stored in MD5 or some other encrypted form which is quite scary as something like Panther with the file blocks could easily send that information to a MySQL server and make a note of it, something that means I would never run or upload a project someone sent me that could find my username by cookie.
How would it be able to send onto the internet? Is there a way? It would be great for a scoring system, (now where have i heard that
)
Offline
Pecola1 wrote:
How would it be able to send onto the internet? Is there a way? It would be great for a scoring system, (now where have i heard that
)
This was being discussed here: http://scratch.mit.edu/forums/viewtopic … 67#p707967
Offline