[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

new challenge thread rolling

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 1

File: 1471685523823.png (549KB, 1920x1080px) Image search: [Google]
1471685523823.png
549KB, 1920x1080px
new challenge thread rolling
>>
>implying any of this is easy
>>
>>56181433
>>56181967
>>56181995
How about learning how to get a random number without rolling on 4chan first before you even think about trying any of that?
>>
OP here just finished 33 except instead of uploading it I just serv the file

package main 

import (
"crypto/aes"
"crypto/rand"
"flag"
"io/ioutil"
"log"
"net/http"
)

func main() {
var filename = flag.String("filename", "./test.txt", "The file you want to upload")
flag.Parse(
fileContent, err := ioutil.ReadFile(*filename)
if err != nil {
log.Println(err)
}

var encrypted = encrypt(fileContent, genKey())

ioutil.WriteFile("./serv/file.ecrypted", encrypted, 0644)

var ip string = "0.0.0.0"
var port string = "9450"

http.Handle("/serv/", http.StripPrefix("/serv/", http.FileServer(http.Dir("serv"))))

log.Println("Server started @ " + ip + ":" + port)
log.Println("file can be found at 0.0.0.0:9450/serv/")
log.Fatal(http.ListenAndServe(ip+":"+port, nil))
}

func genKey() []byte {
key := make([]byte, 32)
_, err := rand.Read(key)
if err != nil {
log.Println(err)
}
return key
}

func encrypt(file []byte, key []byte) []byte {
cipher, err := aes.NewCipher([]byte(key))
if err != nil {
log.Println(err)
}

if len(file) < cipher.BlockSize() {
var endLength = cipher.BlockSize() - len(file)
ending := make([]byte, endLength, endLength)
file = append(file[:], ending[:]...)
cipher.Encrypt(file, file)
} else {
var endLength = len(file) % cipher.BlockSize()
ending := make([]byte, endLength, endLength)
file = append(file[:], ending[:]...)
cipher.Encrypt(file, file)
}
return file
}

>>
>>56181995
>Can't code a password generator
>>
>>56182391
>someone posted a result
This is /g/, it's not permitted here. You had to do a logo about the project.
>>
>>56181433
rollerino
>>
>>56183228
>weebshit
dropped
reroll
>>
>>56181433
roll
>>
>>56181433
FizzBuzz please.

might be the only one I can do right now...
>>
>>56183294
Yea not a chance...

:/
>>
>>56181433
rolling
>>
rolle
>>
Gimme
>>
>>56181433
fuck you im rolling
>>
>>56184380
henry rollins
>>
>>56184380
>>56184407
these aren't medium difficulty just give me one of the games
>>
>>56181433
roll
>>
>>56181995
>ROT13
>highest prime factor calculator
can be quite sophisticated, but the challenge doesn't require that at all, a simple brute force solution is perfectly fine.
>fizzbuzz
>RPN calculator
ok, this one takes several hours
>text to hexadecimal binary
>ascii digital clock
>>
>>56182391
forgot paren on flag.Parse
Thread posts: 20
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.