Discuss Scratch

caftingdead261
Scratcher
96 posts

scratchattach - A Scratch API wrapper (Python)

ajskateboarder wrote:

caftingdead261 wrote:

TimMcCool wrote:

RandomPerson13764 wrote:

bro, remove the module. delete it now. people are hacking with it like crazy!
Just like every useful tool, scratchattach can be abused. However, deleting the library would harm Scratch's Python dev community while it wouldn't stop hackers at all: There are plenty of other libraries that support setting cloud variables (many of these existed before scratchattach). Hackers could just use one of these libraries instead.
I don't get it what is so bad about scratch attach?
can someone tell me?
People are using it for various “exploits” by setting cloud variables to values so they can show up on the leaderboard. Deleting the module is pointless – what really should be done on Scratch's part is securing their cloud variable interfaces
Don't you need to own the project to change them?

I make random stuff and experiment with cloud variables.
I love Scratch mods and projects that use scratch in unique ways.
(semi-active) (only active on forms)
when F5 is clicked :: hat events
unlock a whole new perspective

TheMobileGames
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

caftingdead261 wrote:

Don't you need to own the project to change them?
No, you can change the variables of any project as long as you aren’t banned from the Scratch API and have the Scratcher rank of course. It’s actually very very helpful to me whenever I need to change some variables on my project with an alt account instead.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
Eason_9
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

Eason_9 wrote:

(#2282)

EpicCoderGamer1000 wrote:

(#2281)
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.
I tried, but it said that requirements are already satisfied and refused to download

bump for my post

*This is my signature, more info on it here! Scroll down by highlighting anywhere and press shift and the down arrow key.

Get your images up to the forums with my shop: Imagif Hosters (for free!)
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him
AKLCool
Scratcher
27 posts

scratchattach - A Scratch API wrapper (Python)

Hello! Im using scratchattach on my macbook, and installed it via homebrew. I have this code: import importlib
import scratchattach

importlib.reload(scratchattach)

import scratchattach as scratch3

session = scratch3.login(“AKLCool”, “REDACTED”)

conn = session.connect_cloud(project_id=“797826863”)

conn.set_var(“pencolour”, “0”)

but, when i run it, i get this:

REDACTED@192-168-1-21 ~ % /usr/local/bin/python3 /Users/REDACTED/scratchattach.py
Traceback (most recent call last):
File “/Users/REDACTED/scratchattach.py”, line 2, in <module>
import scratchattach
File “/Users/lREDACTED/scratchattach.py”, line 4, in <module>
importlib.reload(scratchattach)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py”, line 131, in reload
_bootstrap._exec(spec, module)
File “/Users/REDACTED/scratchattach.py”, line 8, in <module>
session = scratch3.login(“AKLCool”, “REDACTED”)
^^^^^^^^^^^^^^
AttributeError: module ‘scratchattach’ has no attribute ‘login’



im running this code on vs code, and i dont know how to fix it! please help me

.


✨AKLCool✨

✅ Qualifications ✅

  • Over 300 projects
    Been on scratch for over a year
    Has projects with more than 100 views!

✨Important things ✨

F4F: ❌
Help with scripts?: ✅ (comment on my profile and i'll try my best)

Things I Make

Games, animations, and tests!

when green flag clicked
if (You need help or want a project reviewed) then
say [Contact me on my profile!] for (2) seconds
Eason_9
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

Eason_9 wrote:

(#2282)

EpicCoderGamer1000 wrote:

(#2281)
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.
I tried, but it said that requirements are already satisfied and refused to download
bump for my post

*This is my signature, more info on it here! Scroll down by highlighting anywhere and press shift and the down arrow key.

Get your images up to the forums with my shop: Imagif Hosters (for free!)
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

Eason_9 wrote:

Eason_9 wrote:

(#2282)

EpicCoderGamer1000 wrote:

(#2281)
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.
I tried, but it said that requirements are already satisfied and refused to download
bump for my post
Why are you bumping your posts? Is there a problem or something?

epic coder gamer 1000
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

AKLCool wrote:

import importlib

import scratchattach

importlib.reload(scratchattach)

import scratchattach as scratch3

session = scratch3.login(“AKLCool”, “REDACTED”)

conn = session.connect_cloud(project_id=“797826863”)

conn.set_var(“pencolour”, “0”)

with my knowledge this is what the code should look like

import importlib

import scratchattach as scratch3

importlib.reload(scratchattach)

session = scratch3.login(“AKLCool”, “REDACTED”)

conn = session.connect_cloud(“797826863”)

conn.set_var(“pencolour”, “0”)

epic coder gamer 1000
AKLCool
Scratcher
27 posts

scratchattach - A Scratch API wrapper (Python)

TypeError: Session.connect_cloud() takes 1 positional argument but 2 were given

why? and how to fix

.


✨AKLCool✨

✅ Qualifications ✅

  • Over 300 projects
    Been on scratch for over a year
    Has projects with more than 100 views!

✨Important things ✨

F4F: ❌
Help with scripts?: ✅ (comment on my profile and i'll try my best)

Things I Make

Games, animations, and tests!

when green flag clicked
if (You need help or want a project reviewed) then
say [Contact me on my profile!] for (2) seconds
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

AKLCool wrote:

TypeError: Session.connect_cloud() takes 1 positional argument but 2 were given

why? and how to fix
idk why that happened. Maybe try removing “importlib” code if possible

epic coder gamer 1000
AKLCool
Scratcher
27 posts

scratchattach - A Scratch API wrapper (Python)

is there a way to check if the login failed?

.


✨AKLCool✨

✅ Qualifications ✅

  • Over 300 projects
    Been on scratch for over a year
    Has projects with more than 100 views!

✨Important things ✨

F4F: ❌
Help with scripts?: ✅ (comment on my profile and i'll try my best)

Things I Make

Games, animations, and tests!

when green flag clicked
if (You need help or want a project reviewed) then
say [Contact me on my profile!] for (2) seconds
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

It would say login failed

epic coder gamer 1000
mas6y6
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

AKLCool wrote:

TypeError: Session.connect_cloud() takes 1 positional argument but 2 were given
Can you please how the code?

Hi i am mas6y6 i am the maker and owner for Scratch Cloud



Its a Scratch in Scratch Project

======
The Cloud Web has been discontinued
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

AKLCool wrote:

Hello! Im using scratchattach on my macbook, and installed it via homebrew. I have this code: import importlib
import scratchattach

importlib.reload(scratchattach)

import scratchattach as scratch3

session = scratch3.login(“AKLCool”, “REDACTED”)

conn = session.connect_cloud(project_id=“797826863”)

conn.set_var(“pencolour”, “0”)

but, when i run it, i get this:

REDACTED@192-168-1-21 ~ % /usr/local/bin/python3 /Users/REDACTED/scratchattach.py
Traceback (most recent call last):
File “/Users/REDACTED/scratchattach.py”, line 2, in <module>
import scratchattach
File “/Users/lREDACTED/scratchattach.py”, line 4, in <module>
importlib.reload(scratchattach)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py”, line 131, in reload
_bootstrap._exec(spec, module)
File “/Users/REDACTED/scratchattach.py”, line 8, in <module>
session = scratch3.login(“AKLCool”, “REDACTED”)
^^^^^^^^^^^^^^
AttributeError: module ‘scratchattach’ has no attribute ‘login’



im running this code on vs code, and i dont know how to fix it! please help me

Try updating scrtchattach to the most recent version. If this doesn't fix it, try logging in with your session id: https://github.com/TimMcCool/scratchattach/wiki#logging-in

Last edited by TimMcCool (Feb. 10, 2024 16:02:24)


Developer of scratchattach, the most popular Python Scratch API wrapper
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

It'll soon be possible to use scratchattach to create a websocket server that works as a cloud host for TurboWarp's cloud variables (https://docs.turbowarp.org/url-parameters#cloud_host) and allows some customisation

Developer of scratchattach, the most popular Python Scratch API wrapper
arseyar
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Hi, TimMcCool.
I tried to use the
Send Request | Request Name [ping] and wait
But Python Code doesn't responding.
What do I need to do?

Irish Russian Scratcher)
F4F - request, collab - https://scratch.mit.edu/discuss/topic/753044/
Lurdumoloch
Scratcher
3 posts

scratchattach - A Scratch API wrapper (Python)

How can you run the python code 24/7 for free?
errplane
Scratcher
57 posts

scratchattach - A Scratch API wrapper (Python)

Lurdumoloch wrote:

How can you run the python code 24/7 for free?

self-hosting, you still have to pay the electricity bill, but that's probably fine.

Last edited by errplane (Feb. 21, 2024 18:30:04)

AwesomeApaar
Scratcher
7 posts

scratchattach - A Scratch API wrapper (Python)

how do you use the api for hacking
AwesomeApaar
Scratcher
7 posts

scratchattach - A Scratch API wrapper (Python)

i dont know how to put cri[ts in the api, can someone pls tell me
Eason_9
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

Eason_9 wrote:

(#2282)

EpicCoderGamer1000 wrote:

(#2281)
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.
I tried, but it said that requirements are already satisfied and refused to download
bump for my post

*This is my signature, more info on it here! Scroll down by highlighting anywhere and press shift and the down arrow key.

Get your images up to the forums with my shop: Imagif Hosters (for free!)
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him

Powered by DjangoBB