Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Known spammers #11

Open
hello-smile6 opened this issue Jan 17, 2022 · 27 comments
Open

Known spammers #11

hello-smile6 opened this issue Jan 17, 2022 · 27 comments

Comments

@hello-smile6
Copy link
Contributor

  • PowerUpProduction123 (maybe, found on griffpatch's profile)
    PowerUpProduction123 posted "Hello there ‮ <a href="/users/Griffpatch">@Griffpatch</a>!" which in
    cludes a disallowed char/string.
    
@webdev03
Copy link
Owner

RTL is included.

@hello-smile6
Copy link
Contributor Author

RTL is included.

Huh. Is LTR? Also, could you add a start script to package.json?

@webdev03
Copy link
Owner

LTR is too. I don't think the start script is necessary. I'm trying to set up building for releases.

@hello-smile6
Copy link
Contributor Author

hello-smile6 commented Jan 17, 2022

LTR is too. I don't think the start script is necessary. I'm trying to set up building for releases.

Use pkg and add support for entering the password and username from a prompt if the environment variable isn't set.

@webdev03
Copy link
Owner

I'm setting up building now.

@webdev03
Copy link
Owner

Actually, nevermind. It's too hard!

@hello-smile6
Copy link
Contributor Author

Actually, nevermind. It's too hard!

I'll do it

@webdev03
Copy link
Owner

I got building to work, but it can't import the disallow.json on my machine...

@hello-smile6
Copy link
Contributor Author

I got building to work, but it can't import the disallow.json on my machine...

Strange. Maybe require() it? Also, binaries will include OpenSSL in the binary, which is pretty big, for HTTPS support.

@webdev03
Copy link
Owner

Require wouldn't let us change it

@hello-smile6
Copy link
Contributor Author

Require wouldn't let us change it

Huh

@hello-smile6
Copy link
Contributor Author

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$ pkg --compress Brotli -t node16-x64 index.js
> [email protected]
compression:  Brotli

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$ pkg --compress Brotli -t node16-win-x64 index.js
> [email protected]
compression:  Brotli

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$ ls
auth.js        index.exe*  LICENSE        package.json    README.md
disallow.json  index.js    node_modules/  pnpm-lock.yaml

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$ index.exe
bash: index.exe: command not found

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$ ./index.exe
Scratch Spam v0.1.2
What user would you like to check for spam? 9pfs
Found 28 comment thread starters!
Would you like to go to the next page? (Y/n) y
Found 56 comment thread starters!
Would you like to go to the next page? (Y/n) y
Found 72 comment thread starters!
Would you like to go to the next page? (Y/n) y
No more comments able to be found.
Starting checking...
0 bad comment(s) found!
Exiting program...

hello-smile6@localhost MINGW64 ~/Documents/scratch-spam (main)
$

@webdev03
Copy link
Owner

Wow

@hello-smile6
Copy link
Contributor Author

Wow

We just need a way for people to sign in. Also, could you please make it read users' messages and delete from there? Profiles aren't the only places spammers hit.

@hello-smile6
Copy link
Contributor Author

@webdev03 Error:

node:internal/process/task_queues:96
    runMicrotasks();
    ^

Error: Failed to log in with 9pfs,{my password}
    at ScratchSession.init (C:\snapshot\scratch-spam\auth.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async C:\snapshot\scratch-spam\index.js

@webdev03
Copy link
Owner

webdev03 commented Jan 18, 2022

If it's someone else's project/profile you can't do anything. I might add project support in the future :)

Edit: Advertisement protection could be there too.

@hello-smile6
Copy link
Contributor Author

If it's someone else's project/profile you can't do anything. I might add project support in the future :)

Just read the messages! Just send a request to api.scratch.mit.edu/users/${username}/messages with the user's session ID and CSRF token.

@hello-smile6
Copy link
Contributor Author

If it's someone else's project/profile you can't do anything. I might add project support in the future :)

Edit: Advertisement protection could be there too.

Good idea. Then we could have a user-maintained version of filter.scratch.mit.edu that we actually have control over, and that we could add entries to a lot faster than the admins could. We could even make a browser extension that lets people report comments to be added to the blacklist, for cases when something is spam but they don't want to tell the site admins.

@webdev03
Copy link
Owner

I know. But studio replies are very rare and have a limit now. Projects could be supported too. I'd also like it so that you don't need to log in to an account to use Scratch Spam, so that you can verify it works.

@hello-smile6
Copy link
Contributor Author

I know. But studio replies are very rare and have a limit now. Projects could be supported too. I'd also like it so that you don't need to log in to an account to use Scratch Spam, so that you can verify it works.

Good idea. Also, use the --compression Brotli flag on pkg, so binaries are smaller.

@webdev03
Copy link
Owner

But it doesn't work

@hello-smile6
Copy link
Contributor Author

But it doesn't work
Try this.

npx pkg --compress Brotli -t node16 index.js
chmod u+x `find ./index.*`
chmod u-x ./index.js

Then, execute the index binary.

@webdev03
Copy link
Owner

OK, now I need to take the Ninetails builder and edit it.

@hello-smile6
Copy link
Contributor Author

OK, now I need to take the Ninetails builder and edit it.

Won't work. That uses electron. Use pkg. Do npm i -g pkg and try it.

@webdev03
Copy link
Owner

I made it.

@hello-smile6
Copy link
Contributor Author

I made it.

Oh. Could you just use pkg? People might want to build their own binary without installing anything.

@webdev03
Copy link
Owner

webdev03 commented Jan 18, 2022

This is getting a bit offtopic.

A denylist for users I'll add tomorrow. You can "block" people by combining it with a cron job (or just a script on replit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants