Hack Forums
[Python] Make a ban checker? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Make a ban checker? (/showthread.php?tid=5906495)



Make a ban checker? - Derpec - Nov 11, 2018

Sorry if this is nubish but whatever.


Can you make a ban checker in Python to check for banned accounts in a notepad? EX: Username:Password

And if banned save it to another file as "banned" if banned, and "good" if good.


RE: Make a ban checker? - Tryingtorecoveraccount - Nov 11, 2018

Are you really storing passwords as plain in a txt? what are you comparing this to to check if the account is banned?


RE: Make a ban checker? - DopplerAF - Nov 12, 2018

Yes it is possible all you need is little string manipulation. I am sure google will give you the exact code.


RE: Make a ban checker? - Sympanothz - Nov 12, 2018

need to know the site u wanting to test against


RE: Make a ban checker? - Infamia - Nov 12, 2018

no you can't .


RE: Make a ban checker? - h0lyl337 - Dec 6, 2019

yes you can its quite simple, unless your doing it for a game client(WoW) then you would have to read the game memory(or find a clever way, pixel reading, packet reading etc).


RE: Make a ban checker? - incognito04 - Dec 6, 2019

Yes you can. Just analyse communication with the server using wireshark and fiddler and re-implement it in python.


RE: Make a ban checker? - realsunjester - Dec 6, 2019

(Nov 11, 2018 06:49 PM)Derpec Wrote:  Sorry if this is nubish but whatever.


Can you make a ban checker in Python to check for banned accounts in a notepad? EX: Username:Password

And if banned save it to another file as "banned" if banned, and "good" if good.

banned accounts for what website


RE: Make a ban checker? - is_nimda - Dec 7, 2019

let us know which website(s) , I would use burpsuite so could give you some tips if you give us more info


RE: Make a ban checker? - Flash7475 - Dec 24, 2019

Here is my code to help you out. Its not perfect for unexpected input and its not super optimized.

you can pipe the file in using stdin:
Quote:ban_checker.py < ban.txt


assuming text file containing plain text organized in username:password like this:

Quote:bob:7423
john:password1
greg:password$$$$


it would then separate each line into either a good.txt or a banned.txt file.

and quick note as stated above, dont store usernames and passwords into plain text files.

PHP Code

<?php 
import sys
import os

def main
():

 
   username_to_compare = 'john'

 
   good_file = open('good.txt', 'w')
 
   ban_file = open('banned.txt', 'w')


 
   for line in sys.stdin:

 
       stripped_line = line.rstrip()
 
       split_line = stripped_line.split(':')
 
       
        
        if username_to_compare in split_line
:
 
           ban_file.write(stripped_line + '\n')
 
       else:
 
           good_file.write(stripped_line + '\n')

 
   good_file.close()
 
   ban_file.close()


if 
__name__ == "__main__":
 
   main()