Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 whois Report in Turing
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ecliptical




PostPosted: Thu Dec 22, 2005 3:09 am   Post subject: whois Report in Turing

code:


procedure whois (url : string)

    %put "Results for ", url

    var netStream : int
    var net_line : char
    netStream := Net.OpenURLConnection ("http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=" + url)
    if netStream <= 0 then
        put "Unable to connect to ", url, " on port 80"
        return
    end if
    var fileNo : int
    open : fileNo, "viewme.t", write
    var flag := false
    var x, y : int := 0
    put "Results for ", url
    loop

        exit when eof (netStream)
        get : netStream, net_line


        if net_line = "<" then

            flag := true
        elsif net_line = ">" then

            flag := false

        end if
        if not flag and net_line not= ">" and net_line not= "<" then


            color (green)
            put net_line ..

            write : fileNo, net_line
        else



        end if

    end loop

    Net.CloseConnection (netStream)
    close : fileNo
end whois

whois ("google.com")
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Thu Dec 22, 2005 4:45 pm   Post subject: (No subject)

Not bad, three things.

1.
code:
setscreen("text:max;max")

2. As the next step, try formatting/filtering the results to be more readable.
3. I take this oppurtunity to ask you and everyone else relevant, why so much freaking whitespace?!
ecliptical




PostPosted: Thu Dec 22, 2005 8:38 pm   Post subject: (No subject)

Thanks for the input...

2.Filtering the output:
Ya I might probably turn it into a class where you can call the different propertise of a domain.

whois.expire()
whois.owner()
whois.nameserver()

3. As for white space that's actually the "flagged out" html which I think actually makes for some decent (quick and dirty) results.
[Gandalf]




PostPosted: Thu Dec 22, 2005 8:40 pm   Post subject: (No subject)

ecliptical wrote:
3. As for white space that's actually the "flagged out" html which I think actually makes for some decent (quick and dirty) results.

I meant in the code.
ecliptical




PostPosted: Thu Dec 22, 2005 8:43 pm   Post subject: (No subject)

ohh ahha opps umm... i have other things in there that I was still testing out

    Download Progress Bar
    Clipping The MP3 ..etc



On a side note what is with this site dead links/downloads, don't work., no edit...etc ?
[Gandalf]




PostPosted: Thu Dec 22, 2005 8:59 pm   Post subject: (No subject)

Yeah, that has only been happening recently, this is probably worst yet. No uploads and downloads, can't view anything with syntax highlighting, etc. It's mostly because the site is in the process of being updated to a new version.

Editing was taken away so that newbies wouldn't clear their posts after getting help. If you wish to complain, do it here. Smile
ecliptical




PostPosted: Thu Dec 22, 2005 9:09 pm   Post subject: (No subject)

haha ... ahh im not much of a complainer just enjoyed the irony of a "compsci" website being so buggy...you'd there would be an ample supply of programmers to fix things =)
[Gandalf]




PostPosted: Thu Dec 22, 2005 9:14 pm   Post subject: (No subject)

Yes, well, it's mostly Hacker Dan and/or Tony working on things. It wouldn't be a very secure site if everyone had access to files to fix them, right? They are not always on, moving to a new version takes time and yes, there will be bugs and broken links Smile.

Although I'm not sure as to the nature of the attached files bug, since some work while most don't. There is even no error message.
Sponsor
Sponsor
Sponsor
sponsor
ecliptical




PostPosted: Thu Dec 22, 2005 10:25 pm   Post subject: (No subject)

Of course I didn't mean everyone should have access... but regardless it's a good site (it'll just be better once everything is working)
Unisyst




PostPosted: Fri Dec 23, 2005 6:09 am   Post subject: (No subject)

Instead of making a new topic I just want to make a quick question: Why doesnt the download links work for me? I get a 0kb empty file everytime, and I'd really like to check out the 3D engines for Turing.
[Gandalf]




PostPosted: Fri Dec 23, 2005 5:00 pm   Post subject: (No subject)

The site has been having some trouble recently, read the News. Hopefully it'll get fixed up sometime soon.
Taur




PostPosted: Sun Dec 25, 2005 4:30 pm   Post subject: (No subject)

I dun get wat this does Confused
[Gandalf]




PostPosted: Sun Dec 25, 2005 9:22 pm   Post subject: (No subject)

Let's say you have some site, blahjablahblah.com, well using something like this (or any whois lookup) you can almost always figure out where the owner lives, their phone number, etc. Now, what you do with that information is your responsibility and it's up to you not to abuse it.
md




PostPosted: Sun Dec 25, 2005 11:52 pm   Post subject: (No subject)

[Gandalf] wrote:
Let's say you have some site, blahjablahblah.com, well using something like this (or any whois lookup) you can almost always figure out where the owner lives, their phone number, etc. Now, what you do with that information is your responsibility and it's up to you not to abuse it.


In reality you *might* get their real information, you'll probably get fake information. Check out microsoft's whois info, it's almost never right, and many small site owners use fake information to avoid spam and junk mail (even I do, the only real thing on my whois is my name and an email address).
GhostCobra




PostPosted: Mon Jan 02, 2006 1:10 am   Post subject: (No subject)

Interesting, too bad Turing isn't the greatest, or for that matter, suitable "web browsers".

*edit* Scratch that, this won't work for gui.... *edit*
*edit edit* Nevermind, it is because he uses write for the file, instead of put! *edit edit*
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 15 Posts ]
Jump to:   


Style:  
Search: