Extbasic 10

From Kyle's Wiki
Jump to: navigation, search

This BATCH shell script is inherently insecure. Take a look at the first few lines:

SET INPUT=
SET /P INPUT=Insert password:
IF "%INPUT%"=="" "%~0"

What if our "INPUT" was "=="" ? Then the line would read:

IF ""=="" "=="" "%~0"

Confusing right? Well ""=="" is true, so lets tack on some extra stuff:
Lets try "=="" GOTO :END (Don't forget the extra space at the end of END)

IF ""=="" GOTO :END "=="" "%~0"

That part is cool! We get sent straigt to the end!:

Insert password:"=="" GOTO :END
The password value is 1
Access denied!

But we still are not getting through, well let us set the password to the number they are expecting then goto the end!

"=="" SET PASSWORDVALUE=1065435274 && GOTO :END 

Insert password:"=="" SET PASSWORDVALUE=1065435274 && GOTO :END 
You have been authenticated. Welcome aboard!

Yay!

A Factors Program

I forgot what this does:

#!/bin/bash
for EACH in `seq 1000 2000`
do 

NUMBER=`echo "(2 ^ 32 ) * $EACH + 1065435274" | bc`
FACTORS=`factor $NUMBER | cut -f 2 -d : `
NOF=`echo $FACTORS | tr " " "\n" | wc -l`
#echo "The number of FACTORS in $NUMBER is $NOF, WHICH ARE $FACTORS"
BAD=0
for EACH2 in `seq 1 $NOF`
do
	FACTOR=`echo $FACTORS | cut -f $EACH2 -d " "`
#	echo -n "$FACTOR "
	if [ $FACTOR -gt 101 ]; then
	BAD=1
	fi
done
if [ $BAD -eq 0 ]; then
echo "The number of FACTORS in $NUMBER is $NOF, WHICH ARE $FACTORS"
fi

done
Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta