@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> Hello
<0> I've got some really bad regular expression searching code I've been handed and told to improve, I'm not as familiur in perl but my impression was that in the situation I'm dealing with it might be better to combine the searching into a single (albeit monsterous) regular expression to improve performance.
<0> Basically it comes down to I'm searching a file for various indicators of comment styles (we've got 6 or 7 types we'll eventually be dealing with) and the current code loops through the first 10k characters of a "data/code/binary/any" file performing checks for each type. Already I'm looking into ways of reducing that search to a smaller size, but also it seems perl is rewalking the same text several times whcih I think could be shortened into once.
<0> I've got a copy of the function available at http://www.syeclick.com/cl***/IdentSemiVariable.pm for reference.
<0> Any thoughts?
<1> i need help regarding packed decimal n zoned decimal
<1> anyone can help
<2> a wot and a wot?
<1> hi, im doing a conversion to transfer data from linux to as400
<1> im using the pack()
<2> http://www.hmdc.harvard.edu/jsp/q_a.jsp?id=47&bct=dInformation%252BTechnology.p8.s40.t58.q47
<2> that help ?
<1> tq let me check
<2> I guess that's a 'yes' then.
<3> yea, sounds abot right..
<3> got what he needed..



<3> suppose a 'your welcome' is due now
<2> *grin*
<4> ++Rammstein
<4> Good evening...
<2> hello
<5> if i have foo.pm with package foo::bar and package foo in it, can i make methods of foo call methods of foo::bar?
<2> if foo.pm knows foo::bar exists.
<5> foo::bar is defined in foo.pm
<5> {package foo::bar ; use base 'foo'; ...} {package foo ; ...}
<2> then it should work.
<5> Can't locate object method "builtins" via package "IPTables::Tables" (perhaps you forgot to load "IPTables::Tables"?) at IPTables.pm line 1103.
<5> that's when i invoke IPTables::Tables -> builtins() in the new() of IPTables
<2> you're trying to call a method from a supercl***, right ?
<5> subcl***, that's the problem
<2> Ah.
<2> can you move it to the supercl*** ? If you want the functionality there ?
<5> well, i could theoretically, but it'd be inelegant
<2> and make a subcl*** that is just IPTables with this one method extra?
<5> oh, this is weird -- i can call new from the subcl***, but not another method
<2> sorry, went to get lunch.
<2> back now
<2> Oldmonk IPTables::Tables::yourmethod(); doesn't work ?
<5> Mariandroid: got it working -- i think i was doing something stupid
<5> anyway, watch out for my l33t new IPTables package
<5> later
<6> Hey guys. Sorry for my perl stupidity, but what does this line do?
<6> push @{$ip{$mac}}, $ip;
<2> BSDaemon: apparently element $mac of hash %ip is an arrayref. Which you de-ref before you push an element on it.
<6> what does "pushing" do?
<2> add an element at the end of the array.
<6> oh!
<6> cool
<2> you think ?
<2> Then you should also look at pop, shift and unshift =)
<6> probably :P
<6> I think ive found the spot to stick that code snippet
<6> I had a guy offer to do it for me... for $85/hr minimum 1 hr :P
<6> I might do it..
<7> someone's here?
<7> i have a qustion
<7> whoops.. didn't read to topic
<7> is there a way to merge two files together so that when i open the combined file one will be opened and one will run in the background?
<6> why would you want to do that?
<6> why not just use netbus :P
<7> :) you got me all wrong
<7> im not into this crap
<7> anyway, is there a way to do that?
<6> probably, trojan writers do that all the time
<7> but i don't want to write a trojan, i want it for other purpose
<6> okay, but because trojan writers do it all the time, im sure people can do it for legitimate purposes too
<7> oh, ok.. but do you know how can i do that?
<6> not a clue
<7> does it involves programming?
<6> Well, how else would you suggest writing a program to do that?
<8> johnyquers (johnyquest?): i'm not sure how stdin/stdout works with it, but you could try forking the process and having the child process run the second file
<6> hey Two-Bits man, long time no see
<8> yo yo yo
<6> <-- cathartik
<7> two bits, can you give me an example?
<8> ahhh, yes it has been a long time
<6> ever since i stopped going to #html



<8> johnyquers: an example of what?
<9> johnyquers, merge what kind of two files together?
<7> of how to fork the proccess
<7> exe with jpg or bmp for example
<8> perldoc -f fork
<9> You can include an image in an exe, and have the exe display that image, but you cannot, in general, have a jpg run an exe when it is viewed.
<8> when you call fork, the remainder of the program is executed in two processes. you use process id logic to determine which is which and conditionally perform different tasks, such as executing a program. though i have no idea if fork works on win32
<9> The ability to do so would be a security flaw and would be patched when discovered. Only malware uses such techniques.
<8> ....
<7> ChrisA: i know i can have a jpg included in an exe file. i want to do the exact opposite. have an executable running when openning a jpg file
<8> ok, lay it out johnyquers. what in god's name are you trying to do?
<8> you can't, period
<9> johnyquers, you can't.
<9> Two-Bits, he's trying to write a virus.
<7> no
<9> johnyquers, yes.
<7> i will tell you the exact reason
<9> johnyquers, even if you're intentions aren't bad, that's what you're trying to do.
<8> it's not necessarily a virus
<7> and that's no nice of you to ***ume that before you heard me
<9> Well, a trojan.
<8> not necessarily a trojan either
<9> By definition a non-executable file that when opened executes something is a trojan.
<6> "a program demonstrating trojan-like behavior"
<9> Even if the intention is good, it's still a trojan.
<6> agreed
<7> oh.. i see. but my intensions are good, it's a birthday card for my girlfriend which i want to be opened in her birthday
<8> johnyquers: and you need to put an exe in a jpg for that because?
<9> johnyquers, but, supposing what you want is possible. Then any time you look at a picture a program could be run, and you'd have no idea about it happening. So any system that let you do such a thing would be very insecure.
<7> because i want that to be a surprise. the program will run a short flash animation in the date and time i've set-up
<9> Why not just send her a flash animation on her birthday?
<8> gasp
<7> because if i'm sending it to her it wouldn't be a surprise now would it?
<8> or if you have access to her computer, set up a task. or find someone else who has access to it to set it up for you
<8> any other possible way that's not an exploit would have to trick her into granting permissions above the norm
<9> johnyquers, it would be a surprise if you didn't tell her it was coming before it arrived.
<7> what's the problem with sending an exe as a jpg? so it's called a trojan by definition but in case it's not a virus
<7> well, ChrisA, that's how i want to do it so it would be the coolest
<8> because parsed files are never executed as instructions
<8> well, parsed files like images or text or the like anyway
<8> think of it this way, if what you wanted to do could be done, then everyone would be **** up a creek. for that very reason, it's NOT possible to do what you want to do regardless of why. and so, you can't
<8> and no one here is going to tell you how to do it in any of the few naughty ways which may or may not even work on her system
<6> name the file happybirthdaybitch.jpg.exe and see how dumb she is :)
<7> but i want the jpg file to open also
<6> we arent going to help you write a trojan, get over it.
<7> but you just said that that's impossible so make up your minf
<6> having a jpg execute as an exe is stupid, and wont work anyway if she has any sort of antivirus.
<7> mind
<6> I didnt say anything was impossible.
<6> Please use your brain BEFORE you speak.
<8> naming a file foo.jpg.exe is not getting a jpg to run as an exe
<6> Two-Bits: i know... it was just a silly suggestion :P
<8> any way to do what you're trying to do would be highly unreliable because it would rely on very specific conditions to exploit a flaw in a system
<8> BSDaemon: i was explaining to him why it's not contradictory
<6> "happy birthday!" *send jpg file*
<6> "oh sweety thanks!" *opens file*
<6> *up comes norton saying its a virus*
<7> there isn't norton on her computer
<6> "thanks ***hole... nice birthday present" *dumps your ****
<7> or any other antivirus
<9> I think I know what you should get her for a birthday present...
<8> just bloody well put it on her computer yourself
<9> Well, that and longstem red roses.
<6> ChrisA: a new boyfriend?
<7> i don't get it. a guy comes here with a legitimate question and you won't help for the sake it's may be a virus?
<6> johnyquers: what part of "running an executable via a jpg is stupid" do you not get?
<8> we wont help because there simply exists NO LEGITIMATE WAY TO DO IT
<8> you're not the first to ask, and you wont be the last to walk away empty handed
<6> maybe youll have to not be a cheap-o and actually get her a real present
<9> Also, it's not a perl question, so it's not actually even on-topic for this channel.
<9> Despite that, we took the time to explain why you can't do what you want to do.
<9> Even though all the evidence is that you're a wannabe virus writer that heard that perl people know that stuff.
<6> That was awfully nice of you guys, I must say.
<9> But since you might be legitimate, we tried to be informative.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#java
bt8738
mkdev fc4
kamwali
makhdar sara
#linux
#india
pubflirt
#india
#chat-world



Home  |  disclaimer  |  contact  |  submit quotes