The problem is that the code is highly specific to that one iteration of that code. There will be very limited usefulness or applicability for anyone else.
In the past, I've transferred or referred people to codereview.stackexchange.com [Edit: the CodeReview folks don't want it there, either]
This issue was a question in the 2015 moderator election Q&A:
One challenge that Sec.SE experiences is that of repetitive questions
for which there could be a canonical answer, but for which there often
is no single canonical answer posted. Can you suggest a way for us to
improve canonical reference handling of FAQs? The primary example
might be new users posting obfuscated PHP code that they found in
their Wordpress - there are a handful of good answers in the past, all
narrowly focused on the code presented within the question that they
answered, but rarely describing the principles and tools of
de-obfuscation that would make for a useful canonical answer. New
questions rarely receive solid canonical efforts because posters know
that there are already many answers out there; old excellent answers
get lost in the shuffle among so many of the same type of questions.
People are going to keep coming with this question, and others like it
- we can't pre-educate newcomers all that well. How can we handle it to both meet their needs and lower the repetitive investment of "good
enough here and now" answers?
Just before the election, we were getting a lot of code snippets being submitted, and the general response from the community was to close as off-topic, but it was an open question (hence an election topic).
You are correct in bringing this to the fore. Let's come to a decision.
My understanding is that questions need to have some relevance outside the single person asking. Unless there is a way to do that, individual code snippets are off-topic.
After working with @MarkBuffalo, he created a canonical answer for such posts:
I found unknown PHP code on my server. How do I de-obfuscate the code?