Javascript Problem

Learn the basics of how to exploit JavaScript.

Javascript Problem

Post by Critish on Mon Feb 11, 2013 8:51 am
([msg=73659]see Javascript Problem[/msg])

First of all let me appologize if im posting my question in the wrong thread. But since i couldn't start a new topic or find any relevant existing thread to post in this was my final option. So here's the problem: Ive installed Firefox since you guys recomended using that browser for brushing up on hacking skills, and it sure has alot of usefull plugins!

So i made it to lvl 6 on basic missions without much problem, but well there i found need of using javascript commands. only problem is that the browser wont give me any popup window. For example when typing in javascript:alert(document.cookie); nothing happens. Trying the same at Chrome gives me a popup. And ive turned of the popup blocker, so as you might understand this is quite irritating! :lol:

Any idea what the problem might be? :cry:
______________________________________________________________
Update: Yeah the problem still persists, but i managed to go around it. So now im just gonna crack lvl 11 :)
Level 10 though must have been one of the easiest yet :P had more trouble with 8, and 9 since im not familiar with SSI.

If anyone knows what the problem is though, i would not say no to some assitance, since i have a feeling im gonna have to have it later on :)
Critish
New User
New User
 
Posts: 1
Joined: Mon Feb 11, 2013 8:39 am
Blog: View Blog (0)


Re: #coffeesh0p

Post by -Ninjex- on Mon Feb 11, 2013 11:58 am
([msg=73661]see Re: #coffeesh0p[/msg])

Critish wrote:First of all let me appologize if im posting my question in the wrong thread. But since i couldn't start a new topic or find any relevant existing thread to post in this was my final option. So here's the problem: Ive installed Firefox since you guys recomended using that browser for brushing up on hacking skills, and it sure has alot of usefull plugins!

So i made it to lvl 6 on basic missions without much problem, but well there i found need of using javascript commands. only problem is that the browser wont give me any popup window. For example when typing in javascript:alert(document.cookie); nothing happens. Trying the same at Chrome gives me a popup. And ive turned of the popup blocker, so as you might understand this is quite irritating! :lol:

Any idea what the problem might be? :cry:
______________________________________________________________
Update: Yeah the problem still persists, but i managed to go around it. So now im just gonna crack lvl 11 :)
Level 10 though must have been one of the easiest yet :P had more trouble with 8, and 9 since im not familiar with SSI.

If anyone knows what the problem is though, i would not say no to some assitance, since i have a feeling im gonna have to have it later on :)


Google is a relevant place for issues like this. Web browser are starting to block the use of javascript injection via the URL for security now. However, you can use a plugin from Web Developer called scratch pad. You can also use firebug and create a html button on the website that performs the javascript code once clicked.
---------

Critish wrote:First of all let me appologize if im posting my question in the wrong thread. But since i couldn't start a new topic or find any relevant existing thread to post in this was my final option.


Meh, serio?
Also note, that it took me about 5 seconds to find this thread in a search

viewtopic.php?f=21&t=9380&p=70189&hilit=javascript+injection+working&sid=202d6bfb95361ae2d4fd5fa923ef78e7#p70189
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1353
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: Javascript Problem

Post by mShred on Mon Feb 11, 2013 5:22 pm
([msg=73670]see Re: Javascript Problem[/msg])

Sigh... created a new topic for this. You can create new threads. Just click the new topic button.
But the reason you won't get any results from trying a javascript injection is because FF disabled them through the URL. It'll still work in Chrome and I believe IE as well. But if you want to use FF, you'll probably have to use the console for it, or use an older, better version of FF. The thread Ninjex posted above can help you on that.
Just curious. Why would you think to post this question on a thread that couldn't be more off-topic? I just don't understand.. It says new topic.. I just, I don't understand..
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1745
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)


Re: Javascript Problem

Post by -Ninjex- on Mon Feb 11, 2013 5:58 pm
([msg=73671]see Re: Javascript Problem[/msg])

If you want an example as in how you can do such things with firebug...
This will show your cookies:

Code: Select all
<button onclick="myFunction()">Click Me!</button>

<script>
function myFunction()
{
alert(document.cookie);
}
</script>


Just add your own code you want the button to execute inside the function and add it inside the page anywhere. If you need to, you can pass parameters as usual.
Although, web developer is an easier option.
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1353
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: Javascript Problem

Post by fuchsteufel on Tue Feb 12, 2013 9:28 am
([msg=73697]see Re: Javascript Problem[/msg])

I figured out that firefox also blocks some javascripts from development console. It's possible to popup some cookies or stuff, but it rejected to inject a document.write. So, just use chromium to do so ;)
fuchsteufel
New User
New User
 
Posts: 12
Joined: Sat Feb 09, 2013 11:45 pm
Blog: View Blog (0)


Re: Javascript Problem

Post by -Ninjex- on Tue Feb 12, 2013 2:26 pm
([msg=73704]see Re: Javascript Problem[/msg])

fuchsteufel wrote:I figured out that firefox also blocks some javascripts from development console. It's possible to popup some cookies or stuff, but it rejected to inject a document.write. So, just use chromium to do so ;)


I can easily use both Web Developer > Scratchpad and the other method I mentioned to do what I need, and also document.write. You should perhaps check your code again, because it works perfectly:

.write
Code: Select all
javascript:alert(document.write="Whatever here!");


Change/view cookies
Code: Select all
javascript:void(document.cookie="Some cookie here");
javascript:alert(document.cookie);


Change forms
Code: Select all
javascript:void(document.forms[0].email.value="nobody@thisemail.com");
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1353
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: Javascript Problem

Post by limdis on Tue Feb 12, 2013 8:29 pm
([msg=73722]see Re: Javascript Problem[/msg])

Firefox: Ctrl+Shift+k
"The quieter you become, the more you are able to hear..."
"Drink all the booze, hack all the things."
User avatar
limdis
Moderator
Moderator
 
Posts: 1395
Joined: Mon Jun 28, 2010 5:45 pm
Blog: View Blog (0)



Return to Javascript

Who is online

Users browsing this forum: No registered users and 0 guests