473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

javascript question

hello,

That script redirect to another site, but there is no <a href="... </a>
command
this code i have found in html source:

<SCRIPT language="JavaScript">
o =
'0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d ,0x20,0x27,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x74,0x72, 0x61,0x76,0x65,0x6c,0x77,0
x65,0x62,0x2e,0x70,0x6c,0x27,0x3b';
.................................. eval(js_code);
</SCRIPT>

What means these values? '0x6c,0x6f,0x63,0x61,0x74...., I am very
novice but i know that javascript is not server side. How to debug this
symbols and see the source of that code? Is that possible?

Thank for answers

Danny
Jul 23 '05 #1
6 2357
On Mon, 19 Jul 2004 09:40:35 +0200, Dany wrote:
0x6c


<http://www.physci.org/codes/char.jsp?char=0x6c>
[ The script is spelt out, letter by letter ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
"Dany" <ja******@poczta.fm> wrote:
hello,

That script redirect to another site, but there is no <a href="... </a>
command
this code i have found in html source:

<SCRIPT language="JavaScript">
o =
'0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3 d,0x20,0x27,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x74,0x72 ,0x61,0x76,0x65,0x6c,0x77,0
x65,0x62,0x2e,0x70,0x6c,0x27,0x3b';
.................................. eval(js_code);
</SCRIPT>

What means these values? '0x6c,0x6f,0x63,0x61,0x74...., I am very
novice but i know that javascript is not server side.
Javascript can be used for a number of purposes, including
server-side.
How to debug this
symbols and see the source of that code? Is that possible?


These scripts are pretty much a waste of time since they decode
themselves. There will either be a document.write or an eval that
calls document.write that writes the resulting script. Note: some
people add extra ones that are fake. I usually just add <textarea
rows="30" cols="80"> ... </textarea> around whatever it writes so the
source shows up in a textarea.

Regards,
Steve
Jul 23 '05 #3
so that script is server side? Am i right? And is it possible to decode
that
'0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d ,0x20,0x27,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x77, signs?

Regards
D.
Jul 23 '05 #4
Hey Dany,

Those are hex numbers. Numbers with base 16, instead of 10 like we're
used to. The 0x just means that they are hex numbers.

An example for getting the value of the hex number 0x6c. Remove the 0x.
The 6 is the most significant number, so we need to multiply that by 16.
6*16 = 96, then we have the C left, which is the least significant. We
need to add that to the 96. C in hex is 12. 96+12 = 108. So 6c is
decimal 108. This code is much used because one digit is exactly 4 bits,
so two digits is exactly one byte. Easy for programmers to use once
you understand it. The numbers we are used to are really exactly the
same build up as hex numbers, except thats its base 10.

Hex: 0x6C = 0x6*0x10 + 0xD (note that 0x10 != 10, but 0x10 = 16)
Dec: 63 = 6 * 10 + 3

Some good examples: 0x0 = 0, 0x10 = 16, 0x20 = 32, 0xff = 255 (familiar
numbers?)

the value js_code contains the code. Its probably derives from the hex
code in o. try alert(js_code) and you'll see the actual code. It seems
to be some kind of protection for hiding the URL.

Good luck,
Vincent

Dany wrote:
hello,

That script redirect to another site, but there is no <a href="... </a>
command
this code i have found in html source:

<SCRIPT language="JavaScript">
o =
'0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d ,0x20,0x27,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x74,0x72, 0x61,0x76,0x65,0x6c,0x77,0
x65,0x62,0x2e,0x70,0x6c,0x27,0x3b';
.................................. eval(js_code);
</SCRIPT>

What means these values? '0x6c,0x6f,0x63,0x61,0x74...., I am very
novice but i know that javascript is not server side. How to debug this
symbols and see the source of that code? Is that possible?

Thank for answers

Danny


Jul 23 '05 #5
Great thanks Friends!!!
:-)

Jul 23 '05 #6
Dany wrote:
so that script is server side? Am i right? And is it possible to decode
that
'0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d ,0x20,0x27,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x77, signs?


No, no, yes. Read on character encoding.
PointedEars
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.