-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Novoročenka a vánoční soutěž #7
Comments
Néééé, tři hodiny se s tím lámu... a ty @jechtom mi v cílové rovince zkazíš prvenství! :-D |
Máš samozřejmě pravdu. Nechceš někde zveřejnit kód, kterým jsi to prolomil, abych na něj mohl odkázat? |
@ridercz : Postup
KódŘešení zadání 1[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms");
$img = new-object System.Drawing.Bitmap "C:\aaa\20181222-zadani-1.png"
$r = ""
For ($i=0; $i -lt 60; $i++) {
For ($j=0; $j -lt 8; $j++) {
$b = 2 + [int]( $i * 8 ) + 7 - $j
$x=$b % 50
$y=[math]::floor($b / 50)
$c = $img.GetPixel(15+(30*$x), 15+(75*$y))
if($c.R -gt 100) { $r += "1" } else { $r += "0" }
}
$r+=" "
}
$r Řešení zadání 2[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms");
$img = new-object System.Drawing.Bitmap "c:\aaa\20181222-zadani-2.png"
$r = ""
For ($i=0; $i -lt 60; $i++) {
For ($j=0; $j -lt 8; $j++) {
$b = 2 + [int]( $i * 8 ) + 7 - $j
$x=$b % 30
$y=[math]::floor($b / 30)
$c = $img.GetPixel(25+(50*$x), 5+(15*$y))
if($c.R -gt 100) { $r += "0" } else { $r += "1" }
}
$r+=" "
}
$r Řešení zadání 3[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms");
$img = new-object System.Drawing.Bitmap "c:\aaa\20181222-zadani-3.png"
$r = ""
For ($i=0; $i -lt 300; $i++) {
For ($j=0; $j -lt 8; $j++) {
$b = 2 + [int]( $i * 8 ) + 7 - $j
$x=$b % 50
$y=[math]::floor($b / 50)
$c = $img.GetPixel((1*$x), (1*$y))
if($c.R -eq 255) { $r += "0" } else { $r += "1" }
}
$r+=" "
}
$r Ověření hashe$someString = "Against_stupidity_even_the_gods_themselves_contend_in_vain.Čerňoučký kůň vymýšlí ďábelské nápady.The_difference_between_science_and_the_fuzzy_subjects_is_that_science_requires_reasoning,_while_the_other_subjects_require_scholarship."
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = new-object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($someString)))
$hash |
Against_stupidity_even_the_gods_themselves_contend_in_vain.
Čerňoučký kůň vymýšlí ďábelské nápady.
The_difference_between_science_and_the_fuzzy_subjects_is_that_science_requires_reasoning,_while_the_other_subjects_require_scholarship.
The text was updated successfully, but these errors were encountered: