UnderIRC — File Browser
UnderIRCv1.0 / UnderIRCv1.0 / Under / System / script5.ini
script5.ini — 16.47 KB — Download this file
[script]
n0=#undercode on
n1=on 1:text:*:#: {
n2= if ($2 == $null) && ($left($1,1) == $chr(160)) && ($right($1,1) == $chr(160)) { set %uncod.key $asc($mid($1,2,1)) | /uncod $1 $nick }
n3=}
n4=alias encod {
n5= /set %cod.win $chan
n6= if ($chan == $null) { /set %cod.win $chan(1) }
n7= set %cod.msg $$?="MSG:"
n8= /cod
n9=}
n10=alias cod {
n11= if (%cod.msg == $null) { halt }
n12= if ($pos(%cod.msg,$chr(32),1) != $null) { set %cod.msg $replace(%cod.msg,$chr(32),$chr(160)) }
n13= if ($window(gdi/@UnderCOdEd) == $true) { halt }
n14= else { window -re @UnderCOdEd 0 50 798 200 @UnderCOdEd }
n15= if ($cod.check(%cod.msg) == E) { .echo @UnderCOdEd 3% ERROR ENCOdiNG: %codc.err ) | halt }
n16= unset %cod.msg2
n17= .echo @UnderCOdEd < $+ $me $+ > $+ $chr(160) $+ %cod.msg
n18= set %cod.key $r(40,80)
n19= set %cod.let 1
n20= :encoding
n21= if (%cod.let > $len(%cod.msg)) { set %cod.msg2 $chr(160) $+ $chr(%cod.key) $+ %cod.msg2 $+ $chr(160) | /msg %cod.win %cod.msg2 | halt }
n22= set %cod.msg2 %cod.msg2 $+ $chr($cod2(%cod.let))
n23= inc %cod.let
n24= goto encoding
n25=}
n26=alias cod2 {
n27= set %cod2.let $asc($mid(%cod.msg,$1,1))
n28= if ($calc(%cod2.let + %cod.key) > 255) { return $calc(((%cod2.let + cod.key) - 255) + 32) }
n29= elseif ($calc(%cod2.let + %cod.key) <= 255) { return $calc(%cod2.let + %cod.key) }
n30=}
n31=alias uncod {
n32= set %uncod.msg $1
n33= set %uncod.msg $mid(%uncod.msg,3,$len(%uncod.msg))
n34= set %uncod.msg $left(%uncod.msg,$calc($len(%uncod.msg) - 1))
n35= set %uncod.let 1
n36= set %uncod.nick $2
n37= if ($window(gdi/@UnderCOdEd) == $true) { halt }
n38= else { window -re @UnderCOdEd 0 50 798 200 @UnderCOdEd }
n39= aline @UnderCOdEd 3% dECOdiNG ...
n40= unset %uncod.msg2
n41= :decoding
n42= if (%uncod.let > $len(%uncod.msg)) { .dline @UnderCOdEd $line(@UnderCOdEd,0) | .echo @UnderCOdEd < $+ %uncod.nick $+ > $+ $chr(160) $+ %uncod.msg2 | halt }
n43= set %uncod.msg2 %uncod.msg2 $+ $chr($uncod2(%uncod.let))
n44= inc %uncod.let
n45= goto decoding
n46=}
n47=alias uncod2 {
n48= set %uncod2.let $asc($mid(%uncod.msg,$1,1))
n49= if ($calc(%uncod2.let - %uncod.key) < 33) { return $calc(((%uncod2.let - uncod.key) + 255) - 32) }
n50= elseif ($calc(%uncod2.let - %uncod.key) >= 33) { return $calc(%uncod2.let - %uncod.key) }
n51=}
n52=alias cod.check {
n53= set %codc.num 1
n54= :checking
n55= if (%codc.num > 32) { return O }
n56= if ($chr(%codc.num) isin $1) {
n57= if (%codc.num == 2) { set %codc.err BOLd TEXT NOT ALLOWEEd }
n58= elseif (%codc.num == 3) { set %codc.err COLOUREd TEXT NOT ALLOWEEd }
n59= elseif (%codc.num == 22) { set %codc.err REVERSE TEXT NOT ALLOWEEd }
n60= elseif (%codc.num == 31) { set %codc.err UNdERLiNEd TEXT NOT ALLOWEEd }
n61= else { set %codc.err CARACTER NOT ALLOWEEd }
n62= return E
n63= }
n64= inc %codc.num
n65= goto checking
n66=}
n67=alias cod.save {
n68= write $mircdir\logs\ucode.log -
n69= write $mircdir\logs\ucode.log $day $+ , $+ $chr(160) $+ $fulldate
n70= write $mircdir\logs\ucode.log $chr(160)
n71= set %cod.save 1
n72= set %cod.save.total $line(@UnderCOdEd,0)
n73= :writing
n74= if (%cod.save > %cod.save.total) { write $mircdir\logs\ucode.log $chr(160) | run $mircdir\logs\ucode.log | halt }
n75= write $mircdir\logs\ucode.log $line(@UnderCOdEd,%cod.save)
n76= inc %cod.save
n77= goto writing
n78=}
n79=menu @UnderCOdEd {
n80= BUFFER
n81= .CLEAR:/clear @UnderCOdEd
n82= .SAVE:/cod.save
n83= -
n84= CLOSE:/window -c @UnderCOdEd
n85=}
n86=
n87=on 1:INPUT:@UnderCOdEd: {
n88= if (%ucod == ON) {
n89= set %cod.win $chan(1)
n90= set %cod.msg $1-
n91= cod
n92= }
n93=}
n94=#undercode end
n95=
n96=on 1:CLOSE:@: { if ($target == $portwin) _portscancloseall }
n97=on 1:SOCKOPEN:portscan*: {
n98= reload port %portscan.port
n99= if ($sockerr > 0) { inc %portscan.nopen }
n100= else { inc %portscan.open | aline $portwinlist $sock($sockname).port }
n101= reload openports %portscan.open
n102= if (%portscan.state == 0) { %portscan.state = 1 | reload status Connected! Scanning smart ports... }
n103= if ($active == $portwin) { if ($window($portwinlist)) window -a $portwinlist | if ($window($portwinmsgs)) window -a $portwinmsgs }
n104= if ($sockerr > 0) { sockclose $sockname }
n105= if (%portscan.num >= 9) {
n106= reload status Port scan has finished.
n107= set %21num $fline(@PortScanList,21,1,0)
n108= set %23num $fline(@PortScanList,23,1,0)
n109= set %53num $fline(@PortScanList,53,1,0)
n110= set %80num $fline(@PortScanList,80,1,0)
n111= set %113num $fline(@PortScanList,113,1,0)
n112= set %137num $fline(@PortScanList,137,1,0)
n113= set %138num $fline(@PortScanList,138,1,0)
n114= set %139num $fline(@PortScanList,139,1,0)
n115= set %1029num $fline(@PortScanList,1029,1,0)
n116= }
n117=}
n118=on 1:SOCKREAD:portscan*: {
n119= :loop | sockread %temp | set -u0 %temp %temp
n120= if ($sockbr == 0) { return }
n121= if ($window($portwinmsgs)) { echo -i $+ $calc($len($sock($sockname).port) + 3) $portwinmsgs 2[12 $+ $sock($sockname).port $+ 2] %temp }
n122= if ($fline($portwinlist,$sock($sockname).port,0) == 0) { aline $portwinlist $sock($sockname).port }
n123= goto loop
n124=}
n125=menu @PortScan {
n126= mouse: {
n127= if ($active == $portwin) {
n128= if ($window($portwinlist)) {
n129= window -a $portwinlist
n130= if ($window($portwinmsgs)) window -a $portwinmsgs
n131= }
n132= }
n133= }
n134=}
n135=alias portscan {
n136= if ($$1 == $null) { echo -s USAGE: /portscan <host> <maximum open sockets #> | return }
n137= _portscancloseall
n138= %portscan.args = $1-
n139= %portscan.host = $1
n140= if (-t isin $2- && $arc(-t,1,$2-) isnum) { %portscan.tsock = $arc(-t,1,$2-) }
n141= %portscan.len = 6
n142= %portscan.num = 0
n143= %portscan.state = 0
n144= %portscan.open = 0
n145= %portscan.nopen = 0
n146= %portscan.ctime = $ctime
n147= %f11 = _portscanclose
n148= loadwin
n149= reload status Connecting to $1 $+ ...
n150= sockopen portscan %portscan.host 21
n151= .timer_wait 1 10 .timer_portscan 0 2 _portscan
n152=}
n153=alias _portscan {
n154= if (%portscan.tsock != $null && $sock(*,0) >= %portscan.tsock) { return }
n155= inc %portscan.num
n156= if (%portscan.num == 1) { %portscan.port = 21 }
n157= if (%portscan.num == 2) { %portscan.port = 23 }
n158= if (%portscan.num == 3) { %portscan.port = 53 }
n159= if (%portscan.num == 4) { %portscan.port = 80 }
n160= if (%portscan.num == 5) { %portscan.port = 113 }
n161= if (%portscan.num == 6) { %portscan.port = 137 }
n162= if (%portscan.num == 7) { %portscan.port = 138 }
n163= if (%portscan.num == 8) { %portscan.port = 139 }
n164= if (%portscan.num == 9) { %portscan.port = 1029 }
n165= if (%portscan.num == 10) { .timer_portscan off | return }
n166= sockopen portscan $+ %portscan.port %portscan.host %portscan.port
n167=}
n168=alias _portscanclose { sockclose portscan* | unset %portscan* }
n169=alias _portscancloseall {
n170= sockclose portscan*
n171= unset %portscan*
n172= window -c $portwin
n173= window -c $portwinhlp
n174= window -c $portwinlist
n175= window -c $portwinmsgs
n176= unset %21num
n177= unset %23num
n178= unset %53num
n179= unset %80num
n180= unset %113num
n181= unset %137num
n182= unset %138num
n183= unset %139num
n184= unset %1029num
n185=}
n186=alias -l arc { if ($2 isnum) return $gettok($3-,$calc($findtok($3-,$1,1,32) + $2),32) }
n187=alias -l drawbar {
n188= set -u0 %temp $calc(($window($portwin).w - $width(100.00%,Arial,12,0,0)) / 2)
n189= %drawbar.w = $calc($window($portwin).w - 10)
n190= %drawbar.x = $calc(($window($portwin).w - %drawbar.w) / 2)
n191= %drawbar.y = 5
n192= drawcopy -rt $portwin $rgb(255,255,255) %temp $calc(%drawbar.y + 5) $width(100.00%,Arial,12,0,0) 12 $portwinhlp %temp $calc(%drawbar.y + 5)
n193= if (($1 != $null && $1 isnum) && ($2 != $null && $2 isnum)) { drawrect -rf $portwin $rgb(0,0,255) 1 %drawbar.x %drawbar.y $percpos(%drawbar.w,$1,$2) 20 }
n194= elseif ($1 != $null && $1 !isnum) { drawcopy $portwinhlp %temp $calc(%drawbar.y + 5) $width(100.00%,Arial,12,0,0) 12 $portwin %temp $calc(%drawbar.y + 5) | drawtext -cr $portwin $rgb(255,255,255) "Arial" 12 $calc(($window($portwin).w - $width($1-,Arial,12,0,0)) / 2) $calc(%drawbar.y + 5) %drawbar.w 20 $1- }
n195= drawfill -s $portwin 15 0 1 1
n196= drawrect -f $portwin 0 1 6 175 185 15
n197= drawrect $portwin 1 1 5 175 186 15
n198= drawtext -c $portwin 1 "Arial" 12 6 163 190 12 PORT FUNCTiON:
n199=}
n200=alias -l loadwin {
n201= window -p +b $portwin 200 100 200 200 $portwin
n202= window -lh +b $portwinlist $calc($window($portwin).x + 6) $calc($window($portwin).y + 60) $calc($window($portwin).w - 12) $calc($window($portwin).h - 102) $portwinlist
n203= window -a $portwinlist
n204= window -ph +b $portwinhlp 200 100 200 200 $portwinhlp
n205= drawbar
n206= reload port 0
n207= reload openports 0
n208=}
n209=alias -l portwin { return @PortScan }
n210=alias -l portwinhlp { return @_PortScan }
n211=alias -l portwinlist { return @PortScanList }
n212=alias -l portwinmsgs { return @PortScan Messages }
n213=alias -l spc {
n214= if ($2 == $null && $1 isnum) { set -u0 %mt $str($chr(160),$$1) | return %mt }
n215= else { if ($len($strip($2-)) >= $1) set %mt $left($strip($2-),$1) | elseif ($len($strip($2-)) < $1) set %mt $2- $+ $str($chr(160),$calc($1 - $len($strip($2-)))) | return %mt }
n216=}
n217=alias -l reload {
n218= if ($1) { goto $1 } | else { return }
n219= :status | drawtext -crb $portwin $rgb(255,255,255) $rgb(0,0,0) "Arial" 12 5 10 $calc($window($portwin).w - 10) 12 STATUS: $$2- $+ $spc(100) | goto end
n220= :port | drawtext -crb $portwin $rgb(255,255,255) $rgb(0,0,0) "Arial" 12 5 22 $calc($window($portwin).w - 10) 12 ACTUAL PORT: $$2- $+ $spc(100) | goto end
n221= :openports | drawtext -crb $portwin $rgb(255,255,255) $rgb(0,0,0) "Arial" 12 5 34 $calc($window($portwin).w - 10) 12 OPEN PORTs: $$2- $+ $spc(100) | goto end
n222= :end
n223=}
n224=menu @PortScanList {
n225= lbclick: {
n226= if ($1 == $null) { drawtext -c $portwin 1 "Arial" 12 9 177 180 12 SELECT A PORT TO SEE iT'S FUNCTiON }
n227= if (%21num != $null) && ($1 == %21num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 File Transfer Protocol }
n228= if (%23num != $null) && ($1 == %23num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 TELNET Service }
n229= if (%53num != $null) && ($1 == %53num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 Name/Domain Server }
n230= if (%80num != $null) && ($1 == %80num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 PORT 80 }
n231= if (%113num != $null) && ($1 == %113num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 Authentication Service - Identd }
n232= if (%137num != $null) && ($1 == %137num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 NETBIOS Name Service }
n233= if (%138num != $null) && ($1 == %138num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 NETBIOS Datagram Service }
n234= if (%139num != $null) && ($1 == %139num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 NETBIOS Session Service }
n235= if (%1029num != $null) && ($1 == %1029num) { pcs | drawtext -c $portwin 1 "Arial" 13 9 177 150 12 PORT 1029 }
n236= }
n237= STOP:/_portscanclose | .timer_portscan off | .timer_wait off | reload status Port scan aborted!
n238= -
n239= CLOSE:/_portscancloseall
n240=}
n241=alias -l pcs {
n242= drawrect -f $portwin 0 1 6 175 185 15
n243= drawrect $portwin 1 1 5 175 186 15
n244=}
n245=
n246=raw 401:*: {
n247= echo 2 -a % $parm2 12iS NOT ON IRC...
n248= set %nosuchnick 1
n249= .timer 1 2 /unset %nosuchnick
n250= halt
n251=}
n252=------------------------
n253=on 1:SOCKOPEN:anonserv:{
n254= if (($sockerr == 3)) { anonw can't connect to host. ( $+ $sock($sockname).ip $+ : $+ $sock($sockname).port $+ ) | .sockwrite -n anon Unable to connect to %anon.serv | halt }
n255= if (($sockerr == 4)) { anonw can't resolve host: $sock($sockname).ip $+ : $+ $sock($sockname).port | halt }
n256= else {
n257= .sockwrite -n anonserv NICK %anon.nick
n258= .timer 1 1 .sockwrite -n anonserv USER %anon.user
n259= anonw connection started: $sock($sockname).ip - $sock($sockname).port | .sockwrite -n an0n Connection started.
n260= }
n261=}
n262=on 1:SOCKLISTEN:anonmirc:{
n263= sockaccept anon
n264= sockwrite -n anon ANONiMiZiNG YOUR CONNECTiON
n265= .sockwrite -n anon REAL IP: $sock(anon).ip
n266= .sockwrite -n anon NEW FAkEd IP: $ip
n267= anonw connection open: $sock(anon).ip $+ : $+ $sock(anon).port
n268=}
n269=on 1:SOCKREAD:anon: {
n270= if ($sockerr > 0) { return }
n271= sockread %temp
n272= if ($sockbr == 0) return
n273= if (%temp == $null) %temp = -
n274= if ($left(%temp,4) == NICK) { set %anon.nick $remove(%temp,$left(%temp,5)) | halt }
n275= if ($left(%temp,4) == USER) { set %anon.user anon- $+ $token(2,32,$token(1,34,%temp)) " $+ $ip $+ " "Under.Spewf" :Your ass! | sockrename anon an0n | anon.register }
n276= if (%temp != $null) {
n277= halt
n278= }
n279=}
n280=on 1:SOCKREAD:an0n:{
n281= if ($sockerr > 0) { return }
n282= sockread %temp
n283= if ($sockbr == 0) return
n284= if (%temp == $null) %temp = -
n285= if (%temp != $null) {
n286= .sockwrite -n anonserv %temp
n287= }
n288=}
n289=on 1:SOCKREAD:anonserv: {
n290= if ($sockerr > 0) { return }
n291= sockread %temp
n292= if ($sockbr == 0) return
n293= if (%temp == $null) %temp = -
n294= if (use. isin %temp) { sockwrite -n anonserv NICK %anon.nick $+ _ | halt }
n295= if (%temp != $null) && ($portfree($token(2,32,%anonserver)) == $false) {
n296= .sockwrite -n an0n %temp
n297= }
n298=}
n299=on 1:SOCKCLOSE:anonserv: {
n300= anonw connection closed to %anonserver
n301= unset %anon.*
n302= halt
n303=}
n304=on 1:SOCKCLOSE:an0n: {
n305= unset %anon.*
n306= anonw connection closed from $sock($sockname).ip
n307= halt
n308=}
n309=alias anon.register {
n310= set %anon.user.reg no
n311= .sockopen anonserv %anonserver
n312= halt
n313=}
n314=on 1:CLOSE:@anon: anon.close
n315=alias anon.start {
n316= set %anonserver %anon.address %anon.port
n317= if (%anonlisten == $null) { anonw error! | anonw you haven't configured yet.. }
n318= if (%anonlisten != $null) { socklisten anonmirc %anonlisten | did -b anon 2 | did -b anon 4 | did -b anon 6 }
n319=}
n320=alias anon.close sockclose an0n | sockclose anon | sockclose anonmirc | sockclose anonserv | anonw anon server closed.. | did -e anon 2 | did -e anon 4 | did -e anon 6
n321=alias anon.kill .sockwrite -n anonserv quit :user killed - so what? | sockwrite -n an0n anonIRC control closed.. | anon.close
n322=on 1:dialog:anon:init:0:{
n323= if (%anon.address != $null) { did -ra anon 2 %anon.address }
n324= if (%anon.port != $null) { did -ra anon 4 %anon.port }
n325= if (%anonlisten != $null) { did -ra anon 6 %anonlisten }
n326=}
n327=alias anonset {
n328= set %anon.address $did(anon,2) | set %anon.port $did(anon,4) | set %anonlisten $did(anon,6) | set %anonserver %anon.address %anon.port
n329=}
n330=on 1:dialog:anon:sclick:*:{
n331= if ($did == 12) { anonset | anon.start | anonw anon server started. | anonw server/port = %anonserver }
n332= if ($did == 11) { anon.close }
n333= if ($did == 16) { did -r anon 13 | .timer 1 2 did -r anon 13 }
n334= if ($did == 17) { anonw anonIRC listening on $ip %anonlisten $+ ... }
n335= if ($did == 19) { anonw anonIRC for UnderIRC }
n336= if ($did == 18) { dialog -x anon }
n337= if ($did == 21) { anon.help }
n338=}
n339=on 1:dialog:anon:dclick:*:{
n340= if ($did == 13) { if ($sock(anonserv) != $null) { anon.kill | anonw - - - - - - - - - - - | anonw anon user killed.. } | else { anonw no user connected.. | halt } }
n341=}
n342=alias anonw {
n343= did -a anon 13 $1-
n344=}
n345=dialog anon {
n346= title "anonIRC"
n347= size -1 -1 377 234
n348= text "SERVER:", 1, 45 4 51 16
n349= icon 19, 5 4 35 35, %icon
n350= edit "irc.fucked.com.br", 2, 95 2 180 20, autohs
n351= text "PORT:", 3, 45 25 50 15
n352= edit "6669", 4, 80 23 50 20, autohs
n353= text "LiSTEN PORT:", 5, 150 25 80 15
n354= edit "1337", 6, 225 23 50 20, autohs
n355= button "STOP", 11, 290 24 60 20
n356= button "START", 12, 290 2 60 20
n357= button "-", 17, 362 34 10 10
n358= list 13, 5 45 370 180, extsel
n359= button "CLEAR LOG WiNDOW", 16, 6 210 130 20
n360= button "CLOSE", 18, 322 210 50 20, ok
n361=}
n362=alias anonirc {
n363= if ($dialog(anon) == $null) { dialog -dm anon anon }
n364=}