Top-Cat / ScrapBank.tf

The bots that work at scrapbank.tf
14 stars 11 forks source link

[Error] AccountLogonDenied #1

Closed DPr00f closed 11 years ago

DPr00f commented 11 years ago

Hi again Thomas, i resolved the issue with the JCE, now the problem is other. I always get AccountLogonDenied and steam send me a message from steamguard, although there's no input to insert the Key, what do i do?

Thanks in advance.

Top-Cat commented 11 years ago

Set one here https://github.com/Top-Cat/ScrapBank.tf/blob/master/src/main/java/uk/co/thomasc/scrapbanktf/Bot.java#L151

DPr00f commented 11 years ago

So i did this

if(callback.getResult() == EResult.AccountLogonDenied){
                                    Util.printConsole("This account is protected by Steam Guard.  Enter the authentication code sent to the proper email: ", Bot.this, ConsoleColor.DarkRed);
                                    try{
                                        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
                                        String s = bufferRead.readLine();
                                        logOnDetails.authCode(s);
                                    }
                                    catch(IOException e)
                                    {
                                            e.printStackTrace();
                                    }
                                }

                                if (callback.getResult() == EResult.InvalidLoginAuthCode)
                                {
                                    Util.printConsole("An Invalid Authorization Code was provided.  Enter the authentication code sent to the proper email: ", Bot.this, ConsoleColor.DarkRed);
                                    try{
                                        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
                                        String s = bufferRead.readLine();
                                        logOnDetails.authCode(s);
                                    }
                                    catch(IOException e)
                                    {
                                            e.printStackTrace();
                                    }
                                }

here https://github.com/Top-Cat/ScrapBank.tf/blob/master/src/main/java/uk/co/thomasc/scrapbanktf/Bot.java#L170

And sure enough, it asks me for the auth code. When i input it, nothing happens. I tried different combinations, such as steamClient.disconnect() steamClient.connect; and steamuser.logOff(); steamUser.logon(logOnDetails); but i never get a callback. although, if i stop the program, restart and manually inser the authcode he connects to the steam. Any help on how can i achieve the login with a simple input from the console? And how about saving a sentry file? I can't find a way to the callback that should manage that.

Top-Cat commented 11 years ago

That isn't a big enough excerpt to see what's wrong. If your code isn't on github, why?

DPr00f commented 11 years ago

Sorry dude, the reason why i didn't upload it is because i didn't change the code that much. None the less, i removed the mysql, cause i didn't have a copy of your database and i was lazy to search for the statements to reproduce it. And i tried to include the SteamGuard part. There you have it. https://github.com/DPr00f/SteamBot-Java

Top-Cat commented 11 years ago

Just put

steamClient.connect();

after

logOnDetails.authCode(s);
DPr00f commented 11 years ago

I did try that mate. All i got was, disconnected, trying to reconnect. I can't change te code now. But if you have a time try it yourself, you'll find out it does not work. At least for me. But thx for the replies mate.

Top-Cat commented 11 years ago

Well I have working bots... so...

DPr00f commented 11 years ago

Lol, ok mate, i'll give it a try. Thx

DPr00f commented 11 years ago

Resolved, steamClient.disconnect(); after the logOnDetails.authCode(s); does the trick, cause if i do connect, it'll disconnect, and the disconnect will connect again, so it will connect and disconnect() to the infinity and beyond... Thx again mate. Keep it up.