This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-04-02 05:51:26

BigDolphin
Scratcher
Registered: 2009-12-21
Posts: 81

A "Username" Block?

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!


►►►►►►►►►♠"Thy fish no like thy Trout that deceives thy eye"♠◄◄◄◄◄◄◄◄◄

Offline

 

#2 2011-04-02 06:02:20

SabGames
Scratcher
Registered: 2009-02-18
Posts: 78

Re: A "Username" Block?

What do you mean, like 'Find the user's name of this computer'? Or as a reporter? <<computer username>> ?

Last edited by SabGames (2011-04-02 06:02:54)


http://sabgamesdownload.weebly.com/uploads/5/2/4/8/5248085/4881802.png

Offline

 

#3 2011-04-02 09:10:40

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

I was thinking of this last night, I can do it, give me some time.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#4 2011-04-02 09:44:14

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

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)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#5 2011-04-02 09:48:00

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

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.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#6 2011-04-02 11:00:32

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: A "Username" Block?

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  smile

Offline

 

#7 2011-04-02 12:06:26

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: A "Username" Block?

Can anyone do the website login though?


You can now reach me on Twitter @johnnydean1_

Offline

 

#8 2011-04-02 12:10:45

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

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  smile

Is it the user path?


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#9 2011-04-02 13:53:43

BigDolphin
Scratcher
Registered: 2009-12-21
Posts: 81

Re: A "Username" Block?

Im meaning the computer username that you are logged on as.


►►►►►►►►►♠"Thy fish no like thy Trout that deceives thy eye"♠◄◄◄◄◄◄◄◄◄

Offline

 

#10 2011-04-02 13:56:00

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: A "Username" Block?

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  smile

Is it the user path?

it is. you just need to trace back the code for it and you'll find the user.

Offline

 

#11 2011-04-02 14:06:41

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: A "Username" Block?

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.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#12 2011-04-02 14:16:11

wcfs96
New Scratcher
Registered: 2011-03-10
Posts: 37

Re: A "Username" Block?

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

 

#13 2011-04-02 15:26:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: A "Username" Block?

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

 

#14 2011-04-02 15:45:30

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

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.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#15 2011-04-02 17:33:16

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: A "Username" Block?

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.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#16 2011-04-02 22:32:38

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A "Username" Block?

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  tongue )


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#17 2011-04-03 04:48:37

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: A "Username" Block?

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  tongue )

This was being discussed here: http://scratch.mit.edu/forums/viewtopic … 67#p707967


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer