Bug #3947
closed
/sockclose * crashing adiirc
Added by westor (GR) over 6 years ago.
Updated over 6 years ago.
Description
Hello,
There is a crash on /sockclose *, when you open a lot of connections like 1000+ and then executing that command then it crashing.
Example Code:
alias crash_adi {
var %t = 1000
var %i = 1
while (%i <= %t) {
sockopen test_ $+ %i google.com 80
inc %i
}
sockclose *
}
- Thanks!
This does not crash for me, there must be more to it.
I will provide you the hole code in order to test it and see, i tried to reproduce step by step but it didn't trigger, when i try that code it crashes.
Load in hash some ports database: //hmake port 10000 | hload port port.list
Port.list: https://pastebin.com/ihYw00Ne
Example Run: /portscan TEST N/A 1.179.198.37
#PortScanner on
alias portscan {
var %h = Port
var %t = $hget(%h,0).data
if (!$1) || ($0 !== 3) || (!$hget(%h)) || (!%t) || (%t !== $hget(%h,0).item) || ($ulist($3,exemp,1)) || ($status !== connected) { return }
var %i = 1
while (%i <= %t) {
var %d = $hget(%h,%i).data
var %sock = portscan_ $+ $3 $+ _ $+ %d
if (%d) && (!$sock(%sock)) { sockopen %sock $3 %d | sockmark %sock $1- }
inc %i
}
}
ON *:SOCKOPEN:portscan_*: {
if ($sockerr > 0) || ($status !== connected) { return }
tokenize 32 $sock($sockname).mark
window -e @PORTS
echo -t @PORTS *** $1 ( $+ $2 $+ ) $chr(91) $+ $3 $+ $chr(93) founded as $sock($sockname).port open port.
echo -s gline *@ $+ $3 1d [G-Lined]: Your IP has been founded that $sock($sockname).port port is opened.
sockclose * $+ $3 $+ *
}
#PortScanner end
- Status changed from New to Duplicate
- Target version changed from 3.1 to 3.2
Also available in: Atom
PDF