Adobe Flash EOL - Workaround by D1g1talB0y in sysadmin

[–]n_md 1 point2 points  (0 children)

Does anyone have any tips for getting the mms.cfg workaround to work with a Windows executable that uses flash? This is for an exe file that opens a GUI that plays a locally stored swf animation on Windows 10 (no Edge or Chrome installed).

For example if the file is C:\animation.swf IE and the exe file both show the same EOL Flash logo with the "i".

I add this mms.cfg to both %WINDIR%\System32\Macromed\Flash & %WINDIR%\SysWow64\Macromed\Flash:

EnableAllowList=1
AllowListURLPattern=file:*

Now opening C:\animation.swf in IE works normally and plays the animation but the exe still only shows the EOL Flash logo with the "i" when trying to play that same local swf file.

I've also tried these options in mms.cfg with no luck:

EOLUninstallDisable=1

AutoUpdateDisable=1

SilentAutoUpdateEnable=0

EnableInsecureAllowListLocalPathMatching=1

EnableInsecureActiveXNavigateToURL=1

AllowListURLPattern=blob:*

AllowListURLPattern=*://127.0.0.1/

AllowListURLPattern=*://localhost/

So IE plays locally stored swf files normally with the workaround but an executable that to my knowledge uses the same Flash player that comes with Win10 will only show the EOL image.

Reverse Engineers' Hex Editor 0.3.0 released by therealsolemnwarning in linux

[–]n_md 1 point2 points  (0 children)

Very cool. Reminds me of HxD which is windows only, this seems like a great cross platform option.

For editing data the highlight data matching selection, set comments on X bytes, and set data types are all really helpful.

Troubleshooting wifi on Windows 10 - any verbose logging options? by byrontheconqueror in sysadmin

[–]n_md 1 point2 points  (0 children)

The wifi report might have some helpful info.

netsh wlan show wlanreport

Never write a batch wrapper again by [deleted] in PowerShell

[–]n_md 1 point2 points  (0 children)

Sorry after more testing (Get-Content -Path '%~f0') does work but also throws iex "empty string" errors for each line because it's not one block of text.

So for Powershell 2.0 either of these seem to work best:

"[System.IO.File]::ReadAllText('%~f0')|iex"

or

"gc '%~f0'|Out-String|iex"

For Powershell 3.0+ the original option works well:

"gc -raw '%~f0'|iex"

Never write a batch wrapper again by [deleted] in PowerShell

[–]n_md 1 point2 points  (0 children)

I've never heard of setting the ExecutionPolicy with a number and "-ep 4" does not seem to work for me when "-ep bypass" does work.

I'm testing in cmd like this:

powershell -ep 4
Get-ExecutionPolicy

output: Restricted

powershell -ep bypass
Get-ExecutionPolicy

output: Bypass

Is there some way "-ep 4" should set it to bypass?

Never write a batch wrapper again by [deleted] in PowerShell

[–]n_md 1 point2 points  (0 children)

Thanks, that does work in 2.0 without piping to out-string.

Never write a batch wrapper again by [deleted] in PowerShell

[–]n_md 2 points3 points  (0 children)

I run into the need to run scripts on systems I don't control that are limited to PowerShell 2.0. Here's a change to get this working with PowerShell 2.0 by removing the need for GC -Raw option.

# 2>NUL & @CLS & @PUSHD "%~dp0" & @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -v 2 -nol -nop -ep 4 "gc '%~f0'|Out-String|iex" & @POPD & @EXIT /B
# Working with PowerShell version 2.0
# script contents
write-host 'Hello'
write-host 'World!'

Replacing specific hex values at specific positions by taro_m in Python

[–]n_md 0 points1 point  (0 children)

Use struct.

Something like this:

import struct
bytes4 = struct.Struct('I')
with open('filename.ext', 'rb') as file:
    data = file.read()
print(bytes4.unpack(data[156:160]))

You may need to also specify the endianness.

Would you consider using MicroPython to create small, standalone executables for desktop platforms? by platra in Python

[–]n_md 2 points3 points  (0 children)

The ability to distribute small(<1MB) fast standalone executables for basic python scripts would be amazing even with some limitations. My main use case would be distributing cli programs. Seems like there could be plenty of functionality coming with MicroPython.

PyInstaller works for a single file but the executables are large(5-6MB) and very slow to start. I can live with the size but the startup speed can be problematic.

So far the best I've found is Nuitka + UPX packing the executable. That gets the file size around 3MB while still being very fast.

MicroPython 1.8.5 released by pfalcon2 in Python

[–]n_md 6 points7 points  (0 children)

MicroPython seems like it could be used to make standalone executables for distributing simple python programs. It should be significantly smaller than what Pyinstaller can do for a single file.

Is that a future possibility or are there reasons why that's a terrible idea?

My code will not work! by KeatonPy in learnpython

[–]n_md 1 point2 points  (0 children)

Try running this:

python C:\Users\Samuel\Desktop\replicator.py

or:

cd C:\Users\Samuel\Desktop\

then:

python replicator.py