Can someone edit me this script for a bot to use it with .tcp *** or so...
i hate to use it with /tcp in client
alias tcpip {
if ($1 == next) {
inc %prt.showing
if (%prt.showing <= %prt.count) {
set %prt.show.port $gettok(%prt.match. [ $+ [ %prt.showing ] ], 1, 32)
set %prt.show.protocol $gettok(%prt.match. [ $+ [ %prt.showing ] ], 2, 32)
set %prt.show.description $gettok(%prt.match. [ $+ [ %prt.showing ] ], 3-, 32)
echo -atg 08TCP/IP » 08Port: %prt.show.port 08Protocol: %prt.show.protocol 08Description: %prt.show.description
}
else { echo -atg 08TCP/IP » No more matches | dec %prt.showing }
}
else if ($1 == previous) {
dec %prt.showing
if (%prt.showing > 0) {
set %prt.show.port $gettok(%prt.match. [ $+ [ %prt.showing ] ], 1, 32)
set %prt.show.protocol $gettok(%prt.match. [ $+ [ %prt.showing ] ], 2, 32)
set %prt.show.description $gettok(%prt.match. [ $+ [ %prt.showing ] ], 3-, 32)
echo -atg 08TCP/IP » 08Port: %prt.show.port 08Protocol: %prt.show.protocol 08Description: %prt.show.description
}
else { inc %prt.showing }
}
else if ($1 == clear) {
echo -atg 08TCP/IP » List cleared
unset %prt.*
}
else {
unset %prt.*
set %prt.find $1
set %prt.search $2-
set %prt.count 0
sockopen tcpip www.skynet.ie 80
}
}
on 1:SOCKOPEN:tcpip:{
set %prt.pattern <tr><td>(.+)</td>.+<td>(.+)</td>.+<td>(.+)</td>.+</tr>
set %prt.get /~colinmac/Programming/port_listing.html
sockwrite -n $sockname GET %prt.get HTTP/1.0
sockwrite -n $sockname Host: www.skynet.ie
sockwrite -n $sockname $crlf
}
on 1:SOCKREAD:tcpip:{
var %prt.src
sockread %prt.src
if (*<tr><td>*</td>*<td>*</td>*<td>*</td>*</tr>* iswm %prt.src) {
noop $regex(%prt.src, %prt.pattern)
if ((%prt.find == port) && (%prt.search == $regml(1))) {
inc -tg %prt.count
set %prt.match. [ $+ [ %prt.count ] ] $regml(1) $regml(2) $regml(3)
}
else if ((%prt.find == protocol) && ($+(*,%prt.search,*) iswm $regml(2))) {
inc %prt.count
set %prt.match. [ $+ [ %prt.count ] ] $regml(1) $regml(2) $regml(3)
}
}
}
on 1:SOCKCLOSE:tcpip:{
if (%prt.count == 0) {
echo -atg 08TCP/IP » No match found for $lower(%prt.find) $+(",%prt.search,")
}
else {
set %prt.showing 1
if (%prt.count == 1) { echo -atg 08TCP/IP » $+(08,%prt.count) Match Found: }
else if (%prt.count > 1) { echo -atg 08TCP/IP » $+(08,%prt.count) Matches Found (/tcpip next) }
echo -atg 08TCP/IP » 08Port: $gettok(%prt.match.1, 1, 32) 08Protocol: $gettok(%prt.match.1, 2, 32) 08Description: $gettok(%prt.match.1, 3-, 32)
}
}
I wrote the original for this one. Would never put my name on anyone elses work. That's the most disrespectfull thing you can do as a developer, and it's indeed a true copy paste of the one i wrote.. Just don't get why he would need to copy/paste the snippet, instead of just asking in a comment if I could make a bot friendly version... That's all ;)
I think LDrobert was trying to ask for help with that code but winding up posting it at the snippet section.
Pichu, as sunslayer said, he was stating that he needs the script edited to work for him. He didn't state these two words "My script" everywhere to be brought into this so-called allegation.
We still have no way of knowing if the original author wrote the code in the first place. We're not talking about "one-of-a-kind" script here. The script shown above is rather common. You have to know that MSL is so open sourced you can easily get a code and claim it's yours.