Skip to content

Instantly share code, notes, and snippets.

View bes-internal's full-sized avatar
.

Vladimir Varlamov bes-internal

.
View GitHub Profile
@bes-internal
bes-internal / exim_native_srs_encode.pl
Created October 12, 2023 19:53
perl5 of exim srs_encode
# SUPPORT_SRS native exim 4.96
# doc: ${srs_encode {SECRET} {$from} {$aliastld}}
# shell$ exim -be '${srs_encode{SECRET}{localpart@example.tld}{my.tld}}'
# # exim -be '\SRS0=${l_4:${hmac{md5}{SECRET}{${lc:localpart@example.tld}}}}=${base32:${eval:$tod_epoch/86400&0x3ff}}=example.tld=localpart@my.tld'
my ($localpart, $domain) = split /\@/, $from;
require Digest::HMAC_MD5;
my $SECRET = 'SECRET';
my $HHHH = substr(Digest::HMAC_MD5::hmac_md5_hex(lc $from, $SECRET), 0, 4);
my $TT;
@bes-internal
bes-internal / patch_apk_for_sniffing.md
Created June 9, 2022 22:30 — forked from unoexperto/patch_apk_for_sniffing.md
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
#!/usr/bin/perl
use feature 'say';
print "Content-type: text/html; charset=UTF-8\n\n";
say "<!DOCTYPE html><style>body {white-space:nowrap;line-height:0} div {width:6px;height:6px;display:inline-block;} </style> ";
# open(F,'<:raw',"CASTLE.16"); # bits 0 4 res 320
open(F,'<:raw',"ENEMY.PIC"); # bits - res 96
# open(F,'<:raw',"ARMY4.PIC"); # bits - res 96
# open(F,'<:raw',"TITL.PIC"); # bit ? res ?
# open(F,'<:raw',"YOULOSE.PIC"); # bit ? res ?
$file=join "", <F>;
//detect
// v:3
function detect() {
try {
if (!(window.navigator.userAgent.search(/Chrome\//) > 0 && window.navigator.userAgent.search(/OPR|YaBrowser|Konqueror|Edge/) < 0)) {return 'notchrome'};
var results = {};
function test(name, fn) {
results[name] = fn();
// console.log(results);
// console.log(results[name] + '\t' + name);
sub gtextcleaner_start {
my $text=$_[0];
$text=~s/<z>(.*?)<z>/sub{ push @gtextcleanersave, $1; my $ret="<z>gtextcleanersave@{[ $savei || 0 ]}<z>"; $savei++; return $ret}->()/gsie;
return $text;
}
sub gtextcleaner_end {
my $text=$_[0];
Title: Perl 5.26 Unmasking Warning [affects all users]
To: gentoo-dev@lists.gentoo.org, gentoo-user@lists.gentoo.org
We're finally at a point where we're nearing the unmasking[1] of Perl 5.26 and making it visible to ~arch users, and a
"news item" on this matter will appear shortly.
Due to a collection of various problems faced in this version, extensive amounts of work has been needed to simply deliver
an ~arch release that isn't incredibly visibly broken[1][2]
Subsequently, this will require a lot of care from end users who use ~arch versions of Perl, specifically as
@bes-internal
bes-internal / gist:63e82299a6f609ff4577
Last active August 29, 2015 14:21
вставляем ссылку на страницу при копировании (no jquery)
<script defer>
function nsaddlink() {
//только для тех кто умеет копировать
if (typeof window.getSelection == "undefined") return;
var selection = window.getSelection(),
newdiv = document.createElement('div'),
newa = document.createElement('a');
//скрываем служебный блок и ссылку в скопированном тексте
@bes-internal
bes-internal / gist:8aa19d327f87e0105024
Created December 2, 2014 12:22
openssh 6.7 to 6.6 compatibility, to sshd_config
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc