Snippets

[GH]Rake Useful vBulletin SQL Queries

Updated by [GH]Rake

File vBulletinSQLQueries.sql Modified

  • Ignore whitespace
  • Hide word diff
-#https://guidedhacking.com
+#guidedhacking.com
 
 #Remove logged IP Addresses for a certain userid
 UPDATE ipdata set ip='' WHERE userid = 123456;
Updated by [GH]Rake

File vBulletinSQLQueries.sql Modified

  • Ignore whitespace
  • Hide word diff
+#https://guidedhacking.com
+
 #Remove logged IP Addresses for a certain userid
 UPDATE ipdata set ip='' WHERE userid = 123456;
 UPDATE ipdata set altip='' WHERE userid = 123456;
Updated by [GH]Rake

File vBulletinSQLQueries.sql Modified

  • Ignore whitespace
  • Hide word diff
 WHERE post.title = '';
 
 #Disable "Who Read This Thread" on all forums:
-UPDATE forum SET options = options - 1048576 WHERE (options & 1048576);
+UPDATE forum SET options = options - 1048576 WHERE (options & 1048576);
+
+#Delete all soft deleted posts
+delete from post where visible = 2;
Updated by [GH]Rake

File vBulletinSQLQueries.sql Modified

  • Ignore whitespace
  • Hide word diff
-#Remove logged IP Addresses for a certain userid:
+#Remove logged IP Addresses for a certain userid
 UPDATE ipdata set ip='' WHERE userid = 123456;
 UPDATE ipdata set altip='' WHERE userid = 123456;
 UPDATE post set ipaddress='' WHERE userid = 123456;
Updated by [GH]Rake

File vBulletinSQLQueries.sql Modified

  • Ignore whitespace
  • Hide word diff
 update user set passworddate='2000-01-01';
 update usergroup set passwordexpires = '3650';
 
-#Migrated or upgraded vBulletin and some users don't have updated stronger password salts/hashes?
+#Migrated or upgraded vBulletin and some users dont have updated stronger password salts/hashes?
 #Find those users with short Password salts:
 SELECT userid, username, PASSWORD , salt FROM  user WHERE length(salt) < 10;
 
 update user set passworddate='2000-01-01' WHERE length(salt) < 10;
 update usergroup set passwordexpires = '3650';
 
-#Find users that haven't updated their passwords since the above query
+#Find users that havent updated their passwords since the above query
 #Use this to keep track of how many people have updated:
 #Best solution would be to create a seperate usergroup, move them into it and then
-#Move them out when they've changed their password
+#Move them out when theyve changed their password
 select userid, username, passworddate from user where passworddate = '2000-01-01';
 
-#Find users that haven't signed in recently:
+#Find users that havent signed in recently:
 select userid, username, lastvisit from user where lastvisit < UNIX_TIMESTAMP('2017-01-01')
 
 #Alternatively find users that have signed in recently:
 UPDATE post SET pagetext = replace(pagetext, 'Microsoft', 'MicroShit');
 
 #Board migration left lots of "&quot;" all over your forum? 
-#This is how you change &quot; to " to all posts:
+#This is how you change &quot; to the quote thingy in all posts:
 UPDATE post SET pagetext = replace(pagetext, '&quot;', '"');
 
 #Replace all old quote tags with correct vbulletin quote tags:
  1. 1
  2. 2
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.