38 skills found · Page 1 of 2
Piebald-AI / TweakccCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
geftimov / Android PatternviewPattern view for android.That one using lock or unlock.
VanHakobyan / DesignPatterns:key:Elements of Reusable Object-Oriented Software:unlock:is a software engineering book describing software design patterns. The book's authors are Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides with a foreword by Grady Booch.
alphamu / Android Widget ConnectpatternDraw a pattern to confirm the action, unlock the screen etc.
mattwilson1024 / Android Pattern UnlockUtility script to automate the swiping of a lockscreen pattern on an Android device via ADB.
CNTRUN / Termux Commandchar const* const commands[] = { "aapt", " aapt", " zipalign", "abduco", " abduco", "abook", " abook", "alpine", " alpine", " pico", " pilot", " rpdump", " rpload", "angband", " angband", "apache2", " ab", " apachectl", " apxs", " checkgid", " dbmmanage", " envvars-std", " fcgistarter", " htcacheclean", " htdbm", " htdigest", " htpasswd", " httpd", " httxt2dbm", " logresolve", " rotatelogs", " suexec", "apr-dev", " apr-1-config", "apr-util-dev", " apu-1-config", "apt", " apt", " apt-cache", " apt-config", " apt-get", " apt-key", " apt-mark", "aria2", " aria2c", "atomicparsley", " AtomicParsley", "attr", " attr", " getfattr", " setfattr", "autossh", " autossh", "bash", " bash", "bc", " bc", " dc", "binutils", " addr2line", " ar", " arm-linux-androideabi-ar", " arm-linux-androideabi-ld", " arm-linux-androideabi-nm", " arm-linux-androideabi-objdump", " arm-linux-androideabi-ranlib", " arm-linux-androideabi-readelf", " arm-linux-androideabi-strip", " as", " c++filt", " elfedit", " gprof", " ld", " ldd", " nm", " objcopy", " objdump", " ranlib", " readelf", " size", " strings", " strip", "bison", " bison", " yacc", "blogc", " blogc", " blogc-make", " blogc-runserver", "bmon", " bmon", "brogue", " brogue", "bs1770gain", " bs1770gain", "bsdtar", " bsdcat", " bsdcpio", " bsdtar", "busybox", " busybox", " env", "bvi", " bmore", " bvedit", " bvi", " bview", "bzip2", " bunzip2", " bzcat", " bzcmp", " bzdiff", " bzgrep", " bzip2", " bzip2recover", " bzless", " bzmore", "cadaver", " cadaver", "calcurse", " calcurse", " calcurse-caldav", " calcurse-upgrade", "cava", " cava", "cboard", " cboard", "ccache", " ccache", "ccrypt", " ccat", " ccdecrypt", " ccencrypt", " ccguess", " ccrypt", "cgdb", " cgdb", "clang", " arm-linux-androideabi-clang", " arm-linux-androideabi-clang++", " arm-linux-androideabi-cpp", " arm-linux-androideabi-g++", " arm-linux-androideabi-gcc", " c++", " cc", " clang", " clang++", " clang-5.0", " clang-cl", " clang-cpp", " clang-format", " clang-rename", " cpp", " g++", " gcc", "cmake", " cmake", " cpack", " ctest", "cmake-curses-gui", " ccmake", "cmark", " cmark", "cmatrix", " cmatrix", "cmus", " cmus", " cmus-remote", "coreutils", " [", " b2sum", " base32", " base64", " basename", " cat", " chcon", " chgrp", " chmod", " chown", " cksum", " comm", " coreutils", " cp", " csplit", " cut", " date", " dd", " dir", " dircolors", " dirname", " du", " echo", " expand", " expr", " factor", " false", " fmt", " fold", " groups", " head", " id", " install", " join", " kill", " link", " ln", " logname", " ls", " md5sum", " mkdir", " mkfifo", " mknod", " mktemp", " mv", " nice", " nl", " nohup", " nproc", " numfmt", " od", " paste", " pathchk", " pr", " printenv", " printf", " ptx", " pwd", " readlink", " realpath", " rm", " rmdir", " runcon", " seq", " sha1sum", " sha224sum", " sha256sum", " sha384sum", " sha512sum", " shred", " shuf", " sleep", " sort", " split", " stat", " stdbuf", " stty", " sum", " sync", " tac", " tail", " tee", " test", " timeout", " touch", " tr", " true", " truncate", " tsort", " tty", " uname", " unexpand", " uniq", " unlink", " vdir", " wc", " whoami", " yes", "corkscrew", " corkscrew", "cpio", " cpio", "cppi", " cppi", "cscope", " cscope", " ocs", "ctags", " ctags", " readtags", "curl", " curl", "curseofwar", " curseofwar", "cvs", " cvs", " rcs2log", "daemonize", " daemonize", "darkhttpd", " darkhttpd", "dash", " dash", " sh", "datamash", " datamash", "db", " db_archive", " db_checkpoint", " db_convert", " db_deadlock", " db_dump", " db_hotbackup", " db_load", " db_log_verify", " db_printlog", " db_recover", " db_replicate", " db_stat", " db_tuner", " db_upgrade", " db_verify", "dcraw", " dcraw", "ddrescue", " ddrescue", " ddrescuelog", "debianutils", " add-shell", " ischroot", " remove-shell", " run-parts", " savelog", " tempfile", " which", "dialog", " dialog", " whiptail", "diffutils", " cmp", " diff", " diff3", " sdiff", "direvent", " direvent", "dirmngr", " dirmngr", " dirmngr-client", "dnsutils", " dig", " host", " nslookup", " nsupdate", "dos2unix", " dos2unix", " mac2unix", " unix2dos", " unix2mac", "dpkg", " dpkg", " dpkg-deb", " dpkg-divert", " dpkg-genbuildinfo", " dpkg-query", " dpkg-split", " dpkg-trigger", "dropbear", " dbclient", " dropbear", " dropbearconvert", " dropbearkey", " dropbearmulti", "dvtm", " dvtm", " dvtm-status", "ed", " ed", " red", "elfutils", " eu-addr2line", " eu-elfcmp", " eu-elfcompress", " eu-elflint", " eu-findtextrel", " eu-make-debug-archive", " eu-nm", " eu-objdump", " eu-ranlib", " eu-readelf", " eu-size", " eu-stack", " eu-strings", " eu-strip", " eu-unstrip", "elinks", " elinks", "emacs", " ebrowse", " emacs", " emacs-25.3", " emacsclient", " etags", "erlang", " ct_run", " dialyzer", " epmd", " erl", " erlc", " escript", " run_erl", " to_erl", "espeak", " espeak", "expect", " autoexpect", " expect", " timed-read", " timed-run", " unbuffer", "fdupes", " fdupes", "ffmpeg", " ffmpeg", " ffprobe", "fftw-dev", " fftw-wisdom", " fftw-wisdom-to-conf", " fftwf-wisdom", " fftwl-wisdom", "figlet", " chkfont", " figlet", " figlist", " showfigfonts", "file", " file", "finch", " finch", "findutils", " find", " xargs", "fish", " column", " fish", " fish_indent", " fish_key_reader", "flac", " flac", " metaflac", "flex", " flex", " flex++", "fontconfig-utils", " fc-cache", " fc-cat", " fc-list", " fc-match", " fc-pattern", " fc-query", " fc-scan", " fc-validate", "fortune", " fortune", "fossil", " fossil", "freetype-dev", " freetype-config", "frobtads", " frob", " t3make", " tadsc", "frotz", " frotz", " zgames", "fsmon", " fsmon", "fwknop", " fwknop", "fzf", " fzf", " fzf-tmux", "gawk", " awk", " gawk", "gbt", " gbt", "gcal", " gcal", " gcal2txt", " tcal", " txt2gcal", "gdb", " gcore", " gdb", " gdbserver", "gdbm", " gdbm_dump", " gdbm_load", " gdbmtool", "gdk-pixbuf", " gdk-pixbuf-csource", " gdk-pixbuf-pixdata", " gdk-pixbuf-query-loaders", "gegl", " gcut", " gegl", " gegl-imgcmp", "getconf", " getconf", "gettext", " autopoint", " envsubst", " gettext", " gettext.sh", " gettextize", " msgattrib", " msgcat", " msgcmp", " msgcomm", " msgconv", " msgen", " msgexec", " msgfilter", " msgfmt", " msggrep", " msginit", " msgmerge", " msgunfmt", " msguniq", " ngettext", " recode-sr-latin", " xgettext", "ghostscript", " dvipdf", " eps2eps", " gs", " gsbj", " gsdj", " gsdj500", " gslj", " gslp", " gsnd", " lprsetup.sh", " pdf2dsc", " pdf2ps", " pf2afm", " pfbtopfa", " pphs", " printafm", " ps2ascii", " ps2epsi", " ps2pdf", " ps2pdf12", " ps2pdf13", " ps2pdf14", " ps2pdfwr", " ps2ps", " ps2ps2", " unix-lpr.sh", "gifsicle", " gifdiff", " gifsicle", "git", " git", " git-receive-pack", " git-upload-archive", " git-upload-pack", "glib-bin", " gapplication", " gdbus", " gio", " gio-querymodules", " glib-compile-resources", " glib-compile-schemas", " glib-genmarshal", " glib-mkenums", " gobject-query", " gresource", " gsettings", " gtester", "global", " global", " globash", " gozilla", " gtags", " gtags-cscope", " htags", " htags-server", "glulxe", " glulxe", "gmic", " gmic", "gnuchess", " gnuchess", "gnugo", " gnugo", "gnuit", " .gitaction", " gitaction", " gitdpkgname", " gitfm", " gitkeys", " gitmkdirs", " gitmount", " gitps", " gitregrep", " gitrfgrep", " gitrgrep", " gitunpack", " gitview", " gitwhich", " gitwipe", " gitxgrep", "gnupg", " gpg", " gpg-zip", " gpgsplit", "gnupg2", " addgnupghome", " applygnupgdefaults", " gpg-agent", " gpg-connect-agent", " gpg2", " gpgconf", " gpgparsemail", " gpgscm", " gpgsm", " gpgtar", " gpgv2", " kbxutil", " watchgnupg", "gnuplot", " gnuplot", "gnushogi", " gnushogi", "gnutls", " certtool", " gnutls-cli", " gnutls-cli-debug", " gnutls-serv", " ocsptool", " psktool", " srptool", "golang", " go", " gofmt", "gperf", " gperf", "gpgme", " gpgme-tool", "gpgme-dev", " gpgme-config", "gpgv", " gpgv", "gpsbabel", " gpsbabel", "graphicsmagick", " gm", "graphviz", " acyclic", " bcomps", " ccomps", " circo", " cluster", " diffimg", " dijkstra", " dot", " dot2gxl", " dot_builtins", " edgepaint", " fdp", " gc", " gml2gv", " graphml2gv", " gv2gml", " gv2gxl", " gvcolor", " gvgen", " gvmap", " gvmap.sh", " gvpack", " gvpr", " gxl2dot", " gxl2gv", " mm2gv", " neato", " nop", " osage", " patchwork", " prune", " sccmap", " sfdp", " tred", " twopi", " unflatten", "greed", " greed", "grep", " egrep", " fgrep", " grep", "gst-plugins-base", " gst-device-monitor-1.0", " gst-discoverer-1.0", " gst-play-1.0", "gstreamer", " gst-inspect-1.0", " gst-launch-1.0", " gst-stats-1.0", " gst-typefind-1.0", "gtypist", " gtypist", "gzip", " gunzip", " gzexe", " gzip", " uncompress", " zcat", " zcmp", " zdiff", " zegrep", " zfgrep", " zforce", " zgrep", " zless", " zmore", " znew", "harfbuzz-utils", " hb-ot-shape-closure", " hb-shape", " hb-view", "hashdeep", " hashdeep", " md5deep", " sha1deep", " sha256deep", " tigerdeep", " whirlpooldeep", "hexcurse", " hexcurse", "heyu", " heyu", "hfsutils", " hattrib", " hcd", " hcopy", " hdel", " hdir", " hformat", " hfsutil", " hls", " hmkdir", " hmount", " hpwd", " hrename", " hrmdir", " humount", " hvol", "htop", " htop", "httping", " httping", "hub", " hub", "hunspell", " affixcompress", " analyze", " chmorph", " hunspell", " hunzip", " hzip", " ispellaff2myspell", " makealias", " munch", " unmunch", " wordforms", " wordlist2hunspell", "hydra", " dpl4hydra.sh", " hydra", " hydra-wizard.sh", " pw-inspector", "icecast", " icecast", "iconv", " iconv", "icu-devtools", " derb", " escapesrc", " genbrk", " genccode", " gencfu", " gencmn", " gencnval", " gendict", " gennorm2", " genrb", " gensprep", " icu-config", " icuinfo", " icupkg", " makeconv", " pkgdata", " uconv", "imagemagick", " animate", " compare", " composite", " conjure", " convert", " display", " identify", " import", " magick", " magick-script", " mogrify", " montage", " stream", "imgflo", " imgflo", " imgflo-graphinfo", " imgflo-runtime", "inetutils", " dnsdomainname", " ftp", " logger", " telnet", " tftp", " whois", "inotify-tools", " inotifywait", " inotifywatch", "iperf3", " iperf3", "ired", " bdiff", " ired", " vired", "irssi", " irssi", "jhead", " jhead", "joe", " jmacs", " joe", " jpico", " jstar", " rjoe", "jq", " jq", "jupp", " jmacs", " joe", " jpico", " jstar", " jupp", " rjoe", "kona", " k", "krb5", " compile_et", " gss-client", " gss-server", " k5srvutil", " kadmin", " kadmin.local", " kadmind", " kdb5_util", " kdestroy", " kinit", " klist", " kpasswd", " kprop", " kpropd", " kproplog", " krb5-config", " krb5-send-pr", " krb5kdc", " ksu", " kswitch", " ktutil", " kvno", " sclient", " sim_client", " sim_server", " sserver", " uuclient", " uuserver", "ldc", " dub", " ldc-build-runtime", " ldc2", " ldmd2", " rdmd", "ldns-dev", " ldns-config", "ledger", " ledger", "leptonica", " convertfilestopdf", " convertfilestops", " convertformat", " convertsegfilestopdf", " convertsegfilestops", " converttopdf", " converttops", " fileinfo", " xtractprotos", "less", " less", " lessecho", " lesskey", "lftp", " lftp", " lftpget", "libassuan-dev", " libassuan-config", "libcaca", " caca-config", " cacaclock", " cacademo", " cacafire", " cacaplay", " cacaserver", " cacaview", " img2txt", "libcairo", " cairo-trace", "libcroco", " croco-0.6-config", " csslint-0.6", "libcurl-dev", " curl-config", "libgcrypt", " dumpsexp", " hmac256", " libgcrypt-config", " mpicalc", "libgd", " annotate", " bdftogd", " gd2copypal", " gd2togif", " gd2topng", " gdcmpgif", " gdlib-config", " gdparttopng", " gdtopng", " giftogd2", " pngtogd", " pngtogd2", " webpng", "libgpg-error", " gpg-error", " gpg-error-config", "libgrpc", " check_epollexclusive", " gen_hpack_tables", " gen_legal_metadata_characters", " gen_percent_encoding_tables", " grpc_cpp_plugin", " grpc_create_jwt", " grpc_csharp_plugin", " grpc_node_plugin", " grpc_objective_c_plugin", " grpc_php_plugin", " grpc_print_google_default_creds_token", " grpc_python_plugin", " grpc_ruby_plugin", " grpc_verify_jwt", "libjasper-utils", " imgcmp", " imginfo", " jasper", "libjpeg-turbo-progs", " cjpeg", " djpeg", " jpegtran", " rdjpgcom", " tjbench", " wrjpgcom", "libksba-dev", " ksba-config", "libnpth", " npth-config", "liboggz", " oggz", " oggz-chop", " oggz-codecs", " oggz-comment", " oggz-diff", " oggz-dump", " oggz-info", " oggz-known-codecs", " oggz-merge", " oggz-rip", " oggz-scan", " oggz-sort", " oggz-validate", "libotr", " otr_mackey", " otr_modify", " otr_parse", " otr_readforge", " otr_remac", " otr_sesskeys", "libpng-dev", " libpng-config", " libpng16-config", "librsvg", " rsvg-convert", "libtiff-utils", " fax2ps", " fax2tiff", " pal2rgb", " ppm2tiff", " raw2tiff", " tiff2bw", " tiff2pdf", " tiff2ps", " tiff2rgba", " tiffcmp", " tiffcp", " tiffcrop", " tiffdither", " tiffdump", " tiffinfo", " tiffmedian", " tiffset", " tiffsplit", "libtool", " libtool", " libtoolize", "libxapian-dev", " xapian-config", "libxml2-dev", " xml2-config", "libxml2-utils", " xmlcatalog", " xmllint", "libxslt-dev", " xslt-config", "libzmq", " curve_keygen", "lighttpd", " lighttpd", "littlecms-utils", " jpgicc", " linkicc", " psicc", " tificc", " transicc", "lld", " ld.lld", " lld", " lld-link", "llvm", " llc", " lli", " llvm-ar", " llvm-as", " llvm-bcanalyzer", " llvm-c-test", " llvm-cat", " llvm-config", " llvm-cov", " llvm-cvtres", " llvm-cxxdump", " llvm-cxxfilt", " llvm-diff", " llvm-dis", " llvm-dlltool", " llvm-dsymutil", " llvm-dwarfdump", " llvm-dwp", " llvm-extract", " llvm-lib", " llvm-link", " llvm-lto", " llvm-lto2", " llvm-mc", " llvm-mcmarkup", " llvm-modextract", " llvm-mt", " llvm-nm", " llvm-objdump", " llvm-opt-report", " llvm-pdbutil", " llvm-profdata", " llvm-ranlib", " llvm-readelf", " llvm-readobj", " llvm-rtdyld", " llvm-size", " llvm-split", " llvm-stress", " llvm-strings", " llvm-symbolizer", " llvm-xray", " obj2yaml", " opt", " verify-uselistorder", " yaml2obj", "ltrace", " ltrace", "lua", " lua", " luac", "lynx", " lynx", "lzip", " lzip", "lzop", " lzop", "m4", " m4", "macchanger", " macchanger", "make", " make", "man", " apropos", " demandoc", " makewhatis", " man", " mandoc", " soelim", " whatis", "mariadb", " aria_chk", " aria_dump_log", " aria_ftdump", " aria_pack", " aria_read_log", " innochecksum", " mariadb_config", " msql2mysql", " my_print_defaults", " myisam_ftdump", " myisamchk", " myisamlog", " myisampack", " mysql", " mysql_client_test", " mysql_config", " mysql_convert_table_format", " mysql_find_rows", " mysql_fix_extensions", " mysql_install_db", " mysql_plugin", " mysql_secure_installation", " mysql_setpermission", " mysql_tzinfo_to_sql", " mysql_upgrade", " mysql_waitpid", " mysqlaccess", " mysqladmin", " mysqlbinlog", " mysqlcheck", " mysqld", " mysqld_multi", " mysqld_safe", " mysqld_safe_helper", " mysqldump", " mysqldumpslow", " mysqlhotcopy", " mysqlimport", " mysqlshow", " mysqlslap", " mytop", " perror", " replace", " resolve_stack_dump", " resolveip", "mathomatic", " mathomatic", "mc", " mc", " mcdiff", " mcedit", " mcview", "megatools", " megacopy", " megadf", " megadl", " megaget", " megals", " megamkdir", " megaput", " megareg", " megarm", "memcached", " memcached", "micro", " micro", "minicom", " ascii-xfr", " minicom", " runscript", " xminicom", "mlocate", " locate", " updatedb", "moon-buggy", " moon-buggy", "moria", " moria", "mosh", " mosh", " mosh-client", " mosh-server", " mosh.pl", "mosquitto", " mosquitto", " mosquitto_passwd", " mosquitto_pub", " mosquitto_sub", "mp3splt", " mp3splt", "mpc", " mpc", "mpd", " mpd", "mpv", " mpv", "mtools", " amuFormat.sh", " lz", " mattrib", " mbadblocks", " mcat", " mcd", " mcheck", " mclasserase", " mcomp", " mcopy", " mdel", " mdeltree", " mdir", " mdu", " mformat", " minfo", " mkmanifest", " mlabel", " mmd", " mmount", " mmove", " mpartition", " mrd", " mren", " mshortname", " mshowfat", " mtools", " mtoolstest", " mtype", " mxtar", " mzip", " tgz", " uz", "multitail", " multitail", "mutt", " mutt", " pgpewrap", " pgpring", " smime_keys", "nano", " nano", "ncdc", " ncdc", "ncdu", " ncdu", "ncmpcpp", " ncmpcpp", "ncurses-dev", " ncursesw6-config", "ncurses-utils", " clear", " infocmp", " reset", " tabs", " tic", " toe", " tput", " tset", "ne", " ne", "neovim", " nvim", "net-tools", " arp", " ifconfig", " ipmaddr", " iptunnel", " mii-tool", " nameif", " netstat", " plipconfig", " rarp", " route", " slattach", "netcat", " nc", " ncat", " netcat", "netpbm", " 411toppm", " anytopnm", " asciitopgm", " atktopbm", " avstopam", " bioradtopgm", " bmptopnm", " bmptoppm", " brushtopbm", " cameratopam", " cistopbm", " cmuwmtopbm", " ddbugtopbm", " escp2topbm", " eyuvtoppm", " fiascotopnm", " fitstopnm", " fstopgm", " g3topbm", " gemtopbm", " gemtopnm", " giftopnm", " gouldtoppm", " hdifftopam", " hipstopgm", " hpcdtoppm", " icontopbm", " ilbmtoppm", " imgtoppm", " infotopam", " jbigtopnm", " jpeg2ktopam", " jpegtopnm", " leaftoppm", " lispmtopgm", " macptopbm", " manweb", " mdatopbm", " mgrtopbm", " mrftopbm", " mtvtoppm", " neotoppm", " netpbm-config", " palmtopnm", " pamaddnoise", " pamarith", " pambackground", " pambayer", " pamchannel", " pamcomp", " pamcrater", " pamcut", " pamdeinterlace", " pamdepth", " pamdice", " pamditherbw", " pamedge", " pamendian", " pamenlarge", " pamexec", " pamfile", " pamfix", " pamfixtrunc", " pamflip", " pamfunc", " pamgauss", " pamgradient", " pamlookup", " pammasksharpen", " pammixinterlace", " pammosaicknit", " pamoil", " pampaintspill", " pamperspective", " pampick", " pampop9", " pamrecolor", " pamrgbatopng", " pamrubber", " pamscale", " pamseq", " pamshadedrelief", " pamsharpmap", " pamsharpness", " pamsistoaglyph", " pamslice", " pamsplit", " pamstack", " pamstereogram", " pamstretch", " pamstretch-gen", " pamsumm", " pamsummcol", " pamtable", " pamthreshold", " pamtilt", " pamtoavs", " pamtodjvurle", " pamtofits", " pamtogif", " pamtohdiff", " pamtohtmltbl", " pamtojpeg2k", " pamtompfont", " pamtooctaveimg", " pamtopam", " pamtopdbimg", " pamtopfm", " pamtopng", " pamtopnm", " pamtosrf", " pamtosvg", " pamtotga", " pamtotiff", " pamtouil", " pamtowinicon", " pamtoxvmini", " pamundice", " pamunlookup", " pamvalidate", " pamwipeout", " pbmclean", " pbmlife", " pbmmake", " pbmmask", " pbmminkowski", " pbmpage", " pbmpscale", " pbmreduce", " pbmtext", " pbmtextps", " pbmto10x", " pbmto4425", " pbmtoascii", " pbmtoatk", " pbmtobbnbg", " pbmtocis", " pbmtocmuwm", " pbmtodjvurle", " pbmtoepsi", " pbmtoepson", " pbmtoescp2", " pbmtog3", " pbmtogem", " pbmtogo", " pbmtoibm23xx", " pbmtoicon", " pbmtolj", " pbmtoln03", " pbmtolps", " pbmtomacp", " pbmtomatrixorbital", " pbmtomda", " pbmtomgr", " pbmtomrf", " pbmtonokia", " pbmtopgm", " pbmtopi3", " pbmtopk", " pbmtoplot", " pbmtoppa", " pbmtopsg3", " pbmtoptx", " pbmtosunicon", " pbmtowbmp", " pbmtox10bm", " pbmtoxbm", " pbmtoybm", " pbmtozinc", " pbmupc", " pc1toppm", " pcdovtoppm", " pcxtoppm", " pdbimgtopam", " pfmtopam", " pgmabel", " pgmbentley", " pgmcrater", " pgmdeshadow", " pgmedge", " pgmenhance", " pgmhist", " pgmkernel", " pgmmake", " pgmmedian", " pgmminkowski", " pgmmorphconv", " pgmnoise", " pgmnorm", " pgmoil", " pgmramp", " pgmslice", " pgmtexture", " pgmtofs", " pgmtolispm", " pgmtopbm", " pgmtopgm", " pgmtoppm", " pgmtosbig", " pgmtost4", " pi1toppm", " pi3topbm", " picttoppm", " pjtoppm", " pktopbm", " pngtopam", " pngtopnm", " pnmalias", " pnmarith", " pnmcat", " pnmcolormap", " pnmcomp", " pnmconvol", " pnmcrop", " pnmcut", " pnmdepth", " pnmenlarge", " pnmfile", " pnmflip", " pnmgamma", " pnmhisteq", " pnmhistmap", " pnmindex", " pnminterp", " pnminvert", " pnmmargin", " pnmmercator", " pnmmontage", " pnmnlfilt", " pnmnoraw", " pnmnorm", " pnmpad", " pnmpaste", " pnmpsnr", " pnmquant", " pnmquantall", " pnmremap", " pnmrotate", " pnmscale", " pnmscalefixed", " pnmshear", " pnmsmooth", " pnmsplit", " pnmstitch", " pnmtile", " pnmtoddif", " pnmtofiasco", " pnmtofits", " pnmtojbig", " pnmtojpeg", " pnmtopalm", " pnmtopclxl", " pnmtoplainpnm", " pnmtopng", " pnmtopnm", " pnmtops", " pnmtorast", " pnmtorle", " pnmtosgi", " pnmtosir", " pnmtotiff", " pnmtotiffcmyk", " pnmtoxwd", " ppm3d", " ppmbrighten", " ppmchange", " ppmcie", " ppmcolormask", " ppmcolors", " ppmdcfont", " ppmddumpfont", " ppmdim", " ppmdist", " ppmdither", " ppmdmkfont", " ppmdraw", " ppmfade", " ppmflash", " ppmforge", " ppmglobe", " ppmhist", " ppmlabel", " ppmmake", " ppmmix", " ppmnorm", " ppmntsc", " ppmpat", " ppmquant", " ppmquantall", " ppmrainbow", " ppmrelief", " ppmrough", " ppmshadow", " ppmshift", " ppmspread", " ppmtoacad", " ppmtoapplevol", " ppmtoarbtxt", " ppmtoascii", " ppmtobmp", " ppmtoeyuv", " ppmtogif", " ppmtoicr", " ppmtoilbm", " ppmtojpeg", " ppmtoleaf", " ppmtolj", " ppmtomap", " ppmtomitsu", " ppmtompeg", " ppmtoneo", " ppmtopcx", " ppmtopgm", " ppmtopi1", " ppmtopict", " ppmtopj", " ppmtopjxl", " ppmtoppm", " ppmtopuzz", " ppmtorgb3", " ppmtosixel", " ppmtospu", " ppmtoterm", " ppmtotga", " ppmtouil", " ppmtowinicon", " ppmtoxpm", " ppmtoyuv", " ppmtoyuvsplit", " ppmtv", " ppmwheel", " psidtopgm", " pstopnm", " qrttoppm", " rasttopnm", " rawtopgm", " rawtoppm", " rgb3toppm", " rlatopam", " rletopnm", " sbigtopgm", " sgitopnm", " sirtopnm", " sldtoppm", " spctoppm", " spottopgm", " sputoppm", " srftopam", " st4topgm", " sunicontopnm", " svgtopam", " tgatoppm", " thinkjettopbm", " tifftopnm", " wbmptopbm", " winicontopam", " winicontoppm", " xbmtopbm", " ximtoppm", " xpmtoppm", " xvminitoppm", " xwdtopnm", " ybmtopbm", " yuvsplittoppm", " yuvtoppm", " yuy2topam", " zeisstopnm", "nettle", " nettle-hash", " nettle-lfib-stream", " nettle-pbkdf2", " pkcs1-conv", " sexp-conv", "newsboat", " newsboat", " podboat", "nginx", " nginx", "ninja", " ninja", "nmap", " nmap", " nping", "nodejs", " node", " npm", " npx", "nodejs-current", " node", " npm", " npx", "notmuch", " notmuch", "nyancat", " nyancat", "nzbget", " nzbget", "oathtool", " oathtool", " pskctool", "ocrad", " ocrad", "openjpeg-tools", " opj_compress", " opj_decompress", " opj_dump", "openssh", " scp", " sftp", " source-ssh-agent", " ssh", " ssh-add", " ssh-agent", " ssh-copy-id", " ssh-keygen", " ssh-keyscan", " ssha", " sshd", "openssl-tool", " openssl", "optipng", " optipng", "opus-tools", " opusdec", " opusenc", " opusinfo", "p7zip", " 7z", " 7za", " 7zr", "pango", " pango-view", "par2", " par2", " par2create", " par2repair", " par2verify", "patch", " patch", "patchelf", " patchelf", "pcre-dev", " pcre-config", "pcre2-dev", " pcre2-config", "perl", " corelist", " cpan", " enc2xs", " encguess", " h2ph", " h2xs", " instmodsh", " json_pp", " libnetcfg", " perl", " perlbug", " perldoc", " perlivp", " perlthanks", " piconv", " pl2pm", " pod2html", " pod2man", " pod2text", " pod2usage", " podchecker", " podselect", " prove", " ptar", " ptardiff", " ptargrep", " shasum", " splain", " xsubpp", " zipdetails", "pforth", " pforth", "php", " phar", " phar.phar", " php", " php-cgi", " php-config", " phpdbg", " phpize", "php-fpm", " php-fpm", "pick", " pick", "picolisp", " picolisp", " pil", "pinentry", " pinentry", " pinentry-curses", "pkg-config", " pkg-config", "play-audio", " play-audio", "pngquant", " pngquant", "poppler", " pdfdetach", " pdffonts", " pdfimages", " pdfinfo", " pdfseparate", " pdftocairo", " pdftohtml", " pdftoppm", " pdftops", " pdftotext", " pdfunite", "postgresql", " clusterdb", " createdb", " createuser", " dropdb", " dropuser", " initdb", " pg_archivecleanup", " pg_basebackup", " pg_config", " pg_controldata", " pg_ctl", " pg_dump", " pg_dumpall", " pg_isready", " pg_receivewal", " pg_recvlogical", " pg_resetwal", " pg_restore", " pg_rewind", " pg_test_fsync", " pg_test_timing", " pg_upgrade", " pg_waldump", " pgbench", " postgres", " postmaster", " psql", " reindexdb", " vacuumdb", "potrace", " mkbitmap", " potrace", "privoxy", " privoxy", "procps", " free", " pgrep", " pidof", " pkill", " pmap", " ps", " pwdx", " slabtop", " sysctl", " tload", " top", " uptime", " vmstat", " w", " watch", "profanity", " profanity", "proot", " proot", " termux-chroot", "protobuf", " protoc", "psmisc", " fuser", " killall", " peekfd", " prtstat", " pstree", "pulseaudio", " esdcompat", " pacat", " pacmd", " pactl", " pasuspender", " pulseaudio", "pure-ftpd", " pure-authd", " pure-ftpd", " pure-ftpwho", " pure-mrtginfo", " pure-pw", " pure-pwconvert", " pure-quotacheck", " pure-statsdecode", " pure-uploadscript", "pv", " pv", "pwgen", " pwgen", "python", " 2to3", " 2to3-3.6", " pydoc3", " pydoc3.6", " python", " python3", " python3-config", " python3.6", " python3.6-config", " python3.6m-config", " pyvenv", " pyvenv-3.6", "python2", " idle", " pydoc", " python-config", " python2", " python2-config", " python2.7", " python2.7-config", " smtpd.py", "qalc", " qalc", "qpdf", " fix-qdf", " qpdf", " zlib-flate", "radare2", " r2", " r2agent", " r2pm", " rabin2", " radare2", " radiff2", " rafind2", " ragg2", " ragg2-cc", " rahash2", " rarun2", " rasm2", " rax2", "ragel", " ragel", "rcs", " ci", " co", " ident", " merge", " rcs", " rcsclean", " rcsdiff", " rcsmerge", " rlog", "rdiff", " rdiff", "redir", " redir", "redis", " redis-benchmark", " redis-check-aof", " redis-check-rdb", " redis-cli", " redis-sentinel", " redis-server", "remind", " rem", " rem2ps", " remind", "rgbds", " rgbasm", " rgbfix", " rgbgfx", " rgblink", "rlwrap", " rlwrap", "rsync", " rsync", "rtmpdump", " rtmpdump", " rtmpgw", " rtmpsrv", " rtmpsuck", "ruby", " erb", " gem", " irb", " rake", " rdoc", " ruby", "screen", " screen", " screen-4.6.2", "scrypt", " scrypt", "sed", " sed", "sensible-utils", " select-editor", " sensible-browser", " sensible-editor", " sensible-pager", "sharutils", " shar", " unshar", " uudecode", " uuencode", "silversearcher-ag", " ag", "sl", " sl", "socat", " filan", " procan", " socat", "sox", " play", " rec", " sox", " soxi", "sqlite", " sqlite3", "squid", " purge", " squid", " squidclient", "sshpass", " sshpass", "sslscan", " sslscan", "stag", " stag", "strace", " strace", " strace-log-merge", "stunnel", " stunnel", "subversion", " svn", " svnadmin", " svnbench", " svndumpfilter", " svnfsfs", " svnlook", " svnmucc", " svnrdump", " svnserve", " svnsync", " svnversion", "syncthing", " syncthing", "tar", " tar", "tasksh", " tasksh", "taskwarrior", " task", "tcl", " sqlite3_analyzer", " tclsh", " tclsh8.6", "tcsh", " tcsh", "teckit", " sfconv", " teckit_compile", " txtconv", "termux-api", " termux-audio-info", " termux-battery-status", " termux-camera-info", " termux-camera-photo", " termux-clipboard-get", " termux-clipboard-set", " termux-contact-list", " termux-dialog", " termux-download", " termux-infrared-frequencies", " termux-infrared-transmit", " termux-location", " termux-media-scan", " termux-notification", " termux-notification-remove", " termux-share", " termux-sms-inbox", " termux-sms-send", " termux-storage-get", " termux-telephony-call", " termux-telephony-cellinfo", " termux-telephony-deviceinfo", " termux-toast", " termux-tts-engines", " termux-tts-speak", " termux-vibrate", " termux-wifi-connectioninfo", " termux-wifi-scaninfo", "termux-elf-cleaner", " termux-elf-cleaner", "teseq", " reseq", " teseq", "tesseract", " tesseract", "texinfo", " info", " install-info", " makeinfo", " pdftexi2dvi", " pod2texi", " texi2any", " texi2dvi", " texi2pdf", " texindex", "texlive-bin", " a2ping", " a5toa4", " adhocfilelist", " afm2afm", " afm2pl", " afm2tfm", " aleph", " allcm", " allec", " allneeded", " arara", " arlatex", " authorindex", " autoinst", " autosp", " bbl2bib", " bbox", " bg5+latex", " bg5+pdflatex", " bg5conv", " bg5latex", " bg5pdflatex", " bibdoiadd", " bibexport", " bibmradd", " bibtex", " bibtex8", " bibzbladd", " bundledoc", " cachepic", " cef5conv", " cef5latex", " cef5pdflatex", " cefconv", " ceflatex", " cefpdflatex", " cefsconv", " cefslatex", " cefspdflatex", " cfftot1", " checkcites", " checklistings", " chktex", " chkweb", " cjk-gs-integrate", " context", " contextjit", " convbkmk", " ctangle", " ctanify", " ctanupload", " ctie", " cweave", " de-macro", " depythontex", " detex", " devnag", " deweb", " diadia", " disdvi", " dosepsbin", " dt2dv", " dtxgen", " dv2dt", " dvi2fax", " dvi2tty", " dviasm", " dvicopy", " dvidvi", " dvigif", " dvihp", " dvilj", " dvilj2p", " dvilj4", " dvilj4l", " dvilj6", " dvipdfm", " dvipdfmx", " dvipdft", " dvipng", " dvipos", " dvips", " dvired", " dvitomp", " dvitype", " e2pall", " ebb", " ebong", " epspdf", " epspdftk", " epstopdf", " eptex", " euptex", " exceltex", " extconv", " extractbb", " fig4latex", " findhyph", " fmtutil", " fmtutil-sys", " fmtutil-user", " fontinst", " fragmaster", " gbklatex", " gbkpdflatex", " getmapdl", " gftodvi", " gftopk", " gftype", " gsftopk", " hbf2gf", " ht", " htcontext", " htlatex", " htmex", " httex", " httexi", " htxelatex", " htxetex", " inimf", " initex", " installfont-tl", " jamo-normalize", " kanji-config-updmap", " kanji-config-updmap-sys", " kanji-config-updmap-user", " kanji-fontmap-creator", " komkindex", " kpseaccess", " kpsepath", " kpsereadlink", " kpsestat", " kpsetool", " kpsewhere", " kpsewhich", " kpsexpand", " lacheck", " latex-git-log", " latex-papersize", " latex2man", " latex2nemeth", " latexdiff", " latexdiff-vc", " latexfileversion", " latexindent", " latexmk", " latexpand", " latexrevise", " lily-glyph-commands", " lily-image-commands", " lily-rebuild-pdfs", " listbib", " listings-ext.sh", " ltx2crossrefxml", " ltxfileinfo", " ltximg", " lua2dox_filter", " luaotfload-tool", " luatex", " luatools", " lwarpmk", " m-tx", " make4ht", " makedtx", " makeglossaries", " makeglossaries-lite", " makeindex", " match_parens", " mathspic", " mf", " mf-nowin", " mf2pt1", " mfplain", " mft", " mk4ht", " mkgrkindex", " mkindex", " mkjobtexmf", " mkocp", " mkofm", " mkpic", " mkt1font", " mktexfmt", " mktexlsr", " mktexmf", " mktexpk", " mktextfm", " mmafm", " mmpfb", " mpost", " mptopdf", " mtxrun", " mtxrunjit", " multibibliography", " musixflx", " musixtex", " odvicopy", " odvitype", " ofm2opl", " omfonts", " opl2ofm", " ot2kpx", " otangle", " otfinfo", " otftotfm", " otp2ocp", " outocp", " ovf2ovp", " ovp2ovf", " patgen", " pbibtex", " pdf180", " pdf270", " pdf90", " pdfannotextractor", " pdfatfi", " pdfbook", " pdfbook2", " pdfcrop", " pdfflip", " pdfjam", " pdfjam-pocketmod", " pdfjam-slides3up", " pdfjam-slides6up", " pdfjoin", " pdflatexpicscale", " pdfnup", " pdfpun", " pdftex", " pdftosrc", " pdfxup", " pdvitomp", " pdvitype", " pedigree", " perltex", " pfarrei", " pkfix", " pkfix-helper", " pktogf", " pktype", " pltotf", " pmpost", " pmxchords", " pn2pdf", " pooltype", " ppltotf", " prepmx", " ps2eps", " ps2frag", " ps4pdf", " pslatex", " pst2pdf", " ptex", " ptex2pdf", " ptftopl", " purifyeps", " pygmentex", " pythontex", " repstopdf", " rpdfcrop", " rubibtex", " rubikrotation", " rumakeindex", " rungs", " simpdftex", " sjisconv", " sjislatex", " sjispdflatex", " splitindex", " srcredact", " sty2dtx", " svn-multi", " synctex", " t1dotlessj", " t1lint", " t1rawafm", " t1reencode", " t1testpage", " t4ht", " tangle", " tex", " tex4ebook", " tex4ht", " texconfig", " texconfig-dialog", " texconfig-sys", " texcount", " texdef", " texdiff", " texdirflatten", " texdoc", " texdoctk", " texexec", " texfot", " texhash", " texlinks", " texliveonfly", " texloganalyser", " texlua", " texluac", " texmfstart", " texosquery", " texosquery-jre5", " texosquery-jre8", " tftopl", " thumbpdf", " tie", " tlmgr", " tlmgr.ln", " tpic2pdftex", " ttf2afm", " ttf2kotexfont", " ttf2pk", " ttf2tfm", " ttftotype42", " typeoutfileinfo", " ulqda", " upbibtex", " updmap", " updmap-sys", " updmap-user", " updvitomp", " updvitype", " upmendex", " upmpost", " uppltotf", " uptex", " uptftopl", " urlbst", " vftovp", " vlna", " vpe", " vpl2ovp", " vpl2vpl", " vptovf", " weave", " wofm2opl", " wopl2ofm", " wovf2ovp", " wovp2ovf", " xdvipdfmx", " xetex", " xhlatex", " yplan", "tig", " tig", "timewarrior", " timew", "tintin++", " tt++", "tinyscheme", " tinyscheme", "tmate", " tmate", "tmux", " tmux", "toilet", " toilet", "tor", " tor", " tor-gencert", " tor-resolve", " torify", "torsocks", " torsocks", "tracepath", " tracepath", " traceroute", "transmission", " transmission-create", " transmission-daemon", " transmission-edit", " transmission-remote", " transmission-show", "tree", " tree", "tsocks", " tsocks", "tty-clock", " tty-clock", "tty-solitaire", " ttysolitaire", "ttyrec", " ttyplay", " ttyrec", " ttytime", "units", " units", " units_cur", "unrar", " unrar", "unzip", " funzip", " unzip", " unzipsfx", " zipgrep", " zipinfo", "utfdecode", " utfdecode", "util-linux", " addpart", " blkdiscard", " blkid", " blkzone", " blockdev", " cal", " chcpu", " chrt", " col", " colcrt", " colrm", " ctrlaltdel", " delpart", " dmesg", " fallocate", " fdformat", " fincore", " findfs", " flock", " fsck.cramfs", " fsck.minix", " fsfreeze", " getopt", " hexdump", " hwclock", " ionice", " isosize", " ldattach", " linux32", " linux64", " look", " losetup", " lscpu", " lsipc", " lsns", " mcookie", " mesg", " mkfs", " mkfs.bfs", " mkfs.cramfs", " mkfs.minix", " mkswap", " more", " namei", " nologin", " nsenter", " partx", " prlimit", " raw", " readprofile", " rename", " renice", " resizepart", " rev", " rtcwake", " script", " scriptreplay", " setarch", " setsid", " setterm", " swaplabel", " taskset", " ul", " uname26", " unshare", " wdctl", " whereis", " wipefs", " zramctl", "valac", " vala", " vala-0.38", " vala-gen-introspect", " vala-gen-introspect-0.38", " valac", " valac-0.38", " vapicheck", " vapicheck-0.38", " vapigen", " vapigen-0.38", "valadoc", " valadoc", " valadoc-0.38", "valgrind", " callgrind_annotate", " callgrind_control", " cg_annotate", " cg_diff", " cg_merge", " ms_print", " valgrind", " valgrind-di-server", " valgrind-listener", " vgdb", "vifm", " vifm", " vifm-convert-dircolors", " vifm-pause", " vifm-screen-split", "vim", " vi", " view", " vim", " vimdiff", " vimtutor", " xxd", "vim-python", " vi", " view", " vim", " vimdiff", " vimtutor", " xxd", "vorbis-tools", " oggdec", " oggenc", " ogginfo", " vcut", " vorbiscomment", "vttest", " vttest", "vtutils", " vtquery", " vtshowkeys", " vtsize", " vttitle", "w3m", " w3m", " w3mman", "wcalc", " wcalc", "weechat", " weechat", "wget", " wget", "wol", " wol", " wol-bootptab", " wol-dhcpdconf", "x264", " x264", "x265", " x265", "xapian-tools", " copydatabase", " quest", " simpleexpand", " simpleindex", " simplesearch", " xapian-check", " xapian-compact", " xapian-delve", " xapian-metadata", " xapian-progsrv", " xapian-replicate", " xapian-replicate-server", " xapian-tcpsrv", "xmlsec", " xmlsec1", " xmlsec1-config", "xmlstarlet", " xml", "xorriso", " osirrox", " xorrecord", " xorriso", " xorriso-tcltk", " xorrisofs", "xsltproc", " xsltproc", "xz-utils", " lzcat", " lzcmp", " lzdiff", " lzegrep", " lzfgrep", " lzgrep", " lzless", " lzma", " lzmadec", " lzmainfo", " lzmore", " unlzma", " unxz", " xz", " xzcat", " xzcmp", " xzdec", " xzdiff", " xzegrep", " xzfgrep", " xzgrep", " xzless", " xzmore", "yasm", " vsyasm", " yasm", " ytasm", "zbar", " zbarimg", "zile", " zile", "zip", " zip", " zipcloak", " zipnote", " zipsplit", "zsh", " zsh", "zstd", " unzstd", " zstd", " zstdcat", " zstdgrep", " zstdless", " zstdmt", "ack-grep", " ack", "apksigner", " apksigner", "asciinema", " asciinema", "autoconf", " autoconf", " autoheader", " autom4te", " autoreconf", " autoscan", " autoupdate", " ifnames", "automake", " aclocal", " aclocal-1.15", " automake", " automake-1.15", "byobu", " byobu", " byobu-config", " byobu-ctrl-a", " byobu-disable", " byobu-disable-prompt", " byobu-enable", " byobu-enable-prompt", " byobu-export", " byobu-janitor", " byobu-keybindings", " byobu-launch", " byobu-launcher", " byobu-launcher-install", " byobu-launcher-uninstall", " byobu-layout", " byobu-prompt", " byobu-quiet", " byobu-reconnect-sockets", " byobu-screen", " byobu-select-backend", " byobu-select-profile", " byobu-select-session", " byobu-shell", " byobu-silent", " byobu-status", " byobu-status-detail", " byobu-tmux", " byobu-ugraph", " byobu-ulevel", " col1", " ctail", " manifest", " purge-old-kernels", " vigpg", " wifi-status", "colordiff", " colordiff", "cowsay", " cowsay", "debootstrap", " debootstrap", "dx", " dx", "ecj", " ecj", "getmail", " getmail", " getmail_fetch", " getmail_maildir", " getmail_mbox", "luarocks", " luarocks", " luarocks-5.3", " luarocks-admin", " luarocks-admin-5.3", "neofetch", " neofetch", "parallel", " env_parallel", " env_parallel.ash", " env_parallel.bash", " env_parallel.csh", " env_parallel.dash", " env_parallel.fish", " env_parallel.ksh", " env_parallel.pdksh", " env_parallel.sh", " env_parallel.tcsh", " env_parallel.zsh", " niceload", " parallel", " parcat", " sem", " sql", "pass", " pass", "pastebinit", " pastebinit", "pathpicker", " fpp", "ranger", " ranger", " rifle", "ruby-ri", " ri", "screenfetch", " screenfetch", "stow", " chkstow", " stow", "termux-am", " am", "termux-apt-repo", " termux-apt-repo", "termux-create-package", " termux-create-package", "termux-tools", " chsh", " dalvikvm", " df", " getprop", " ip", " logcat", " login", " ping", " ping6", " pkg", " pm", " settings", " su", " termux-fix-shebang", " termux-info", " termux-open", " termux-open-url", " termux-reload-settings", " termux-setup-storage", " termux-wake-lock", " termux-wake-unlock", " xdg-open", "tsu", " tsu", "vcsh", " vcsh", "yarn", " yarn", }; Desktop version Sign out
kamilsk / Semaphore🚦 Semaphore pattern implementation with timeout of lock/unlock operations.
elmsec / Lockigest🔐 Lockigest – Why would you have to enter a password to unlock your screen countless times a day? Lockigest is a simple idea that solves this. It will lock your screen only if a predefined pattern is not followed within a certain time.
abhir98 / RansomwareProject Summary This project was developed for the Computer Security course at my academic degree. Basically, it will encrypt your files in background using AES-256-CTR, a strong encryption algorithm, using RSA-4096 to secure the exchange with the server, optionally using the Tor SOCKS5 Proxy. The base functionality is what you see in the famous ransomware Cryptolocker. The project is composed by three parts, the server, the malware and the unlocker. The server store the victim's identification key along with the encryption key used by the malware. The malware encrypt with a RSA-4096 (RSA-OAEP-4096 + SHA256) public key any payload before send then to the server. This approach with the optional Tor Proxy and a .onion domain allow you to hide almost completely your server. Features Run in Background (or not) Encrypt files using AES-256-CTR(Counter Mode) with random IV for each file. Multithreaded. RSA-4096 to secure the client/server communication. Includes an Unlocker. Optional TOR Proxy support. Use an AES CTR Cypher with stream encryption to avoid load an entire file into memory. Walk all drives by default. Docker image for compilation. Building the binaries DON'T RUN ransomware.exe IN YOUR PERSONAL MACHINE, EXECUTE ONLY IN A TEST ENVIRONMENT! I'm not resposible if you acidentally encrypt all of your disks! First of all download the project outside your $GOPATH: git clone github.com/mauri870/ransomware cd ransomware If you have Docker skip to the next section. You need Go at least 1.11.2 with the $GOPATH/bin in your $PATH and $GOROOT pointing to your Go installation folder. For me: export GOPATH=~/gopath export PATH=$PATH:$GOPATH/bin export GOROOT=/usr/local/go Build the project require a lot of steps, like the RSA key generation, build three binaries, embed manifest files, so, let's leave make do your job: make deps make You can build the server for windows with make -e GOOS=windows. Docker ./build-docker.sh make Config Parameters You can change some of the configs during compilation. Instead of run only make, you can use the following variables: HIDDEN='-H windowsgui' # optional. If present the malware will run in background USE_TOR=true # optional. If present the malware will download the Tor proxy and use it to contact the server SERVER_HOST=mydomain.com # the domain used to connect to your server. localhost, 0.0.0.0, 127.0.0.1 works too if you run the server on the same machine as the malware SERVER_PORT=8080 # the server port, if using a domain you can set this to 80 GOOS=linux # the target os to compile the server. Eg: darwin, linux, windows Example: make -e USE_TOR=true SERVER_HOST=mydomain.com SERVER_PORT=80 GOOS=darwin The SERVER_ variables above only apply to the malware. The server has a flag --port that you can use to change the port that it will listen on. DON'T RUN ransomware.exe IN YOUR PERSONAL MACHINE, EXECUTE ONLY IN A TEST ENVIRONMENT! I'm not resposible if you acidentally encrypt all of your disks! Step by Step Demo and How it Works For this demo I'll use two machines, my personal linux machine and a windows 10 VM. For the sake of simplicity, I have a folder mapped to the VM, so I can compile from my linux and copy to the vm. In this demo we will use the Ngrok tool, this will allow us to expose our server using a domain, but you can use your own domain or ip address if you want. We are also going to enable the Tor transport, so .onion domains will work without problems. First of all lets start our external domain: ngrok http 8080 This command will give us a url like http://2af7161c.ngrok.io. Keep this command running otherwise the malware won't reach our server. Let's compile the binaries (remember to replace the domain): make -e SERVER_HOST=2af7161c.ngrok.io SERVER_PORT=80 USE_TOR=true The SERVER_PORT needs to be 80 in this case, since ngrok redirects 2af7161c.ngrok.io:80 to your local server port 8080. After build, a binary called ransomware.exe, and unlocker.exe along with a folder called server will be generated in the bin folder. The execution of ransomware.exe and unlocker.exe (even if you use a diferent GOOS variable during compilation) is locked to windows machines only. Enter the server directory from another terminal and start it: cd bin/server && ./server --port 8080 To make sure that all is working correctly, make a http request to http://2af7161c.ngrok.io: curl http://2af7161c.ngrok.io If you see a OK and some logs in the server output you are ready to go. Now move the ransomware.exe and unlocker.exe to the VM along with some dummy files to test the malware. You can take a look at cmd/common.go to see some configuration options like file extensions to match, directories to scan, skipped folders, max size to match a file among others. Then simply run the ransomware.exe and see the magic happens 😄. The window that you see can be hidden using the HIDDEN option described in the compilation section. After download, extract and start the Tor proxy, the malware waits until the tor bootstrapping is done and then proceed with the key exchange with the server. The client/server handshake takes place and the client payload, encrypted with an RSA-4096 public key must be correctly decrypted on the server. The victim identification and encryption keys are stored in a Golang embedded database called BoltDB (it also persists on disk). When completed we get into the find, match and encrypt phase, up to N-cores workers start to encrypt files matched by the patterns defined. This proccess is really quick and in seconds all of your files will be gone. The encryption key exchanged with the server was used to encrypt all of your files. Each file has a random primitive called IV, generated individually and saved as the first 16 bytes of the encrypted content. The algorithm used is AES-256-CTR, a good AES cypher with streaming mode of operation such that the file size is left intact. The only two sources of information available about what just happen are the READ_TO_DECRYPT.html and FILES_ENCRYPTED.html in the Desktop. In theory, to decrypt your files you need to send an amount of BTC to the attacker's wallet, followed by a contact sending your ID(located on the file created on desktop). If the attacker can confirm your payment it will possibly(or maybe not) return your encryption key and the unlocker.exe and you can use then to recover your files. This exchange can be accomplished in several ways and WILL NOT be implemented in this project for obvious reasons. Let's suppose you get your encryption key back. To recover the correct key point to the following url: curl -k http://2af7161c.ngrok.io/api/keys/:id Where :id is your identification stored in the file on desktop. After, run the unlocker.exe by double click and follow the instructions. That's it, got your files back 😄 The server has only two endpoints: POST api/keys/add - Used by the malware to persist new keys. Some verifications are made, like the verification of the RSA autenticity. Returns 204 (empty content) in case of success or a json error. GET api/keys/:id - Id is a 32 characters parameter, representing an Id already persisted. Returns a json containing the encryption key or a json error The end As you can see, building a functional ransomware, with some of the best existing algorithms is not difficult, anyone with some programming skills can build that in any programming language.
KieronCraggs / GestureCrackFinds Android pattern unlock codes from a gesture.key file
panespanes / ShapeLockerPATTERN LOCK, unlock using gestures
e-t-l / GrapheneUXYou own your phone. You should be able to use it. GrapheneOS is the most secure Android OS, but hardening comes at the cost of usability. This repo contains tricks to reimplement some user-friendlier AOSP features, so the risk-benefit decision can be made by 𝘺𝘰𝘶, the user, instead of by the OS developers.
Devtown-India / HandsOn Data Analysis And MLOver the past decade, bicycle-sharing systems have been growing in number and popularity in cities across the world. Bicycle-sharing systems allow users to rent bicycles on a very short-term basis for a price. This allows people to borrow a bike from point A and return it at point B, though they can also return it to the same location if they'd like to just go for a ride. Regardless, each bike can serve several users per day. Thanks to the rise in information technologies, it is easy for a user of the system to access a dock within the system to unlock or return bicycles. These technologies also provide a wealth of data that can be used to explore how these bike-sharing systems are used. In this project, you will use data provided by Motivate, a bike share system provider for many major cities in the United States, to uncover bike share usage patterns. You will compare the system usage between three large cities: Chicago, New York City, and Washington, DC. Day:1 In this project, Students will make use of Python to explore data related to bike share systems for three major cities in the United States—Chicago, New York City, and Washington. You will write code to import the data and answer interesting questions about it by computing descriptive statistics. They will also write a script that takes in raw input to create an interactive experience in the terminal to present these statistics. Technologies that will be covered are Numpy, Pandas, Matplotlib, Seaborn, Jupyter notebook. We will be giving the students a deep dive into the Data Analytical process Day:2 We will be giving the students an insight into one of the major fields of Machine Learning ie. Time Series forcasting we will be taking them through the relevant theory and make them understand of the importance and different techniques that are available to deal with it. After that we will be working hands on the bike share data set implementing different algorithms and understanding them to the core We aim to provide students an insight into what exactly is the job of a data analyst and get them familiarise to how does the entire data analysis process work. The session will be hosted by Shaurya Sinha a data analyst at Jio and Parag Mittal Software engineer at Microsoft.
vamshi4001 / Android Unlock 4 WebAndroid unlock pattern made for web using oure javascript
BabyFlokiCoin / Baby Floki Coin/** *Submitted for verification at BscScan.com on 2021-03-01 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** #BEE #LIQ+#RFI+#SHIB+#DOGE = #BEE #SAFEMOON features: 3% fee auto add to the liquidity pool to locked forever when selling 2% fee auto distribute to all holders I created a black hole so #Bee token will deflate itself in supply with every transaction 50% Supply is burned at start. */ pragma solidity ^0.6.12; // SPDX-License-Identifier: Unlicensed interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; } } // pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract SafeMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "SafeMoon"; string private _symbol = "SAFEMOON"; uint8 private _decimals = 9; uint256 public _taxFee = 5; uint256 private _previousTaxFee = _taxFee; uint256 public _liquidityFee = 5; uint256 private _previousLiquidityFee = _liquidityFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**6 * 10**9; uint256 private numTokensSellToAddToLiquidity = 500000 * 10**6 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F); // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner() { // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.'); require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function setTaxFeePercent(uint256 taxFee) external onlyOwner() { _taxFee = taxFee; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { _liquidityFee = liquidityFee; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _tTotal.mul(maxTxPercent).div( 10**2 ); } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { uint256 tFee = calculateTaxFee(tAmount); uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div( 10**2 ); } function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_liquidityFee).div( 10**2 ); } function removeAllFee() private { if(_taxFee == 0 && _liquidityFee == 0) return; _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; _taxFee = 0; _liquidityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap + liquidity lock? // also, don't get caught in a circular liquidity event. // also, don't swap & liquify if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ) { contractTokenBalance = numTokensSellToAddToLiquidity; //add liquidity swapAndLiquify(contractTokenBalance); } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from,to,amount,takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } }
ruchivarmagithub / AndroidUnlockPatternFind all valid unlock pin pattern for android phone for a 3 by 3 grid
maxwroc / Vanilla Pattern LockAndroid like pattern unlock
basta1255s / Owntoken.solSkip to content Why GitHub? Team Enterprise Explore Marketplace Pricing Search Sign in Sign up safemoonprotocol / Safemoon.sol 476618 Code Issues 62 Pull requests 4 Actions Projects Wiki Security Insights Safemoon.sol/Safemoon.sol @safemoonprotocol safemoonprotocol Create Safemoon.sol Latest commit 152e907 on Mar 4 History 1 contributor 1166 lines (997 sloc) 42.3 KB /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** #BEE #LIQ+#RFI+#SHIB+#DOGE = #BEE #SAFEMOON features: 3% fee auto add to the liquidity pool to locked forever when selling 2% fee auto distribute to all holders I created a black hole so #Bee token will deflate itself in supply with every transaction 50% Supply is burned at start. */ pragma solidity ^0.6.12; // SPDX-License-Identifier: Unlicensed interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; } } // pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract SafeMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "SafeMoon"; string private _symbol = "SAFEMOON"; uint8 private _decimals = 9; uint256 public _taxFee = 5; uint256 private _previousTaxFee = _taxFee; uint256 public _liquidityFee = 5; uint256 private _previousLiquidityFee = _liquidityFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**6 * 10**9; uint256 private numTokensSellToAddToLiquidity = 500000 * 10**6 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F); // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner() { // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.'); require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function setTaxFeePercent(uint256 taxFee) external onlyOwner() { _taxFee = taxFee; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { _liquidityFee = liquidityFee; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _tTotal.mul(maxTxPercent).div( 10**2 ); } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { uint256 tFee = calculateTaxFee(tAmount); uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div( 10**2 ); } function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_liquidityFee).div( 10**2 ); } function removeAllFee() private { if(_taxFee == 0 && _liquidityFee == 0) return; _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; _taxFee = 0; _liquidityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap + liquidity lock? // also, don't get caught in a circular liquidity event. // also, don't swap & liquify if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ) { contractTokenBalance = numTokensSellToAddToLiquidity; //add liquidity swapAndLiquify(contractTokenBalance); } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from,to,amount,takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } } © 2021 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About
zpuskas / AupatternsAndroid unlock pattern calculator
silentnight717 / Unlock Bitcoin Core WalletUnlocks Bitcoin Core BerkelyDB wallets by compiling a special pattern inside the encrypted password.