| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Comments:
<0> oh, sorry <1> Aerdan: Yeah, then create the appropiate opcode, do error checking and throw it on the queue. You can probably just copy the number code exactly <2> PeterThoeny you could write "for(@rules)" and use $_ instead of $rule <1> Aerdan: Change the regex and stuff. <3> PeterThoeny: the stuff in s//here/ is just a regular string <4> dkr: ok so you got me all squared away for deleting that file at logoff. is there a way that on the logon script i can make EVERYTHING hold until the completion of that script? because all the backgroup apps load before that script is done, which decides if they should even be loging in at all <3> I don't know how on windows <4> hmm <4> how would you do it on Linux ... and ill see about researching another option for windows systems <3> in unix world, shells have file sin home dir they execute at login and logoff <5> Windows has logon and logoff scripts <3> or I misunderstood the question <0> dkr: yes, i can filter the s//here/ part, the only vars used are $1, $2... <6> PeterThoeny: anyways, your first and second statements in the foreach loop are effectively the same as not using it at all <5> The stuff to configure them is tucked away in one of those msc panels <1> PeterThoeny: What the **** is that?
<7> Im looking for the line of code to place on top of my perl files to output the errors in detail, as my server is homemade and has no error log option <0> sparkman: i need to untain it because of -T switch <7> please, sorry <6> oh <6> ok <4> dkr: no you may have heard me correctly ... its just that while this script is running (the script determines wheather that user can log on or not) the start up apps are loading ... i want those apps to WAIT to load until the script is done ... because if they arent suposed to be there in the first place i dont want those apps loading at all <8> Untainting is GOOD <9> buu: actually, I think I'll just convert the hex to an int [by means of sprintf] <0> buu: pardon me? <1> Aerdan: Well you'd need it in an int anyway <1> PeterThoeny: Your code. <1> PeterThoeny: It was very, very weird. <0> the EditSyntaxPlugin is marked as alpha because of the unsafe untaint :-) <7> force errors to browser anyone? <0> and the reason why i am here to ask the question :-) <1> PeterThoeny: What, exactly, are you trying to do? <3> PeterThoeny: where do the rules come from? do they really need to be full perl expressions: s/foo/bar/anyflagIwant ? why not take the amtch regex as input and the replacement string? then you can turn off interpolation with s'$rule_match'$rule_replace' <0> the EditSyntaxPlugin (http://twiki.org/cgi-bin/view/Plugins/EditSyntaxPlugin) is a twiki plugin to emulate other wiki and bb syntax <0> the regex are rules to convert to and from other syntax <0> the rules come from configuration pages, e.g. wiki pages that are world writable <3> well, i suggest splitting on / into those two vars, then you can sanitize the regex part separate from the repacement string <3> and consequently disallow them from adding /e to the end <10> can anyone point me in the direction of a good perl module tutorial? <0> right now a parse from the first / to the last /, expecting at least another slah in between <3> right, I am saying to split it into two parts <0> and add a hardcoded g switch <11> attempting to parse Perl? good luck :) <3> and eval "\$text s'$rule_match'$rule_replace'" <0> dkr: and escape / if not done? <3> with =~ <3> ok, yeah, will splitting into regex part and replacement string isn't as simple as split/\//, since you have to worry abotu escaped /s <0> thanks dkr; with $rule_match, do i need to worry about escaping meta chars? <3> by using single quotes as the delimiter, it means ti doesn't get interpolated before doing the regex part <3> so that takes care of your s/$blah/foo/ case <0> oic <3> you'l still want to check $rule_match beforehand for stuff like (?{}) <0> does that work if $rule_match or $rule_replace contain single quotes? <3> no, nothing is ever easy. :) <0> i need to allow unescaped meta such as [xyz]{3} or .* <3> mayeb you shoul dmake a system call to /bin/grep which only supprots basic regular exprssions... ;) <0> ok, how about trying to filter in all valid chars (many), then sanitise the regex? <0> such as escaping the $ of $blah if not escaped <3> incidentally, there are ways to make a rgex go into an infinite loop only allowing basic regex stuff <0> but i am not sure what other "gotach" things to look out for <1> dkr: Ya know, I thought there were, but I haven't been able to replicate one recently <1> dkr: Er, no, ?{} won't do anything <12> buu: the trick is to get it to backtrack a lot <3> perldoc perlre shows some of the infinite loop situations <13> Type 'perldoc perlre' in your shell or go to http://perldoc.perl.org/perlre.html <1> beth: I thought so, but the examples I remembered don't do it any more <12> buu: and have just the right input <12> yeah, I haven't tried to actually do it <3> buu: I meant ?{arbitrary code} <1> eval: $x=q/scary (?{print "ZOMG HAX0RED"})/; /$x/ <13> buu: Error: Eval-group not allowed at runtime, use re 'eval' in regex m/scary (?{print "ZOMG HAX0RED"})/ at (eval 165) line 15. <1> Well <1> It demonstrates the point <3> PeterThoeny: you could also wrap the whole routine in an alarm/eval trap so you can kill off a regex that would DoS you. <3> in a set period of time
<1> Actually you might not <1> Anyway, if your this paranoid, do it like buubot does <0> ok, basic re question then: how do i parse from the first unescaped / to the third unescaped / with any numbers of escaped / in between? <11> Safe compartment inside a jail? :) <11> oh in a forked off child too <3> eval: foo =~ /(o?)*/ <13> dkr: Error: Unrecognized character \xC3 at (eval 165) line 15. Use of uninitialized value in pattern match (m//) at /usr/share/perl/5.8/utf8_heavy.pl line 211. Use of uninitialized value in scalar as <0> so, this is valid: /aaa\/bbb/ccc\/ddd/ <14> PeterThoeny: try something like m{[^/]/((?:.|\/\/)+)\/} <0> dkr: thanks on the dos hint, good advise <14> PeterThoeny: though beware of \\\\\/-like text. <3> eval: 'foo'=~/(o?)*/ <13> dkr: 1 <11> and why aren't you using japhy's Regexp::Parser module? <3> I'm not devious enough to be a haxor <0> Khisanth: tahnks for the hint on Regexp::Parser, i will check it out <15> hey, does anyone have the source for JoeDog's scout handy? <14> Aerdan: *wavie* <9> LeoNerd: *waveback* <14> Surprising who you meet around FreeNode.. :) <6> hmm <6> i need a configuration file format :< <14> Anyway. I said I was going to bed, and so I shall. Gnight all <9> LeoNerd: nini. <11> sparkman: there are plenty of Config modules <6> yeah i know <6> i just gotta choose one >_< <16> sparkman: all comes down to how people will edit the config .. if it's never by hand then storable, data-dumper, xml are your friends. The ini format isn't too bad otherwise .. <17> buubot: mangle <13> Yaakov: ok <6> Woosta: eh, true... but i'm looking for somethign people can edit, without having to edit the main script <17> buubot: mangle <13> Yaakov: i just gotta choose one >_< <16> As I said .. the ini format isn't too bad <17> Config::General is the bestest. <16> meh .. don't like apaches format <11> also Config::Tiny <16> I want a format more like postfix where once something is defined it can be used elsewhere <17> The Apache configuration file is one of the most widely known and most flexible. <18> Yaakov: it is also one of the worst <0> thanks dkr et al, i will try the proper scan & selective escape meta route <17> Ikarus: What is better? <11> that is more of a DSL and less of a config file! <18> Yaakov: I use either XML or Data::Dumper (with pretty print options) normally <16> I think the argument really comes down to what needs to be stored .. <17> That's a lousy way to get a human writable configuration. <16> Like is it a flat set of options? <16> Or is it nested? <18> Yaakov: ah well, the problem with Apache style is that it is a really filthy mix of SGML and straight config files <17> You can keep it neat. <18> Yaakov: no, it is filthy by design <16> Nah, it should be one or the other .. I really can't stand it <19> heh. "a filthy mix" <17> Well, I like Config::General, it works well. <16> Why can't they *accept* the old style still for backwards compatibility, but set all new releases to default to an XML (or SGML) format? <17> And with all its flaws, the apache format comes out on top for human writable, well known formats. <17> XML is HORRIBLE for humans. <16> If it were well formatted then it would be damned easy to make complex configuration wizards <18> XML is perfect for humans imho <16> Yaakov: not really .. XML is a very easy way to arrange data .. think how many people know HTML .. ? <17> buubot: mangle <13> Yaakov: XML is perfect for humans imho <17> Heh. <17> Hellology! <3> a bot tells us xml is perfect for humans... I think that was an insult <17> buubot: mangle <13> Yaakov: Yaakov: not really .. XML is a very easy way to arrange data .. think how many people know HTML .. ? <17> Hrm... it isn't mangling. <17> SOMETHING IS WRONG <16> But it DOES agree that XML is good for humans :) <17> mangle: not really .. XML is a very easy way to arrange <13> not really .. XML is a very easy way to arrange
Return to
#perl or Go to some related
logs:
qemu sendkey enter klamwin antivirus bitchx switching between channels FHost is not allowed to connect to this MySQL #math #oe mysqldump : binlogging change gamma fedora xcompmng debian #perl
|
|