Giter Site home page Giter Site logo

readme or manuel about ics-hacking HOT 7 CLOSED

miguelob avatar miguelob commented on May 20, 2024
readme or manuel

from ics-hacking.

Comments (7)

miguelob avatar miguelob commented on May 20, 2024 1

Hi @TobjasR!

I see that you are trying to run the package. In order to do that, you have first to download that folder. One you have the folder in your computer, first run pip3 install -r requirements.txt so you have all the modules required. Then you just have to execute the main by python3 ./main.py (important to do it on the folder level where the main.py is and the requirements.txt).

If you need more information on how each module works, you just have to see the Read.me of the repository.

Let me know if you need more information.

from ics-hacking.

miguelob avatar miguelob commented on May 20, 2024 1

Okay thx for letting me know. The project is in an early state but ill work on a fix this week. I have moved that issue to another issue page.

Thx for letting me know and sorry that is not working. I'll get back to you with a fix. Whenever is everything fixed, ill release a new version with the previous fixes and this one.

Thanks.

from ics-hacking.

TobjasR avatar TobjasR commented on May 20, 2024

hi @miguelob thank you for your quick reply! :) I had it downloaded and requirements installed but forgot the -r option… and btw the main.py is missing the python shebang (#! /usr/bin/python3)
however I'm still getting an error:

$ python3 main.py 
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    from PnetPbus import Discovery
  File "/home/[SNIP]/ICS-Hacking_1.0/PnetPbus/Discovery.py", line 9, in <module>
    class Discovery(mac):
NameError: name 'mac' is not defined

from ics-hacking.

miguelob avatar miguelob commented on May 20, 2024

@TobjasR for this project no python shebang is needed. Can you confirm me that you are on commit ab60080? I change the main.py to solve other issues. To me looks like one of the following issues:

  • You have an older version if the code.
  • you are executing the code without the rest of the folders needed.

Text me back with the commit you are in and if it is the last one I will work on a solution.
Thanks.

from ics-hacking.

TobjasR avatar TobjasR commented on May 20, 2024

hi @miguelob , I mean with the shebang ./main.py would work without the python3.
I had tried it with the 1.0 release… Now, I've downloaded ab60080 (ICS-Hacking-ab60080ab1652e126b0038132201e11c6b81f141.zip) but there's no main.py file in it…

from ics-hacking.

miguelob avatar miguelob commented on May 20, 2024

@TobjasR Okay that was the problem, I'm working on fixes for the 1.0 release. If you see the other issues, people have found different issues that on the release ab60080 I have fixed, but I haven't created a new release until I see everything is working fine.
To find the main.py, go into the repo folder and cd ./package and there you will find the main.py with the new requirements.txt (reinstall needed because I have also fixed it) and both folders with connect. Try to execute that main.py and let me know if everything is working now.

Thanks for telling me about the shebang.

from ics-hacking.

TobjasR avatar TobjasR commented on May 20, 2024

hi @miguelob , thanks for the quick help, now it's working and I get into the menu.
Maybe I haven't understood the project correctly… I thought it's (also) meant to emulate ICS, e.g. a SCADA and S7 things, kind of like Snap7 or Bevywise do.
Trying to start the SCADA Lab I think I encountered a type error:

==========================

       ICS-Hacking

==========================
® by Miguel Oleo Blanco


1 -- S7Comm
2 -- S7Comm-plus
3 -- SCADA
4 -- Profinet & Profibus
5 -- Exit
Enter your choice: 3
Please, type in the destination IP: 192.168.1.10
Please, type in the RACK (DEFAULT IS 0): 0
Please, type in the the SLOT (DEFAULT IS 1): 1
Traceback (most recent call last):
  File "main.py", line 135, in <module>
    plc.connect(IP,RACK,SLOT)   #Connects to the client
  File "/home/tobjasr/.local/lib/python3.8/site-packages/snap7/client.py", line 25, in f
    code = func(*args, **kw)
  File "/home/tobjasr/.local/lib/python3.8/site-packages/snap7/client.py", line 197, in connect
    c_int(rack), c_int(slot))
TypeError: an integer is required (got type str)

from ics-hacking.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.