install packages first:
yay -S xl2tpd strongswan networkmanager-l2tp
ref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
from scapy.all import PPPoED, Ether, sniff, sendp, srp1, hexdump | |
source = b"\xXX\xXX\xXX\xXX\xXX\xXX" # MAC address of your adapter on PC | |
destination = b"\xXX\xXX\xXX\xXX\xXX\xXX" # MAC address of LAN on your PS4 | |
interface = "Realtek PCIe 2.5GbE Family Controller #2" # get via "ipconfig /all" or eth0 or similiar on Linux | |
packet = sniff(iface=interface, filter="pppoed", count=1) | |
tag_value = packet[PPPoED][0].tag_list[1].tag_value | |
payload = destination + source + b"\x88\x63\x11\x07\x00\x00\x00\x0c\x01\x03\x00\x08" + tag_value | |
sendp(payload, iface=interface) |
install packages first:
yay -S xl2tpd strongswan networkmanager-l2tp
ref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
/** | |
* Convert value from one range to another | |
* @param {Number} value value to convert | |
* @param {Object} oldRange min, max of values range | |
* @param {Object} newRange min, max of desired range | |
* @return {Number} value converted to other range | |
*/ | |
function convertRange(value, oldRange, newRange) { | |
return ((value - oldRange.min) * (newRange.max - newRange.min)) / (oldRange.max - oldRange.min) + newRange.min; | |
} |
import android.graphics.Bitmap; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import java.io.ByteArrayOutputStream; | |
/** | |
* Sketch Project Studio | |
* Created by Angga on 12/04/2016 14.27. | |
*/ | |
public class AppHelper { |
package se.marteinn.ui; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.ScrollView; | |
/** | |
* Triggers a event when scrolling reaches bottom. |
// Needed in AndroidManifest: | |
<!-- Permission for using NFC hardware --> | |
<uses-permission android:name="android.permission.NFC"/> | |
<!-- Forcing device to have NFC hardware --> | |
<uses-feature android:name="android.hardware.nfc" android:required="true"/> | |
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent --> | |
<intent-filter> | |
<action android:name="android.nfc.action.TAG_DISCOVERED"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
</intent-filter> |