News:

Wondering if this will always be free?  See why free is better.

Main Menu

VIRUS?

Started by Dilyar, January 30, 2014, 04:09:05 AM

Previous topic - Next topic

Dilyar

Hi all,
So I decided to try this stupid mod and it left the footer permanently, even looking in my footer code I cannot find it. Even worse, even if I remove the mod in my admin panel, its still there and so is its ad in the footer. How can I wipe this completely? I have done everything like clearing cache etc..

Footer Code:

function template_body_below()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   echo '
      </div>
   </div>';

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '
   <div id="footer">
      <ul class="reset">
         <li class="copyright">', theme_copyright(), '</li>
         <li class="copyright">Theme By <a href="http://www.smfhispano.net">SMFHispano</a></li>
         <li class="copyright">Munazire @2014 <a href="http://www.yengidewr.net">Yengi Dewr</a>Gha Mesup</li>
         <li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
         ', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
         <li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
      </ul>';

   // Show the load time?
   if ($context['show_load_time'])
      echo '
      <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

   echo '
   </div>
</div>';
}



Dilyar

Okay so it was removed when I removed the code:  <li class="copyright">', theme_copyright(), '</li>

unfortunately this also removed simple machine's ad, and I dont want to do this as I love you guys. Is there a way to edit another file which the virus' code was inserted?

PhuriousGeorge

Virus.....really?

I've replied on the mod's thread. Key here is to ALWAYS ensure you pay attention to errors on install and uninstall of modificaitons.

Dilyar

I had no errors, and yes I consider it a vifrus because it took over my forum

kat

Don't quote me, here, coz I'm really just guessing....

I believe that, if your QueryString.php file has this:


// Auto Embed Media Pro

$showInfo = MediaProCheckInfo();
   
if ($showInfo == true)
    {
if (!isset($autoMediaLoaded))
{
$buffer = preg_replace('~(, Simple Machines LLC</a>)~', ', Simple Machines LLC</a><br /><a href="http://www.createaforum.com" target="_blank">Simple Audio Video Embedder</a>', $buffer);
$buffer = preg_replace('~(class="new_win">Simple Machines</a>)~', 'class="new_win">Simple Machines</a><br /><a href="http://www.createaforum.com" target="_blank">Simple Audio Video Embedder</a>', $buffer);
$autoMediaLoaded = 1;
}
}

// End Auto Embed Media Pro

// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.


you need to replace that whole block , with this:

// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.


PhuriousGeorge

Quote from: K@ on January 30, 2014, 02:42:59 PM
Don't quote me, here, coz I'm really just guessing....

I believe that, if your QueryString.php file has this:


// Auto Embed Media Pro

$showInfo = MediaProCheckInfo();
   
if ($showInfo == true)
    {
if (!isset($autoMediaLoaded))
{
$buffer = preg_replace('~(, Simple Machines LLC</a>)~', ', Simple Machines LLC</a><br /><a href="http://www.createaforum.com" target="_blank">Simple Audio Video Embedder</a>', $buffer);
$buffer = preg_replace('~(class="new_win">Simple Machines</a>)~', 'class="new_win">Simple Machines</a><br /><a href="http://www.createaforum.com" target="_blank">Simple Audio Video Embedder</a>', $buffer);
$autoMediaLoaded = 1;
}
}

// End Auto Embed Media Pro

// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.


you need to replace that whole block , with this:

// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.

Heh, that was my assumption as well, but I was gonna attempt to let him/her learn from it :D

kat

He might learn, from that. You never know. ;)

Dilyar

learn what?
i am not a coding genius like u guys...........im an average joe

Dilyar

the only way i can get rid of that footer is by removing the simple machines footer too which is not something i wana do. can you guys tell me exactly what i need to do to get rid of the program and that footer?

kat

Did you try what I told you, above?

PhuriousGeorge

EDIT: Ninja'd by a K@ :)

Quotelearn what?
i am not a coding genius like u guys...........im an average joe

I'm learning too ;) always learning

Quote from: Dilyar on January 30, 2014, 03:05:48 PM
the only way i can get rid of that footer is by removing the simple machines footer too which is not something i wana do. can you guys tell me exactly what i need to do to get rid of the program and that footer?

Did you attempt what K@ suggested in Reply #5 ? That's exactly the suggestion I was going to give as well. Give it a shot.

Dilyar

ok thanks that removed the footer, now how do i remove the mod it self? I dont see it in brows mods but the settings and buy copy right removal is still in my admin panel

kat

I have an idea...

Was that the very last mod that you installed, by any chance?

If it was...

http://www.simplemachines.org/community/index.php?topic=400356.0

Dilyar

i already tried that it didnt work lol. GGWP

PhuriousGeorge

Is the mod still showing on your Package Manager as installed?

At this point, I have to revert back to my original advice:

QuoteDid you get errors when removing the mod? ALWAYS pay attention to errors when installing and removing mods. When you get these, it means you have to go touch some code to fix things.

You can go to the mod's page and parse the mod to show the changes it makes to your forum's code when installing. You should go through that operation by operation to ensure everything that was added is removed.

Read this as well:
http://wiki.simplemachines.org/smf/Error_in_mod_installation

It's really easy, no need to be a programmer, (almost) all tasks in a mod execute a simple Find / Add After, Find / Add Before or Find / Replace, which is easily done in a text editor with minimal knowledge.

If I were at home, I might just fix your files for you, but alas, I've got another 3+ hours +drive to go QQ

PhuriousGeorge

#16
Gah, screw it, if you want to zip up and send me attach the following files, I can ensure that mod's completely gone in a matter of minutes:

./Themes/default/languages/Modifications.english.php
./Themes/default/languages/Modifications.english-utf8.php
./Sources/QueryString.php
./index.php
./Sources/Admin.php
./Sources/Subs.php
./Sources/Post.php

EDIT: Whelp, you seem to have gone offline, so see my previous post.

Dilyar

omg what? am i that dumb or just super confused?

kat

If you look at the parser, on the mod's download page, it'll tell you what edits were made.

You can reverse those, if you know what you're doing. :)

PhuriousGeorge

I've got some more time if you have a chance to attach those files I listed.

Dilyar

this is all i could find

PhuriousGeorge

It doesn't appear you even attempted to uninstall the mod. Every piece of code from that mod still exists in the files you attached. Are you certain you uninstalled??

(Delete DOES NOT uninstall. It just deletes the package)

Anywho, I've attached the files with the mod removed.

Also, you probably have these files that were added by the mod still floating around. Feel free to delete them:
./Sources/AutoEmbedMediaPro2.php
./Themes/default/AutoEmbedMediaPro2.template.php
./Themes/default/languages/AutoEmbedMediaPro.english.php
./Themes/default/languages/AutoEmbedMediaPro.english-utf8.php

and you can delete the 'videos' directory (supposing it's not used by any other mod)

Dilyar

ohhh your amazing, that fixed it! Now, what should I do from now on when i download mods to make sure they work well and what should I do when I remove them so i know they are completely gone? To prevent this again.

PhuriousGeorge

Well, you already know how to get mods installed mostly, the one thing you need to be sure to do is check for errors when you choose install (the page where it shows you everything it's going to edit).

If there are errors in the install, that can (usually) be easily resolved. First place to start is these articles:
http://wiki.simplemachines.org/smf/Error_in_mod_installation
http://wiki.simplemachines.org/smf/Manual_installation_of_mods

It's really not hard, just intimidating. Just grab a decent text editor (Notepad++) and just manually perform the edits that the regular install couldn't complete.

Now for uninstall, again, DO NOT use the Delete option. You must first Uninstall (again, if there are errors, just do the same as above, just keep in mind you're removing instead of adding), then once you've completed the uninstall, you're safe to use the delete option.

Heh, I someone should do a video tutorial series :P

Again, it really is pretty easy, all you have to do is a little text editing, and you'll start doing wonders ;)

Drunken Clam

Great support there PhuriousGeorge, well done.  :)

Dilyar

yea thanks so much for your support your amazing! Now I know I have done the delete button before without uninstalling. How can I check and remove them now? is it too late?

PhuriousGeorge

Quote from: Dilyar on January 30, 2014, 06:29:53 PM
yea thanks so much for your support your amazing! Now I know I have done the delete button before without uninstalling. How can I check and remove them now? is it too late?

Ummm... well, I haven't tried it myself, but you should be able to re-upload your packages, then use the tool here:
http://wiki.simplemachines.org/smf/Manually_setting_a_package_installed_or_uninstalled

Set all the mods you know you deleted without uninstalling as installed, then uninstall the mods correctly.

Again, haven't tried it myself, but in theory it should work.

kat

Nicely done, oh phurious one! Ta!

Advertisement: