Waraxe IT Security Portal
Login or Register
April 19, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 73
Members: 0
Total: 73
Full disclosure
83 vulnerabilities in Vasion Print / PrinterLogic
[CVE-2025-32102, CVE-2025-32103] SSRF and Directory Traversal in CrushFTP 10.7.1 and 11.1.0 (as well as legacy 9.x)
Re: APPLE-SA-03-11-2025-2 iOS 18.3.2 and iPadOS 18.3.2
[KIS-2025-01] UNA CMS <= 14.0.0-RC4 (BxBaseMenuSetAclLevel.ph p) PHP Object Injection Vulnerability
OXAS-ADV-2025-0001: OX App Suite Security Advisory
APPLE-SA-04-01-2025-1 watchOS 11.4
APPLE-SA-03-31-2025-11 visionOS 2.4
APPLE-SA-03-31-2025-10 tvOS 18.4
APPLE-SA-03-31-2025-9 macOS Ventura 13.7.5
APPLE-SA-03-31-2025-8 macOS Sonoma 14.7.5
APPLE-SA-03-31-2025-7 macOS Sequoia 15.4
APPLE-SA-03-31-2025-6 iOS 15.8.4 and iPadOS 15.8.4
APPLE-SA-03-31-2025-5 iOS 16.7.11 and iPadOS 16.7.11
APPLE-SA-03-31-2025-4 iPadOS 17.7.6
APPLE-SA-03-31-2025-3 iOS 18.4 and iPadOS 18.4
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> General discussion -> Algorithms
Post new topicReply to topic View previous topic :: View next topic
Algorithms
PostPosted: Fri Sep 24, 2004 7:55 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




hi can anyone help me with this algorithm??

http://icecold42.port5.com/Algorithm%201.doc

_________________
View user's profile Send private message
PostPosted: Sat Sep 25, 2004 5:26 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




i have made this in javascript to try and help me solve it - but its not 100% working can u help me with it?

Code:
<script>
var size =3;
var start =1;
var step =1;
var row =1;
var col = (size + 1) / 2;
var count = 1;
var number = start;
while (count > size * size)
{
var ans=new Array("row","col");
ans = number;
number = number + step;
count = count + 1;
var newrow = row - 1;

if (newrow < 1)
{
newrow = size;
}
var newcol = col - 1;
if (newcol < 1)
{
newcol = size;
}
if (array(newrow,newcol) != array("",""))
{
newrow = row + 1;
newcol = col;
}
if (newrow > size)
{
newrow = 1;
}
row = newrow
col = newcol
document.write("newrow:" + newrow + "<br>");
document.write("newcol:" + newcol + "<br>");
document.write("ans[0] + ans[1]:" + ans[0] + ans[1] + "<br>");
document.write("ans[1] + ans[0]:" + ans[1] + ans[0] + "<br>");
document.write("ans[1] + ans[1]:" + ans[1] + ans[1] + "<br>");
}
document.write("size:" + size + "<br>");
document.write("start:" + start + "<br>");
document.write("step:" + step + "<br>");
document.write("row:" + row + "<br>");
document.write("col:" + col + "<br>");
document.write("count:" + count + "<br>");
document.write("number:" + number + "<br>");
</script>

_________________
View user's profile Send private message
PostPosted: Sun Sep 26, 2004 5:12 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




ok i finished it:

Code:
<html>
<title>Task 2 Algorithm</title>

<body>
<form name=value>
size: <input type="text" name="size" value="0" size=1 maxlength=1>
start: <input type="text" name="start" value="0" size=1 maxlength=1>
step: <input type="text" name="step" value="0" size=1 maxlength=1>
<input type="button" value="Submit" onclick="wholething()"/></form>


<script language=javascript>

function wholething()
{
size = parseInt(document.value.size.value);
start = parseInt(document.value.start.value);
step = parseInt(document.value.step.value);
populate(size,start,step)

}

function doHeadings()
{
var headings = new Array("Size","Start","Step","Row","Col","Count","Number","Array(1,1)","Array(1,2)","Array(1,3)","Array(2,1)","Array(2,2)","Array(2,3)","Array(3,1)","Array(3,2)","Array(3,3)","NewRow","NewCol");

for (i=0; i<headings.length; i++)
{

document.write("<td width=44><b>" + headings[i] + "</b></td>");
}
document.write("</tr>")

}

function createTable()
{
document.write("<table width=792 border=1 bordercolor=black CELLSPACING=0, CELLPADDING=1><tr>");
}


function closeTable()
{
document.write("</table><br><br>")
}

function createArray(first,second)
{
answer=new Array(first);

for (i=0; i <first ; i++)
{
answer[i]=new Array(second);
}
return answer;
}

function doResults()
{
document.write("<tr>");
document.write("<td align=center>" + size + "</td>");
document.write("<td align=center>" + start + "</td>");
document.write("<td align=center>" + step + "</td>");
document.write("<td align=center>" + row + "</td>");
document.write("<td align=center>" + col + "</td>");
document.write("<td align=center>" + count + "</td>");
document.write("<td align=center>" + number + "</td>")
document.write("<td align=center>" + Empty(answer[0][0]) + "</td>");
document.write("<td align=center>" + Empty(answer[0][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[0][2])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][0])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][2])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][0])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][2])+ "</td>");
document.write("<td align=center>" + newrow + "</td>");
document.write("<td align=center>" + newcol + "</td>");
document.write("</tr>");
}



function Empty(element)
{
if (element == undefined)
{
return "empty";
}
else return element;
}

function displayResults(results)
{
document.write("<table width=" + results.length * 80 + " border=1 bordercolor=black CELLSPACING=0, CELLPADDING=1><tr>");
document.write("<td width=44></td>");

for (i=0; i<results.length; i++)
{

document.write("<td width=80 align=center><b>" + (i+1) + "</b></td>");
}

document.write("</tr>");


for (i=0; i<results.length; i++)
{
document.write("<tr><td align=center><b>" + (i+1) + "</b></td>");

for (j=0; j<results.length; j++)
{
document.write("<td align=center>" + Empty(results[i][j]) + "</td>");
}
document.write("</tr>");
}
closeTable();
}


function populate(size,start,step)
{

row = 1;
col = (size + 1)/2;
count = 1;
number = start;
answer = createArray(size,size);
createTable();
doHeadings();
do
{
answer[row-1][col-1]=number;

number=number+step;

count++;

newrow = row-1;

if (newrow<1)
{
newrow = size;
}

newcol = col-1;

if (newcol<1)
{
newcol = size;
}


if (answer[newrow-1][newcol-1] != undefined)
{
newrow = row+1;
newcol = col;
if (newrow > size)
{
newrow=1;
}
}
row = newrow;
col = newcol;
doResults();

}
while (count <= Math.pow(size,2))

closeTable();
document.write("<br><br>")
displayResults(answer);
}




</script>

_________________
View user's profile Send private message
PostPosted: Fri Nov 12, 2004 1:01 am Reply with quote
OkIDaN
Regular user
Regular user
Joined: Nov 12, 2004
Posts: 6
Location: Azerbaijan




Heh, nice trilogy. Consider this post as the Null byte.
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
Algorithms
www.waraxe.us Forum Index -> General discussion
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



PCWizardHub - Helping you fix, build, and optimize your PC life
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.036 Seconds