r/webdev • • Feb 05 '19

Client did not pay?

https://github.com/kleampa/not-paid
575 Upvotes

110 comments sorted by

View all comments

0

u/[deleted] Feb 05 '19

[deleted]

114

u/the_bananalord Feb 05 '19

If you've contracted a company to write your website, you're probably not going to know where to even find this script, much less how to disable it.

0

u/[deleted] Feb 05 '19

[deleted]

31

u/AedificoLudus Feb 05 '19

We should make a codeword to say "client refused to pay, this is the punishment for their sins"

I vote we make it something that sounds vaguely technical, like "Ottowa connection bypass error"

You include it in your code saying "this should fix the Ottowa connection bypass error", which means it should get you paid, but now everyone who knows, knows what it is and can simply say "this is an Ottowa connection bypass error. I'm not able to fix that"

23

u/dance_rattle_shake Feb 05 '19

Well, if I ever stumble upon that in my life, I'll think of you

7

u/mordisko Feb 05 '19

How about an unused Http code? A 4xx seems fitting as it is a client error, right?

2

u/AedificoLudus Feb 06 '19

That could work, but do you really remember all the 4xx codes? Sure you could look it up, but unless you obfuscate it any reasonable developer would be able to fix it without needing to.

And the point was to give it an obvious name and cause, so that any reasonable developer wouldn't try to fix it.

Maybe you could do both? But I would say it should definitely be something that's really easy to remember

0

u/[deleted] Feb 06 '19

[deleted]

1

u/AedificoLudus Feb 06 '19

Maybe but then you have the issue of "is it the user who needs to pay or the client"

→ More replies (3)

44

u/cturmon Feb 05 '19

I love when people higher me.

5

u/Chesterakos full-stack Feb 05 '19

Do you also feel high when they higher you?

1

u/Vliger2002 Feb 06 '19

If they haven't figured out how to use DOM attribute and subattribute breakpoints yet in their browser debugger, then they probably didn't hire the right developer. The obfuscation will definitely impose a challenge, but I feel confident that I'd be able to find this in a reasonable amount of time.

2

u/Infrah Feb 06 '19 edited Feb 06 '19

Challenge time! Your website is about to start disappearing. You can either pay me to remove it, or remove it yourself. You choose the latter. The "not-paid" code is obfuscated along with this other jQuery code from a single script that is essential to the proper functioning of the website. The JS completely validates. Where is the "not-paid" js? If you find it, remove it and ensure that the JS still validates.

JS Code: https://pastebin.com/raw/Rcgw5zxE

JS Validator: http://esprima.org/demo/validate.html

1

u/Vliger2002 Feb 06 '19

When I include your script in an html doc, I get the following:

Uncaught ReferenceError: phpbb is not defined

Is that intentional?

1

u/Infrah Feb 06 '19

You’d need the other relevant phpBB scripts, but for the sake of this, the JavaScript still technically validates although there may be some non-defined variables.

3

u/sectorfour Feb 06 '19

You are the devil.

I love it.

1

u/Gargan_Roo Feb 06 '19

"Demons to some, angels to others."

2

u/Existential_Owl Feb 06 '19

with other obfuscated JavaScript that is essential to certain site functions.

Nah, I'll stick it next to the obfuscated code that steals from users' crypto-wallets.

2

u/Infrah Feb 06 '19

Pure evil

1

u/PUSH_AX Feb 06 '19

Edit: Challenge time! (because a user said that they could remove the code in a reasonable amount of time) Your website is about to start disappearing. You can either pay me to remove it, or remove it yourself. You choose the latter. The "not-paid" code is obfuscated along with this other jQuery code from a single script that is essential to the proper functioning of the website. The JS completely validates. Where is the "not-paid" js? If you find it, remove it and ensure that the JS still validates.

JS Code: https://pastebin.com/raw/Rcgw5zxE

JS Validator: http://esprima.org/demo/validate.html

I mean I ran it through a deobfuscator and determined it was from this (or similar phpbb file) within minutes, as someone technical I doubt I'd have an issue replacing this file or at least finding the difference or the deadline variable and changing it to 99999 to buy time.. Also not sure why it needs to validate? It needs to work right?

Someone non technical? Sure you win, they're fucked. Although I'm not sure who pays for obfuscated code? Surely everyone want's their stuff maintainable for the future? Is the plan to do more work after they've paid to deliver it in a sensible manner?

1

u/Infrah Feb 06 '19 edited Feb 06 '19

Although I'm not sure who pays for obfuscated code?

The purpose of the obfuscation is because the client didn’t pay. I wouldn’t provide obfuscated code to a client that fully paid for the services. The pre-obfuscation code can be provided following payment, in addition to removal of the “not-paid” script.

And yes, that’s the original JavaScript file. I still think most would have a difficult time separating it from the “not-paid” script, because it is mangled in, along with shifting of the string array. If the JavaScript wasn’t from phpBB, but was actually a custom job with ~1,000 lines of custom JS code, it would be even more of a challenge.

1

u/PUSH_AX Feb 06 '19

The purpose of the obfuscation is because the client didn’t pay. I wouldn’t provide obfuscated code to a client that fully paid for the services. The pre-obfuscation code can be provided following payment, in addition to removal of the “not-paid” script.

I think I'd rather just have an ironclad contract in place tbh. It's easier in my experience.

→ More replies (1)