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/python | |
import requests #you might need to install requests separatelly | |
import sys | |
req = "|0|1|0|" + str(sys.argv[2]).replace(",","|") | |
addr = "http://" + str(sys.argv[1]) | |
print req | |
r = requests.post(addr + '/webvisu/webvisu.htm', data=req) |
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/python | |
import requests #you might need to install requests separatelly | |
import sys | |
from IPy import IP | |
import re | |
if len(sys.argv) == 1: | |
print "Usage: webvisu.py <target ip address> <folder with webvisu.htm and visu_ini.xml>" | |
sys.exit(0) |
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
<?php | |
public function entityStripAssociations(Entity &$entity) | |
{ | |
/** @var Table $table */ | |
$table = TableRegistry::getTableLocator()->get($entity->getSource()); | |
foreach ($table->associations() as $asoc) { | |
$entity->unsetProperty($asoc->getProperty()); | |
} | |
return $entity; | |
} |
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
<?php | |
$parsed = Router::parseRequest($this->request); | |
unset($parsed['_matchedRoute']); | |
echo $this->Html->link('Čeština', array_merge($parsed, ['lang' => 'cz'])); | |
echo ' | '; | |
echo $this->Html->link('English', array_merge($parsed, ['lang' => 'en'])); | |
echo ' | '; | |
echo $this->Html->link('French', array_merge($parsed, ['lang' => 'fr'])); | |
?> |
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
<?php | |
declare(strict_types=1); | |
namespace App\Controller; | |
use Cake\Controller\Controller; | |
use Closure; | |
use ReflectionFunction; | |
class AppController extends Controller |
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
Translating: imports_abs | |
[error] (run-main-0) io.kaitai.struct.precompile.ErrorInInput: imports_abs: /meta/imports/0: Unable to find 'common/vlq_base128_le' in import search paths, using: List(../../formats) | |
[error] io.kaitai.struct.precompile.ErrorInInput: imports_abs: /meta/imports/0: Unable to find 'common/vlq_base128_le' in import search paths, using: List(../../formats) | |
[error] at io.kaitai.struct.formats.JavaClassSpecs$.cached(JavaClassSpecs.scala:75) | |
[error] at io.kaitai.struct.formats.JavaClassSpecs.$anonfun$importAbsolute$1(JavaClassSpecs.scala:31) | |
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658) | |
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255) | |
[error] at scala.util.Success.map(Try.scala:213) | |
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) | |
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33) |
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
diff --git a/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/PythonSG.scala b/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/PythonSG.scala | |
index 327d3df0..0b64d616 100644 | |
--- a/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/PythonSG.scala | |
+++ b/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/PythonSG.scala | |
@@ -56,7 +56,9 @@ class PythonSG(spec: TestSpec, provider: ClassTypeProvider) extends BaseGenerato | |
override def nullAssert(actual: Ast.expr): Unit = { | |
val actStr = translateAct(actual) | |
- out.puts(s"self.assertIsNone($actStr)") | |
+ val attrStr = actStr.substring(actStr.lastIndexOf('.') + 1) |
Run like
> decode_saml_request.sh sample_data
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
# /etc/udev/rules.d/70-huawei-e3.conf | |
# Necessary for network interface name | |
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0" | |
# Might be duplicate to usb_modeswitch config, however it's good to have it there | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf" |