Advertisement
BugAR

asas

Jul 4th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.82 KB | None | 0 0
  1. use strict;
  2. use cgi; # no
  3. use Fcntl qw(:DEFAULT :flock); # no
  4. use MIME::Base64;
  5. use Digest::SHA qw(hmac_sha1);
  6. use Date::Parse;
  7. use DateTime;
  8. my $dt   = DateTime->now;
  9. my $date = $dt->ymd; # 'yyyy-mm-dd'
  10. my $time = $dt->hms; # 'hh:mm:ss'
  11. my $IDAdmin = "1337",
  12. my $Password = "1337",
  13. my $TimeStamp = str2time("$date, $time");
  14. print encode_base64(hmac_sha1("$IDAdmin:$Password:$TimeStamp", 'key'));
  15. ####################################
  16. # Output :-                        #
  17. # 8QkkN/WGRccHVK0Tlhbz03kTs/A=     #
  18. #                                  #
  19. # Decode With Key :-               #
  20. #                                  #
  21. # ·ّؤn|?م²jTk▼!1تKz&{            #
  22. #                                  #
  23. #              :(                  #
  24. #                                  #
  25. ####################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement