Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Python Sources (Newbie)

github.com/TigerNetv/TigerBOX-v0.01 (TigerBox - Network Scanner, Proxy Scraper, IPTool, Password Generator)
github.com/TigerNetv/LeakME (LeakME - Search engine like leakedsource)
Please review my codes :)
Hey cool release regarding the TigerBox one, useful little stuff packed into one.
I'd say try building onto it to advance your skills and also build a even cooler project while doing it :D
(Nov 24, 2020 03:25 PM)ViperCode Wrote:  Hey cool release regarding the TigerBox one, useful little stuff packed into one.
I'd say try building onto it to advance your skills and also build a even cooler project while doing it :D

Thanks so much ! :)
Looks interesting and thanks for sharing your code with the community.

I had a brief look through the code, just fyi when opening files with the 'with' operator it closes them automatically when it exits the code block.
PHP Code

<?php 
        with open
('all_proxies.txt', 'wb') as f:
            f.write(alltypes.content)
        print("Proxies saved!")
        #f.close() #you can remove this 
https://lerner.co.il/2015/01/18/dont-use...r-depends/

Hey there,
If I have helped you or if you just enjoy my posts, please consider donating bitcoin to me 1DpL2kcxuidEsjt2MMN2AYufcVoXbi3v2X

[Image: FtwuQgr.gif]
Your code looks great.
As tux1 said, you don't need to close the file stream.
One thing I'd like to add is that you create useless variables :

Code
sql = "SELECT * FROM accounts WHERE password ='" + password + "'"
mycursor.execute(sql)

Your sql variable is only used in the execute method. I'd write :

Code
mycursor.execute("SELECT * FROM accounts WHERE password ='" + password + "'")




Same thing for :

Code
myresult = mycursor.fetchall()
for result in myresult:
    print(result)

Just write :

Code
for result in mycursor.fetchall():
    print(result)
(Nov 25, 2020 01:49 PM)G.P.D. Wrote:  Your code looks great.
As tux1 said, you don't need to close the file stream.
One thing I'd like to add is that you create useless variables :

Code
sql = "SELECT * FROM accounts WHERE password ='" + password + "'"
mycursor.execute(sql)

Your sql variable is only used in the execute method. I'd write :

Code
mycursor.execute("SELECT * FROM accounts WHERE password ='" + password + "'")




Same thing for :

Code
myresult = mycursor.fetchall()
for result in myresult:
    print(result)

Just write :

Code
for result in mycursor.fetchall():
    print(result)

Thanks dude ! :)
(Nov 26, 2020 11:17 AM)Alern Wrote:  Thanks dude ! :)

Actually, you can even write the print in one line :

Code
[print(result) for result in mycursor.fetchall()]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by Daniel FaradayDec 8, 2025 12:06 AM 372 44,700 Dec 8, 2025 12:06 AM
Last Post: Yasindiz
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[Python] by kplishereSep 13, 2017 12:29 PM 16 539 Sep 13, 2017 12:29 PM
Last Post: xero925