All pastes #807263 Raw Edit

RootBox Webserver (mIRC)

public text v1 · immutable
·published 2007-12-06 11:41 UTC
rendered paste body
;To Start: /rbw on [port] (/rbw on 80)
;To Stop: /rbw off
;To Debug: /rbw debug

alias rbw {
  if ($1 == $null) {
    echo -a Commands Are:
    echo -a On [port], Off, Debug, Info. (/rbw [command])
  }
  elseif ($1 == on) {
    if ($sock(rbw_server))  { echo -a Server already enabled }
    elseif (!$sock(rbw_server)) { .socklisten rbw_server $2 | echo -a Server Enabled on port $2 | .set %rbwp $2 | set %rbwurl http:// $+ $ip $+ : $+ %rbwp }
  }
  elseif ($1 == off) {
    if (!$sock(rbw_server)) { echo -a Server not active }
    elseif ($sock(rbw_server)) { .sockclose rbw_* | echo -a Web Server Disabled (/rbw on [port] To Enabled Again) }
  }
  elseif ($1 == debug) {
    if ($window(@rbwd)) window -c @rbwd
    elseif (!$window(@rbwd)) window @rbwd
  }
  elseif ($1 == info) {
    echo -a -=Small Sock Web Server=-
    echo -a Server IP: $ip (If you would like confirmation of your IP, please visit: http://www.whatismyip.com )
    echo -a Server Port: %rbwp
    echo -a URL: %rbwurl
  }
}
on *:socklisten:rbw_server: {
  .sockaccept rbw_visitor $+ $r(1000,9999)
}
on *:sockread:rbw_visitor*: {
  window @rbw
  set %rbw_temp %x
  var %x
  sockread %x
  tokenize 32 %x 

  if ($1 == GET) && (/rvb?season4.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <!-- r00tb0x _ver 0.6b webserver by: brandon -->
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q <title>Red Vs. Blue: Season 4</title>
    %q <center>
    %q <b>Description:</b> The whole season 4 of <u>Red Vs Blue</u> created by <i>RoosterTeeth.com</i> 
    %q <br><br><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=7878712468305620500&hl=en" flashvars=""> </embed>
    %q </center>
  }
  if ($1 == GET) && (/rvb?season3.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <!-- r00tb0x _ver 0.6b webserver by: brandon -->
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q <title>Red Vs. Blue: Season 3</title>
    %q <center>
    %q <b>Description:</b> The whole season 3 of <u>Red Vs Blue</u> created by <i>RoosterTeeth.com</i> 
    %q <br><br><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=4067894786902251260&hl=en" flashvars=""> </embed>
    %q </center>
  }
  if ($1 == GET) && (/rvb?season1.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <!-- r00tb0x _ver 0.6b webserver by: brandon -->
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q <title>Red Vs. Blue: Season 1</title>
    %q <center>
    %q <b>Description:</b> The whole season 1 of <u>Red Vs Blue</u> created by <i>RoosterTeeth.com</i> 
    %q <br><br<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=2509698022758661335&hl=en" flashvars=""> </embed>
    %q </center>
  }
  if ($1 == GET) && (/rvb?season2.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <!-- r00tb0x _ver 0.6b webserver by: brandon -->
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q <title>Red Vs. Blue: Season 5</title>
    %q <center>
    %q <b>Description:</b> The whole season 2 of <u>Red Vs Blue</u> created by <i>RoosterTeeth.com</i> 
    %q <br><br><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=4833169745208123782&hl=en" flashvars=""> </embed>
    %q </center>
  }
  if ($1 == GET) && (/rvb?season5.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <!-- r00tb0x _ver 0.6b webserver by: brandon -->
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q 
    %q <title>Red Vs. Blue: Season 5</title>
    %q <center>
    %q <b>Description:</b> The whole season 5 of <u>Red Vs Blue</u> created by <i>RoosterTeeth.com</i> 
    %q <br><br><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-6716635619451851176&hl=en" flashvars=""> </embed>
    %q </center>
  }
  if ($1 == GET) && (/page?test.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) {
    var %q .sockwrite -n $sockname
    %q <form name="form1" method="post" action="test" enctype="text/plain">
    %q <input name="name" type="text" style="position:absolute;width:150px;left:71px;top:40px;z-index:1">
    %q <input name="subject" type="text" style="position:absolute;width:150px;left:71px;top:71px;z-index:2">
    %q <textarea name="message" style="position:absolute;width:200px;height:100px;left:71px;top:102px;z-index:3"></textarea>
    %q 
    %q <input name="submit" type="submit" value="submit" style="position:absolute;left:71px;top:211px;z-index:4">
    %q </form>
    %q 
    %q <div id="text1" style="position:absolute; overflow:hidden; left:0px; top:42px; width:67px; height:114px; z-index:5"><font style="font-size:13px" face="Arial" color=#000000><div>Name</div><div><BR></div><div>Subject</div><div><BR></div><div><BR></div><div>Message</div><div><BR></div><div><BR></div></font></div>
  }
  if ($1 == GET) && (/projects?images.htm isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) { 
    var %q .sockwrite -n $sockname
    %q <HTML><HEAD><TITLE>r00tb0x - projects - images</TITLE></HEAD>
    %q <CENTER>
    %q <code>Images By: Brandon</code><br>
    %q <H1>Current Image Projects</H1><BR /> <br />
    %q Brand<b>O</b>n's Signature: <br /><img src="http://img219.imageshack.us/img219/599/testfc3.gif"><br /> <br />   
    %q Brand<b>E</b>n's Signature: <br /><img src="http://img216.imageshack.us/img216/6716/brandenwaterbybrandonar8.gif"><br /> <br />   
    %q Funny Ass Falling: <br /><img src="http://img239.imageshack.us/img239/97/scorpiandrunkil2.gif"><br /> <br />  
    %q I didnt make this.. its just sm3xy: <br /><img src="http://img211.imageshack.us/img211/9804/sexydeviled1.png "><br /> <br /> <br /> <br />
  }
  if ($1 == GET) && (/stats? isin $2) && ($me !isin $1-) && (HTTP* iswmcs $3) { 
    var %q .sockwrite -n $sockname
    set %chan.name $chr(35) $+ $replace($2,/stats?,$chr(0),.htm,$chr(0),&,$chr(0))
    echo -a %network
    %q <HTML><HEAD><TITLE>r00tb0x - stats of %chan.name $+ </TITLE></HEAD>
    %q <STYLE TYPE="text/css">
    %q table.topl $chr(123)
    %q 	border-width: 3px 3px 3px 3px;
    %q 	border-spacing: 0px;
    %q 	border-style: outset outset outset outset;
    %q 	border-color: green green green green;
    %q 	border-collapse: separate;
    %q 	background-color: white;
    %q $chr(125)
    %q table.topl th $chr(123)
    %q 	border-width: 1px 1px 1px 1px;
    %q 	padding: 2px 2px 2px 2px;
    %q 	border-style: inset inset inset inset;
    %q 	border-color: green green green green;
    %q 	background-color: white;
    %q $chr(125)
    %q table.topl td $chr(123)
    %q 	border-width: 1px 1px 1px 1px;
    %q 	padding: 2px 2px 2px 2px;
    %q 	border-style: inset inset inset inset;
    %q 	border-color: green green green green;
    %q 	background-color: white;
    %q $chr(125)
    %q    </STYLE>
    %q <BODY><FONT FACE="Verdana">
    %q <H2>Stats for %chan.name $+ </H2>
    %q <TABLE class="topl" style="font-size: 16px;font-family: 'Verdana';font-style: normal;font-weight: normal;" WIDTH="1000">
    %q <TR><TD WIDTH="80"><B>Nickname</B></TD><TD WIDTH="140"><B>Words Used</B></TD></TR> $+ $htmltop( $+ $network $+ @ $+ %chan.name $+ ) $+
    %q </TABLE><center><br /> <br /> <font size="1">Only Avaliable on the <b>r00tb0x</b> network.</font><br> To See The Stats of <b> $+ $me $+ </b> <a href="/stats? $+ $me $+ .htm">click here</a></center>
  }
  if ($1 == GET) && ($2 == /) && (HTTP* iswmcs $3) { pg1.htm $sockname | set %home.error 0 | .timer 1 3 set %home.error 1 }
  if ($1 == GET) && (/index? isin $2) && (HTTP* iswmcs $3) { $2 $sockname | set %home.error 0 | .timer 1 3 set %home.error 1 }
  if ($1 == GET) && (/stats? isin $2) && ($me isin $1-) && (HTTP* iswmcs $3) { 
    set %home.error 0
    .timer 1 3 set %home.error 1
    var %q .sockwrite -n $sockname
    %q <HTML><HEAD><TITLE>r00tb0x - stats of $me $+ </TITLE></HEAD>
    %q <font style="font-size: 16px;font-family: 'Verdana';font-style: normal;font-weight: normal;">
    %q $me isin <b> $+ $chan(0) $+ </b> channels. $chr(40) $+ $chan(1) and $chan(2) $+ )<br />
    %q $me is owned by: <b>Brandon</b><br />
    %q $me is Currently Connected From: *@cpe-XX-XXX-XX-XXX.cinci.res.rr.com<br />
    %q $me is on the $network network (<a href="irc:// $+ $serverip $+ : $+ $port $+ /#box"> $+ $server $+ </a>)<br />
    %q $me is using the "r00tb0x" webserver on port "88" with the URL of " $+ %rbwurl $+ "<br>
    %q <br /> <br /> <br /> <br />
    %q <b>Settings Of RBWebserver 1.0.0a:</b><br /> <br />
    %q <b>Using:</b> $sockname For You ( $+ $replace($sockname,rbw,GUEST) $+ ).<br />
    %q Running off of mIRC v $+ $version (REGISTERED TO r00tb0x inc.)<br />
    %q Home page is http://rage.uk.to:88/<br />
    %q <b>IP</b> of <b>65.XXX.XX.87</b> <br />
    %q Landing <b>2404</b> Cisco Routers Into the Server Services of <b>65.XXX.XX.87</b><br />
    %q <b>PHP</b>: No (Using RBPHP)<br />
    %q <b>HTML</b>: Yes<br />
    %q <b>RBSQL</b>: Yes (Not Done Yet! - rbsql.db)<br />
    %q <b>RBPHP</b>: Yes (Half way Coded - rbphp.mrc)<br />
    %q <b>RBHTM</b>: Yes (Done - HTML 1.1)<br />
    %q <b>RBIRC</b>: Yes (Done - MRC $version $+ )<br />
    %q <b>Running:</b> <u>r</u>00tb0<u>x</u> ver 1.0b (http://rage.uk.to:88/)<br />
    %q Your Current IP Address is <b> $+ $sock($sockname).ip $+ </b><br /><br />
    %q <b>Current Screenshot</b><br />
    %q <img src="http://rage.uk.to/r00tb0x.gif">
    %q
    %q </FONT>
  }
  if ($1 == GET) && (/stats isin $2) && (? !isin $2) && (HTTP* iswmcs $3) { 
    .timer 1 3 set %home.error 1
    var %q .sockwrite -n $sockname
    %q <HTML><HEAD><TITLE>r00tb0x - stats</TITLE></HEAD>
    %q <STYLE TYPE="text/css">
    %q table.topl $chr(123)
    %q 	border-width: 3px 3px 3px 3px;
    %q 	border-spacing: 0px;
    %q 	border-style: outset outset outset outset;
    %q 	border-color: green green green green;
    %q 	border-collapse: separate;
    %q 	background-color: white;
    %q $chr(125)
    %q table.topl th $chr(123)
    %q 	border-width: 1px 1px 1px 1px;
    %q 	padding: 2px 2px 2px 2px;
    %q 	border-style: inset inset inset inset;
    %q 	border-color: green green green green;
    %q 	background-color: white;
    %q $chr(125)
    %q table.topl td $chr(123)
    %q 	border-width: 1px 1px 1px 1px;
    %q 	padding: 2px 2px 2px 2px;
    %q 	border-style: inset inset inset inset;
    %q 	border-color: green green green green;
    %q 	background-color: white;
    %q $chr(125)
    %q    </STYLE>
    %q <BODY><FONT FACE="Verdana">
    %q <H2>Stats for #Box</H2>
    %q <TABLE class="topl" style="font-size: 16px;font-family: 'Verdana';font-style: normal;font-weight: normal;" WIDTH="1000">
    %q <TR><TD WIDTH="80"><B>Nickname</B></TD><TD WIDTH="140"><B>Words Used</B></TD></TR> $+ $htmltop(r00tb0x@#box) $+
    %q </TABLE><center><br /> <br /> <font size="1">Only Avaliable on the <b>r00tb0x</b> network.</font><br> To See The Stats of <b> $+ $me $+ </b> <a href="/stats? $+ $me $+ .htm">click here</a></center>
  }
  echo @rbw $sockname - $sock($sockname).ip
  .sockclose $sockname
  echo @rbw %x

}

on *:unload: { unset %rbwurl | unset %rbwp | echo -a Thank you for useing rbw. }
on *:load {
  echo -a -= rbw (r00tb0x webserver) By: Brandon =-
  echo -a To Start: /rbw on [port] (/rbw on 80)
}