PDA

View Full Version : Administrative and Maintenance Tools - AdminCP News as Posts or PMs by BOP5 (Get your Admin CP News PMed to you!)


BirdOPrey5
09-02-2013, 10:00 PM
Brought to you by BirdOPrey5 / Qapla.com (http://www.qapla.com/mods/)

Live Demo: ACP News: Potential vBulletin Exploit (vBulletin 4.1+, vBulletin 5+) (http://www.qapla.com/mods/showthread.php/1080-ACP-News-Potential-vBulletin-Exploit-vBulletin-41-vBulletin-5)

vBulletin pushes important news items to your Admin CP News Section. Some important items that get pushed are new versions of the software, and more importantly, notice of exploits and security patches. If you don't check your Admin CP regularly it could be days, even weeks before you see important notices. This can leave your site unprotected and vulnerable to hacking.

This mod will check the news every hour and at your option PM, and/or post the news to your forums. The idea is to PM one or more Admins and/or post in your staff forum so everyone is aware of the news.

Each option is independently controlled-

PM one or more users
Post a new thread in a forum of your choice
Post a new post into an existing thread of your choice


Note- The first time the mod runs it will pull all old news (usually 5 to 6 items) so you will get a "flood" of PMs or posts. After that initial flood is over the old news is recorded in the database as having been delivered and you won't get multiple posts/PMs again unless vBulletin puts out more than one news item as a time. They rarely post Admin CP news, it may be weeks or months between updates.

This mod creates the Scheduled Task called "AdminCP News as Posts or PMs" that is set to run hourly. You can adjust the timing by editing the task in Scheduled Task Manager.

This mod does not use phrases- News is delivered in English only as it is only posted in English.

Another Note- The nature of vBulletin scheduled tasks requires traffic on the board to work. If you have a forum with little traffic (no one views it) then scheduled tasks will often get skipped.

Compatible and tested with VB 3.8.x and VB 4.x.x. May work with older versions of VB 3.x as well but not tested.

------------------------------------------------------

Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)

BirdOPrey5
09-03-2013, 04:59 PM
Reserved.

ozzy47
09-03-2013, 05:07 PM
Pretty interesting mod Joe, thanks for sharing with the community.

dougdirac
09-04-2013, 02:35 AM
See, Joe is about solutions instead of excuses.

I actually found out about that /install security threat from Qapla.com, so he's a life saver.

Then in the days that followed I heard about more and more sites that ran vB getting hacked. No idea why the powers that be took a week to send out a security warning email when that should have been the first priority. If that's the way IB is going to run things, they should make this mod part of the vB 4.2.2 update.

Bottom line, Joe is a great asset to the community.

Ba'al
09-04-2013, 04:11 AM
Thanx Bop, installed

DemOnstar
09-04-2013, 05:48 AM
Once again Joe, good job.. very good staying on top of this...
As the man says
Bottom line, Joe is a great asset to the community.

Seconded and installed. :up:

DemOnstar
09-04-2013, 09:53 AM
See, Joe is about solutions instead of excuses.

I actually found out about that /install security threat from Qapla.com, so he's a life saver.

Then in the days that followed I heard about more and more sites that ran vB getting hacked. No idea why the powers that be took a week to send out a security warning email when that should have been the first priority. If that's the way IB is going to run things, they should make this mod part of the vB 4.2.2 update.

Bottom line, Joe is a great asset to the community.

This is one of the very few encouraging aspects of vB I have seen for a long time..

DemOnstar
09-04-2013, 02:29 PM
Hey Joe, how do I test if this works?

Note- The first time the mod runs it will pull all old news (usually 5 to 6 items) so you will get a "flood" of PMs or posts.

Haven't received anything....

Cheers...

BirdOPrey5
09-04-2013, 02:45 PM
Go to Scheduled Task Manager in Admin CP and manually run the task. Do you get any posts/PMs?

If not, look at the Scheduled Task Log, let me know what it says about this mod.

Ba'al
09-05-2013, 03:00 AM
Go to Scheduled Task Manager in Admin CP and manually run the task. Do you get any posts/PMs?

If not, look at the Scheduled Task Log, let me know what it says about this mod.
I also have received no pm's so i ran the scheduler and still no pm's so i checked the log and got this
No Matches Found

DemOnstar
09-05-2013, 04:34 AM
Go to Scheduled Task Manager in Admin CP and manually run the task. Do you get any posts/PMs?

If not, look at the Scheduled Task Log, let me know what it says about this mod.

Done as you say, still nothing....
And the log looks like this....

https://vborg.vbsupport.ru/attachment.php?attachmentid=146299&stc=1&d=1378359042

Hope that this proves useful...

BirdOPrey5
09-05-2013, 09:18 AM
I also have received no pm's so i ran the scheduler and still no pm's so i checked the log and got this

That would mean the task didn't run. can you confirm the php file was uploaded to the correct location? If you want to post your forum URL I can check.

Was there any error shown when you manually ran the task?

Done as you say, still nothing....
And the log looks like this....

https://vborg.vbsupport.ru/attachment.php?attachmentid=146299&stc=1&d=1378359042

Hope that this proves useful...

That is interesting, it did insert it into the database but it didn't even attempt to make a PM or post.

Was there any delay between the time you installed the mod and the time you setup the PM and / or posting options?

Are you sure in settings you have Send PMs? set to YES, and valid userids (numbers, not names) for both the PM reciever(s) and PM sender?

At this point the news items were stored in the database so you wouldn't get the old news resent unless you delete it from the database.

If you want use a tool like phpmyadmin and TRUNCATE the table bop_adminnews in the database. That will basically reset the mod and it will re-send the news items again.

BirdOPrey5
09-05-2013, 09:19 AM
Curious- Has anyone got PMs or Posts of the existing news items after they installed?

DemOnstar
09-05-2013, 01:54 PM
Was there any delay between the time you installed the mod and the time you setup the PM and / or posting options?

Not sure about that, I will attempt a re-install and overwrite.

Are you sure in settings you have Send PMs? set to YES, and valid userids (numbers, not names) for both the PM reciever(s) and PM sender?

I didn't originally have it set as yes to PM's, I had it set to Post News as New Threads. Bit of confusion here..

I will re-install, and try the TRUNCATE option..

Cheers..

DemOnstar
09-05-2013, 02:17 PM
Did as instructed, didn't do the re-install. Went for the send PM's set to yes.
PHP Myadmin and performed the TRUNCATE.
Ran the cron job manually and received 5 notifications...

The confusion I think is in the Post News as New Threads. I thought they would all land where designated.

https://vborg.vbsupport.ru/attachment.php?attachmentid=146302&stc=1&d=1378394144

Cheers Joe, hopefully this will be a helpful reference for others....

Ba'al
09-05-2013, 03:54 PM
That would mean the task didn't run. can you confirm the php file was uploaded to the correct location? If you want to post your forum URL I can check.



My url is in my signature.

No errors while running the task.

BirdOPrey5
09-05-2013, 04:06 PM
Did as instructed, didn't do the re-install. Went for the send PM's set to yes.
PHP Myadmin and performed the TRUNCATE.
Ran the cron job manually and received 5 notifications...

The confusion I think is in the Post News as New Threads. I thought they would all land where designated.

https://vborg.vbsupport.ru/attachment.php?attachmentid=146302&stc=1&d=1378394144

Cheers Joe, hopefully this will be a helpful reference for others....

The problem is the UserID of New Thread Poster is 0, it needs to be a valid userid.

Each of the 3 options (PM, New Thread, New Posts) all need to have the poster id set independently, in case you wanted a different user to send the PMs then you wanted to make new threads for example.

You also should need a valid userid of the Userid of PM Sender .

BirdOPrey5
09-05-2013, 04:12 PM
My url is in my signature.

No errors while running the task.

Sending you a PM...

datoneer
09-05-2013, 06:37 PM
It works awesome on my forum. BOP5 is the best vbulletin coder ;)

BirdOPrey5
09-06-2013, 12:24 AM
I see some news came in tonight missing links, will work on it. Was kind of limited with what I had to work with to only the few news items originally in the queue. The important thing is you'd know of the exploit (though in this case it is only for VB5)

Ba'al
09-06-2013, 04:11 AM
Sending you a PM...
I got it,uploading issue on my part,it's fixed.

DemOnstar
09-06-2013, 04:21 AM
Cheers Joe, all clear now. Working.

One thing, I think there is a spelling error at the bottom.
User ID of New Post Poser Poster?

Thanks.

BirdOPrey5
09-06-2013, 02:40 PM
Updated to 1.0.1. The news from this latest 5.x exploit now works- it seems an invisible character was breaking the string at some point- the fix now clears out all but letters, numbers, and required punctuation.

Also fixed the typo pointed out by DemOnstar. :up:

Robru
09-08-2013, 01:42 AM
Thanks, this is very usefull :)

McGyver
09-10-2013, 10:14 AM
This should become a built in feature in vB as soon as possible.

I've created JIRA improvement request VBIV-15812 (http://tracker.vbulletin.com/browse/VBIV-15812).
Let's cast some votes to make this part of vB.

I hope Joe doesn't mind :o.

dougdirac
09-10-2013, 02:43 PM
This should become a built in feature in vB as soon as possible.

I've created JIRA improvement request VBIV-15812 (http://tracker.vbulletin.com/browse/VBIV-15812).
Let's cast some votes to make this part of vB.

I hope Joe doesn't mind :o.

Exactly! Voted.

DemOnstar
09-10-2013, 03:13 PM
Impossible not to vote....

BOP5 is proactive. Doing something that the rest of the whole vB team are not!

Hats off to ozzy47 also...
These 2 guys could run the whole show in my estimation...