This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage(){ | |
echo "Usage:" | |
echo "$0 FOLDER_TO_COMPRESS [-e] [-v]" | |
echo "-e: encrypt" | |
echo "-v: verbose" | |
} | |
compress(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; compile with | |
; nasm -f elf32 test_main.asm && gcc -o test_main -m32 test_main.o && ./test_main | |
section .data | |
msg db 'Elevazione a potenza', 13, 10, 0 | |
base_str db 'Base: %d ', 13, 10, 0 | |
esp_str db 'Esponente: %d', 13, 10, 0 | |
res_str db 'Risultato: %d', 13, 10, 0 | |
base dd 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Android Nougat Tethering enabler by BigNerd95" | |
echo | |
echo "Backingup build.prop in /sdcard/build.prop.backup" | |
cp /system/build.prop /sdcard/build.prop.backup | |
cp /system/build.prop /sdcard/build.prop | |
echo "Editing build.prop" | |
echo net.tethering.noprovisioning=true >> /sdcard/build.prop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# run this script on ROUTER | |
ipaddr=$1 | |
# recv checksum | |
check=$(nc $ipaddr 1235) | |
echo "Received checksum: $check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# OpenWRT support libs | |
. /lib/functions.sh | |
. /lib/functions/network.sh | |
. /usr/share/libubox/jshn.sh | |
ip_regex="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | |
ddns= | |
code= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |
@@ -5142,6 +5142,11 @@ static void ar9003_hw_set_power_per_rate | |
scaledPower = ath9k_hw_get_scaled_power(ah, powerLimit, | |
antenna_reduction); | |
+ minCtlPower = (u8) min(MAX_RATE_POWER, scaledPower); | |
+ for (i = 0; i < ar9300RateSize; i++) | |
+ pPwrArray[i] = (u8) minCtlPower; | |
+ return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char *user_country_name = ""; // [MOD] | |
module_param_named(cn, user_country_name, charp, S_IRUGO); // [MOD] | |
MODULE_PARM_DESC(cn, "Country Name"); // [MOD] | |
static int __ath_regd_init(struct ath_regulatory *reg) | |
{ | |
struct country_code_to_enum_rd *country = NULL; | |
u16 regdmn; | |
if (!reg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add these lines after the Copyright | |
#include <linux/fs.h> | |
#include <asm/uaccess.h> | |
#include <asm/segment.h> | |
#include <linux/buffer_head.h> | |
// Copy these functions before ar9300_eeprom_restore_flash function | |
struct file *file_open(const char *path, int flags, int rights) | |
{ | |
struct file *filp = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### WiIvrea Authentication for OpenWRT #### | |
is_authenticated(){ | |
local res=$(wget -q -O - http://172.172.172.1/login | grep "You are logged in" | wc -l) | |
if [ $res = "1" ] | |
then | |
return 0 # true | |
else | |
return 1 # false | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from Crypto.Cipher import AES | |
class TACipher(): | |
def __init__(self, key, iv): | |
self._key = key # bytes | |
self._iv = iv # bytes | |
self._tail = bytes() | |
self._padding = 0 |