| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<0> <0> (depending on how you plan on using the result, a ntohl() might be your friend) <0> :) <1> oh, before, didn't notice. you win <0> bah, and interex left without helping me with apex seals. :P <1> Is he gone? <0> <lnterex> gah n/m <0> * _popeye_/#linux exploits p3nguin <0> -:- SignOff lnterex: #linux (Quit: wo0pie) <1> the problem I had with the return for ResolveName is that he's not going to get what he wants. <1> He's expecting a dotted quad, but its an unsigned nt <2> im trying to run vmware-install.pl <2> on my desktop <0> if he does similar type munging, he can copy that unsigned int directly into the sockaddr struck. <0> struct <2> but i cant seem to find the file
<2> Ubuntu 5.10 <1> I could have _sworn_ there's something that pops out a char * dotted quad. <1> I can't find it for the life of me though <0> you can also munge it into a in_addr * I believe... <2> ? <1> My #$#% sockets book is in a box in my library. <1> I'm prepping for a move. <0> jblack: you could do something ugly, like printf("%x.%x.%x.%x", socketaddressunsignedlong);... <0> grr, won't work, forgot %x takes a long. <0> what's the one that takes a single byte but isn't %c? :) <1> I dunno. I can't find it. <1> that was the approach I was going to take <0> then just do printf("%d.%d.%d.%d", ((void *) addr)[0], etc); <1> I suppose you could cast a char, then cast it into an int <0> ((void *) &addr)[0] <0> should be the first byte of an integer... might want to use char*, actually. <0> (int)(((char *) &addr)[0]) if you want to make it look precise. :) <1> I'll screw with it tomorrow when I'm fresh. <1> Its 1:30 here and I'm tired. <1> the gplv3 stuff took a lot out of me. <0> heh, I haven't looked at that at all. <3> hi jblack. <0> thinking about how to design apex seals has made my brain hurt, though. heh. <1> AHA! <1> inet_ntoa(3) <0> ah yeah, that. :P <0> I remember that now... I also remember to ALWAYS wrap it in strdup(). :) <4> Is there a way to list the routing cache? This is using ip(7) <0> (it being one of those annoying functions that returns a pointer to a static buffer off in the library somewhere, that is frequently overwritten) <1> so now all I need is to turn h_addr_list into a in_addr <0> (struct in_addr *)foo->h_addr_list[0] <0> (struct in_addr *)(foo->h_addr_list[0]) <1> its that or bcopy <0> s/bcopy/memcpy :) <0> memcpy I think is faster and non-deprecated, unlike bcopy... <1> Nope, you can't do that. <1> You can't cast to a struct. :) <1> you have to memcpy <5> what are you guys trying to do <0> jblack: you didn't say what you were trying to do. :P <1> mulder: We're fixing up some crufty code that interex pulled out of the blue <0> inet_ntoa(*(struct in_addr *)(foo->h_addr_list[0])) should work... <6> lol <6> wish i could help but that **** looks PRo style <5> foo moza! <1> I may have unbalanced parens. <5> Nethic, that's just C language. <1> there we go. <6> i know <6> but its advanced kinda <5> it's not. <5> you could easily leran it <0> Mulder: nethic is still at the printf("Hello World\n"); stage. <6> ya man <6> werd to gthe hello world <5> randyg, ah. heh. <0> jblack was teaching him what character strings are earlier. :) <6> it qwas awsome <7> Good morning guys <5> quicker to learn from a book
<8> hi fed <7> Fed? <6> lol <1> http://pastebin.com/655079 <8> arguvp vf n srq <6> actualy Mulder i learnt more from jblack tongiht then anything i'v read from a book <8> woynpx vf zl ureb <5> Nethic, do you read often? <6> yes <0> my introduction to binary and WHY a char can be from 0 to 255 didn't help? :P <6> i dont get things thats all <8> v ybir woynpx ur vf zl vqby <1> randyg: Yeah. That doesn't curdle my blood quite so much. <6> and jblack spelt it out realy easily for me <8> spelt? <1> I don't care for the dereference of a cast, but that's really stdlib's fault. <8> nethic you bean! <6> yor a bean mofo <8> lol <1> pardon, not stdlib, but posix's concepts of sockets and such <0> jblack: ugh! horrible ugly style with the function return type on the line before the function name! :P <8> v ybir lbh lbh ybir zr jr'er n unccl snzvyl <1> randyg: Thats gnu style. <1> Its useful for doing greps for functions <0> repsac: fbeel, V'z fgenvtug. <8> lol <6> how would i make C use grep what functons would that involve, just asking for future infos <8> i didnt say you werent <1> nethic: grep in a different context, buddy. <6> oh ok <1> sometimes you have to search for where a function is defined. <0> just because it's gnu style doesn't make it ugly... I've always hated gnu style. heh. <8> randyg: v'z fgenvtug gbb ohg ngyrnfg lbh svtherq bhg jung v'z qbvat.. <6> oh so your greping the src? <9> Okay <9> I'm going to bed. <1> sometimes you have to <8> ni ni rob <0> I've hated people who coded gnu style since before gnu style existed. :P <6> gnight _popeye_ <9> ciao <7> bye <1> randyg: Then you're joining the wrong cabal. <0> repsac: it's really not strong encryption. <1> perhaps you'd be happier off in the bsd world. =) <8> nope but a lot of people dont know it by seeing it. <6> is there grep like functions in C ? <1> nethic: Yeah, there's a regex library <0> Nethic: man regex :) <6> oh kewl <6> :p <0> jblack: now if I were you I would have strdup'ed the inet_ntoa and made the caller free it, but that's just my coding style. <8> randyg: i've got one for ya <8> gimmie a minute <0> I really don't like p***ing around pointers to interal buffers that get overwritten when you're using the string somewhere else... <1> randyg: Yeah. Normally I'd do that. <0> internal <0> or make it take the destination string as an argument and strcpy to it. <1> I personally favor a prototype of func( char**) myself... <7> I need some help plz <0> though that raises the potention of overflows, especially when people are clever and allocate 16 bytes for an ipv4 address and go to resolve an ipv6 one... <0> potential <1> func (char **) ? <1> Not at all. <0> no, taking the destination buffer as an argument <0> letting the user allocate it before calling the function <1> Yeah. Thats evil. <1> returning a strdup is better, but gets you in memleak hell. <1> Thats why I prefer char ** <0> yeah, you'd have to have a char* var to store the return in then free it. <6> what does the ** mean <1> nethic: its a pointer to a pointer. <6> ok <6> addys again
Return to
#linux or Go to some related
logs:
salamn namaste + quotes
#kl perl -e fork while fork #php #india #allnitecafe angeleyes72 #allnitecafe #allnitecafe #kl
|
|