⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perllecture.html

📁 黑客培训教程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<br>*** zwanderer has quit IRC (Quit: off)

<br>&lt;bitsNbytes> he means on the "console"

<br>&lt;NIN_Dude> nm

<br>&lt;NIN_Dude> yeah

<br>&lt;Jesteruk> i mean in that black bit where you type shit

<br>&lt;Jesteruk> ;)

<br>&lt;NIN_Dude> heh...

<br>&lt;bitsNbytes> now how to make our scripts more efficient

<br>&lt;bitsNbytes> this is mainly for Unix audience

<br>&lt;Jesteruk> As long as mine work, i'm happy

<br>*** pitpat has joined #bsrf

<br>&lt;bitsNbytes> Use mod_perl in the Apache server

<br>&lt;pitpat> wow bitsNbytes still going

<br>&lt;Jesteruk> go on dude...

<br>&lt;pitpat> >=)

<br>&lt;bitsNbytes> also edit the httpd.conf as followz

<br>&lt;Jesteruk> I run mine on a unix server, just test em on here, i

cant install linux cause i got a software modem, and im not financially

able to buy new shit

<br>&lt;Jesteruk> *listenin*

<br>&lt;bitsNbytes> Alias /perl/&nbsp; /real/path/to/perl/scripts

<br>&lt;bitsNbytes> the above line is not to be typed as it is

<br>&lt;bitsNbytes> it means direct it to ur perl script directory

<br>&lt;bitsNbytes> then in the next line

<br>&lt;Jesteruk> yeah, assign a virtual path to the system path

<br>&lt;bitsNbytes> &lt;Location /perl>

<br>&lt;bitsNbytes> SetHandler perl-script

<br>&lt;bitsNbytes> PerlHandler Apache::Registry

<br>&lt;bitsNbytes> Options ExecCGI

<br>&lt;bitsNbytes> &lt;/Location>

<br>&lt;bitsNbytes> leave a line

<br>*** Dustin has quit IRC (Read error: 104 (Connection reset by peer))

<br>&lt;bitsNbytes> PerlModule Apache::Registry

<br>&lt;bitsNbytes> PerlModule CGI

<br>&lt;bitsNbytes> PerlHandler On

<br>&lt;bitsNbytes> this is what u have to type in your /etc/httpd.conf

file

<br>&lt;Jesteruk> how exactly down the mod_perl thingy simply scripting?

<br>&lt;bitsNbytes> the PerlModule CGI preloads the CGI module

<br>&lt;Jesteruk> down=does (beer)

<br>*** pitpat has quit IRC (Quit: )

<br>&lt;bitsNbytes> PerlHeader On makes most of your scripts run out of

the box with mod_perl

<br>&lt;Jesteruk> hum , i see

<br>&lt;bitsNbytes> now .. perl was designed to be a glue language

<br>&lt;Jesteruk> Recently ive been readin about perl with mySQL, i dun

like PHP

<br>&lt;bitsNbytes> that means it provide sscope for embedding code excerpts

from other langs or some system calls

<br>&lt;Jesteruk> it has all the cool shit from other languages, and dont

have the uncool shit..apparently

<br>&lt;bitsNbytes> you can do so easily

<br>&lt;Jesteruk> i found a few good reads

<br>&lt;Jesteruk> and some shit ones

<br>* NIN_Dude shoots jester in the face

<br>&lt;bitsNbytes> hehehe

<br>&lt;Jesteruk> i fear you now.

<br>&lt;bitsNbytes> now how about formatting lists and tables with HTML

shortcuts

<br>&lt;Jesteruk> im listenin

<br>&lt;bitsNbytes> for this purpose the CGI module provides HTML helper

functions

<br>*** Norton has joined #bsrf

<br>&lt;bitsNbytes> which, when passed as array refernces(pointers to arrays)

<br>*** TCL has joined #bsrf

<br>*** ChanServ sets mode: +v TCL

<br>&lt;Jesteruk> which does what exactly?

<br>&lt;Jesteruk> oops...

<br>&lt;bitsNbytes> apply themselves to each element of the referenced

array ;)

<br>&lt;bitsNbytes> for example

<br>&lt;bitsNbytes> print ol(li(qw(red blue green)])};

<br>&lt;bitsNbytes> sorry the last } is actually a )

<br>&lt;Jesteruk> hum, that looks irish to me

<br>&lt;NIN_Dude> HTML

<br>&lt;NIN_Dude> ol

<br>&lt;NIN_Dude> li

<br>&lt;Jesteruk> ah..

<br>&lt;NIN_Dude> qw?

<br>&lt;NIN_Dude> perl?

<br>&lt;Jesteruk> what's perl?

<br>&lt;bitsNbytes> yeah the qw is NEAT

<br>&lt;NIN_Dude> you went over earlier

<br>&lt;NIN_Dude> i forgot

<br>&lt;NIN_Dude> :\

<br>&lt;Jesteruk> well damn it

<br>&lt;bitsNbytes> rather than qoute each individual element passed as

parameter

<br>&lt;bitsNbytes> u just say qw(....)

<br>*** TCL has quit IRC (Quit: 3 2 1, 1 2 3, who the heck is haxoring

me?!)

<br>&lt;NIN_Dude> so like string?

<br>&lt;bitsNbytes> all the words within the braces get quoted individually

<br>&lt;Jesteruk> aaah

<br>&lt;bitsNbytes> just like in the above line qw (red blue green) means

<br>*** Grendel has quit IRC (Quit: brb)

<br>&lt;bitsNbytes> ("red",&nbsp; "blue", "green")

<br>&lt;NIN_Dude> yeah

<br>&lt;NIN_Dude> i got it now

<br>*** Grendel has joined #bsrf

<br>&lt;bitsNbytes> ok now the next line is

<br>*** CHAOS has joined #bsrf

<br>*** ChanServ sets mode: +v CHAOS

<br>&lt;bitsNbytes> &lt;OL>&lt;LI>red&lt;/LI>&nbsp; &lt;LI>blue&lt;/LI>

&lt;LI>green&lt;/LI>&lt;/OL>

<br>*** Jesteruk has left #bsrf

<br>&lt;bitsNbytes> let us see how this workz when implemented actually

<br>&lt;CHAOS> www.www.www

<br>&lt;NIN_Dude> what's the print ol(li(qw(red blue green))) do?

<br>&lt;bitsNbytes> coming to it

<br>&lt;NIN_Dude> k

<br>&lt;bitsNbytes> just give me some time

<br>&lt;bitsNbytes> i am having a nasty time with the ****ing connection

here

<br>&lt;bitsNbytes> use CGI qw(:standard :html3);

<br>&lt;bitsNbytes> %hash = (

<br>&lt;CHAOS> *yawwwnie!*

<br>&lt;bitsNbytes> "BitsNbytes => ["Alcoholic", "druggie", "nerd"]

<br>*** _ciR_ has quit IRC (Ping timeout: 180 seconds)

<br>&lt;bitsNbytes> "lamest1 => ["Cool", "lame", "funny"]

<br>&lt;bitsNbytes> );

<br>&lt;bitsNbytes> $\ = "\n";

<br>&lt;bitsNbytes> print "&lt;TABLE> &lt;CAPTION>People I know&lt;/CAPTION>

<br>*** nskl has joined #bsrf

<br>&lt;bitsNbytes> print Tr (th [qw(people type)]);

<br>&lt;bitsNbytes> for $k (sort keys %hash) {

<br>*** Binary_Dealer has joined #bsrf

<br>&lt;blue|bestbuy> yummy.. I got an italian sub from 7-11

<br>&lt;Binary_Dealer> ppl =)

<br>&lt;Binary_Dealer> What's Up?

<br>*** blue|bestbuy is now known as bluehaze

<br>*** NIN_Dude has quit IRC (Quit: )

<br>&lt;bitsNbytes>&nbsp;&nbsp;&nbsp; print Tr(th($k), td( [sort @hash($k)}]));

<br>&lt;Binary_Dealer> somebody saw essex

<br>&lt;bitsNbytes> }

<br>&lt;Binary_Dealer> ??

<br>&lt;bluehaze> hehhe

<br>&lt;bluehaze> he was on last night

<br>&lt;Binary_Dealer> yes

<br>&lt;Binary_Dealer> today?

<br>&lt;bitsNbytes> print "&lt;/TABLE>;

<br>&lt;bluehaze> dunno

<br>*** NeoMeg has joined #bsrf

<br>&lt;bitsNbytes> this generates text like

<br>&lt;bitsNbytes> &lt;TABLE> &lt;CAPTION> People I have Known&lt;/CAPTION>

<br>&lt;bluehaze> is this the perl lecture?

<br>&lt;bitsNbytes> &lt;TR>&lt;TH>People &lt;/TH>

<br>&lt;bitsNbytes> yep

<br>&lt;bluehaze> ok

<br>*** divinator has joined #bsrf

<br>&lt;bitsNbytes> so u see perl a small perl code can generate a neatly

formatted form with lists and tables

<br>*** div|busy has quit IRC (Local kill by divinator (get lost you damn

prick))

<br>&lt;bitsNbytes> u can generate a lengthy HTML form

<br>*** divinator has left #bsrf

<br>*** divinator has joined #bsrf

<br>&lt;bitsNbytes> full of lists and tables just by one statemet

<br>*** sohed has quit IRC (Quit: )

<br>*** phanatic has joined #bsrf

<br>&lt;bitsNbytes> print table caption(text), Tr(th [qw(text)])

<br>&lt;bluehaze> i got a question...

<br>&lt;bitsNbytes> map {tr(th($_), td( [sort @($hash)})

<br>&lt;bluehaze> can perl help us get laid?

<br>&lt;bluehaze> cuz I told everyone that it could

<br>&lt;bluehaze> and I just want to be sure

<br>&lt;bitsNbytes> u mean as in ****ed laid

<br>&lt;bluehaze> yes of course

<br>&lt;phanatic> yes

<br>&lt;bitsNbytes> yeah sur

<br>&lt;phanatic> bluehaze has never gotten laid

<br>&lt;bluehaze> cool

<br>&lt;phanatic> in his life

<br>*** HaloScan has quit IRC (Ping timeout: 180 seconds)

<br>&lt;phanatic> back to the pearl

<br>&lt;bluehaze> lol

<br>&lt;Norton> where can i learn to chain proxies??

<br>&lt;bitsNbytes> someone wanted to know redirection to other sites in

PERL-CGI

<br>&lt;bitsNbytes> certainly not here and not now .. sorry ;)

<br>*** Leper has joined #bsrf

<br>&lt;bitsNbytes> u use the redirect function

<br>&lt;bitsNbytes> I have a peice of code for that too

<br>&lt;bitsNbytes> i know i have become terrible and painsatakingly annoyingly

boring by now

<br>&lt;bitsNbytes> but hey .. that's me aight

<br>&lt;bitsNbytes> so plz bear

<br>&lt;phanatic> hey you're cool enough to do this, how can we complain?

<br>&lt;bitsNbytes> any one from the beginning still hangin around

<br>*** josh-hamster is now known as josh-hamsTERRORIST

<br>&lt;bitsNbytes> (dozin around would do..&nbsp; :)

<br>&lt;bluehaze> I just got here

<br>&lt;bluehaze> so you gotta start over

<br>&lt;bitsNbytes> nooooooooo

<br>&lt;bluehaze> hehehe

<br>&lt;bitsNbytes> you have to ask questions and i answer them in short

.. after&nbsp; seeing the code that is

<br>&lt;bluehaze> oh

<br>&lt;bitsNbytes> so HERE COMES THE CODE

<br>&lt;bluehaze> well...

<br>&lt;bluehaze> oh

<br>&lt;bluehaze> ok

<br>&lt;phanatic> ok

<br>&lt;bitsNbytes> actually it is quite a skill to write code on the fly

and on demand

<br>&lt;bitsNbytes> i am trying to do so right now

<br>*** NeoMeg has quit IRC (Quit: )

<br>&lt;bitsNbytes> anywaz here it comes

<br>*** barcode has joined #bsrf

<br>&lt;bitsNbytes> #! /usr/bin/perl -w

<br>&lt;bitsNbytes> # orebounce - aprogram to redirect browser and set

a cookie

<br>*** wHiTE_zoMBIe has joined #bsrf

<br>&lt;bitsNbytes> use CGI qw(:cgi);

<br>&lt;bitsNbytes> $oreo = cookie (- NAME => 'filling',

<br>&lt;Norton> how big is X?

<br>&lt;bitsNbytes>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -VALUE

=> "Lard Ass",

<br>&lt;bitsNbytes>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -EXPIRES

=> '+3M',

<br>&lt;bitsNbytes>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DOMAIN =>&nbsp;

',perl.com');

<br>*** Leper has quit IRC (Quit: Leaving)

<br>&lt;bitsNbytes> $whithergo = "http://somewhere.perl.com/nothinghere.html';

<br>*** bluehaze has quit IRC (Quit: 15,1?ShowDowN v12 PrO?1 since

1996: 16,1http://www.sci.fi/~showdown/)

<br>&lt;bitsNbytes> print rediredt(-URL => $withergo,

<br>&lt;bitsNbytes>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

-COOKIE => $oreo);

<br>&lt;bitsNbytes> well that was the code

<br>&lt;bitsNbytes> and that would produce something like

<br>&lt;bitsNbytes> Status: 302 Moved Temporarily

<br>*** wHiTE_zoMBIe has quit IRC (Quit: Client Exiting)

<br>&lt;bitsNbytes> Set-Cookie: filling=LardASS; domain= .perl.com;

<br>&lt;bitsNbytes> expires = DD-MM-YY Time GMT

<br>*** zwanderer has joined #Bsrf

<br>&lt;bitsNbytes> Date: day DD-MM-YY Time GMT

<br>&lt;bitsNbytes> Location: http://somewhere.perl.com/nothinghere.html

<br>&lt;bitsNbytes> Content-Type: text/html

<br>&lt;bitsNbytes> B&lt;&lt;balnk line here>>

<br>&lt;bitsNbytes> any questions

<br>

<hr SIZE=1 WIDTH="70%">

<center>End Of Lecture</center>



</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -