$hahaha
L
L
lomerok2020-01-02 07:01:14
Perl
lomerok, 2020-01-02 07:01:14

How to remake the script so that the decryption is displayed on the screen?

How to remake the script so that the decryption is displayed on the screen:

#!/usr/bin/perl -l

$text = "2I7VjH)Q3RkPK*Sm3R!aY8!1P:5T6YL-`N4U5M,;xB#v1D%24U";
$hahaha = <>;
chop($hahaha);
@hahaha = split //,$hahaha;
for $i (0..length($text)-2){
    ($a,$b) = (substr($text,$i,1),substr($text,$i+1,1));
    if (ord($a) == (ord($b) ^ 97)){
        next if $a eq shift @hahaha;
        print "NOOO\n";
        exit;
    }
}
print "Congrats )\n";

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-01-02
@lomerok

if (ord($a) == (ord($b) ^ 97)){
    print $a;
}
# 7H3K3Y15L4MBD4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question