• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Crok
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 21
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Crok

    • RE: [Resolved] How can i use FOG WOL in python3 script

      @Sebastian-Roth
      I have an organizer that define when computers are used.
      Monday -> my computer must be wake up at 10Am
      Next monday -> at 8am
      All wake up are differents for each computers and each days.
      My organizer (calendar) is an .ics file can extract.
      https://fr.wikipedia.org/wiki/ICalendar
      i would like use this ics file to wake up my computers automatically.
      my ics file must be modified, i do extract each hour.
      Sorry my english is so bad.
      i hope that is more clearly.

      posted in General Problems
      C
      Crok
    • RE: [Resolved] How can i use FOG WOL in python3 script

      i see you use a script perl to wol computers
      https://wiki.fogproject.org/wiki/index.php?title=How_to_use_the_wakeonlan_perl_script_instead_of_etherwake.exe

      # Written by Marc Balmer, marc@msys.ch, http://www.msys.ch/
      # This code is free software under the GPL
      
      import struct, socket
      
      def WakeOnLan(ethernet_address):
        # Construct a six-byte hardware address
        addr_byte = ethernet_address.split(':')
        hw_addr = struct.pack('BBBBBB', int(addr_byte[0], 16),
          int(addr_byte[1], 16),
          int(addr_byte[2], 16),
          int(addr_byte[3], 16),
          int(addr_byte[4], 16),
          int(addr_byte[5], 16))
      
        # Build the Wake-On-LAN "Magic Packet"...
      
        msg = b'\xff' * 6 + hw_addr * 16
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
        s.sendto(msg, ('1.2.3.255', 9))
        s.close()
      
      # saisir l'adresse MAC de la machine
      WakeOnLan('00:11:22:33:44:55')
      
      

      I try with this script.

      posted in General Problems
      C
      Crok
    • RE: [Resolved] How can i use FOG WOL in python3 script

      i can use a ics file with “timetable”.
      At each hour, i want wake up PC in term of ics file.
      My file must be modified, is that reason i download my ics file at each hour and if my computer must wake up, i want use FOG WOL for this or a magic packet in my python3 script.

      posted in General Problems
      C
      Crok
    • RE: [Resolved] Extract hosts.csv with script python3

      my script work \o/

      #-*- coding: UTF-8 -*-
      import requests
      
      
      headers = {'User-Agent': 'Mozilla/5.0'}
      payload = {'uname': 'fog', 'upass' : 'bar', 'ulang' : 'English', 'login': ''}
      
      headers2 = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://IP/fog/management/index.php?node=host&sub=export'}
      payload2 = {'fogguiuser' : 'fog', 'fogguipass' : 'bar', 'nojson' : ''}
      
      
      s = requests.Session()
      r = s.post("http://IP/fog/management/index.php?node=home", headers=headers, data=payload)
      print ("[+] Connexion OK")
      s.get("http://IP/fog/management/index.php?node=host&sub=export")
      u = s.post("http://IP/fog/management/export.php?type=host", headers=headers2, data=payload2, stream = True)
      
      mon_fichier = open("C:\\my\\Path\\hosts.txt", "w")
      mon_fichier.write(u.text)
      mon_fichier.close()
      
      print ("[+] Enregistrement terminé")
      

      thxs for your help.

      posted in General
      C
      Crok
    • [Resolved] How can i use FOG WOL in python3 script

      Hello,
      i would like to use FOG WOL to wake up computers with my ics file.
      FOG don’t do that and i want script this if it’s possible.
      If you have idea to do that with python3 🙂

      thxs

      posted in General Problems
      C
      Crok
    • RE: [Resolved] Extract hosts.csv with script python3

      Thxs for your response.
      But i’m so bad :"(

      import requests
      import csv
      import shutil
      
      Login = "fog"
      Pass = "bar"
      
      site ="http://IP/fog/management/"
      headers = {'User-Agent': 'Mozilla/5.0'}
      payload = {'uname': 'fog', 'upass' : 'bar', 'ulang' : 'English', 'login': ''}
      payload2 = {'fogguiuser' : 'fog', 'fogguipass' : 'bar', 'nojson' : ''}
      
      
      s = requests.Session()
      r = s.post("http://IP/fog/management/index.php?node=home", headers=headers, data=payload)
      print ("[+] Connexion OK")
      
      
      r = s.post("http://IP/fog/management/index.php?node=host&sub=export", headers=headers, data=payload2)
      with open('host_export.csv', 'wb') as f:
          print ("[+] Récupération du csv")
          f.write(t.content)
          print ("[+] Enregistrement terminé")
      f.close()
      

      Have you another advice ?

      posted in General
      C
      Crok
    • [Resolved] Extract hosts.csv with script python3

      Hello,
      How i do to download hosts.csv in script python3
      I try something like that

      import requests
      import csv
      import shutil
      
      Login = "fog"
      Pass = "bar"
      
      site ="http://IP/fog/management/index.php"
      headers = {'User-Agent': 'Mozilla/5.0'}
      payload = {'uname': 'fog', 'upass' : 'bar', 'ulang' : 'English'}
      payload2 = {'fogguiuser' : 'fog', 'fogguipass' : 'bar', 'nojson' : ''}
      
      
      s = requests.Session()
      r = s.post(site + "?node=home", headers=headers, data=payload)
      t = s.get("http://IP/fog/management/index.php?node=host&sub=export")
      page = t.text
      print ("[+] Connexion OK")
      
      r = s.post(site + "/export.php?type=host", headers=headers, data=payload2)
      with open('test.csv', 'wb') as f:
          print ("[+] Récupération du csv")
          t = s.get("http://IP/fog/management/index.php?node=host&sub=export", stream = True)
          print (t.text)
          print ("[+] Enregistrement terminé")
          f.write(t.content)
      f.close()
      

      Don’t work :"(
      Have you an idea ?
      thxs

      posted in General
      C
      Crok
    • RE: TFTOBOOT folder missing - FOG 1.5.2

      Finally all are ok
      except Download Kernel update:
      Error : Donwload Failed: Failed - filesize.

      posted in FOG Problems
      C
      Crok
    • RE: TFTOBOOT folder missing - FOG 1.5.2

      /etc/environment
      http_proxy=“http://proxy.fr:3128/”
      https_proxy=“http://proxy.fr:3128/”
      ftp_proxy=“http://proxy.fr:3128/”
      no_proxy=“localhost,127.0.0.1,IPSERVERFOG”
      HTTP_PROXY=“http://proxy.fr:3128/”
      HTTPS_PROXY=“http://proxy.fr:3128/”
      FTP_PROXY=“http://proxy.fr:3128/”
      NO_PROXY=“localhost,127.0.0.1,IPSERVERFOG”

      posted in FOG Problems
      C
      Crok
    • RE: TFTOBOOT folder missing - FOG 1.5.2

      Rerun installer (3 times)
      and all folders are ok.

      posted in FOG Problems
      C
      Crok
    • RE: TFTOBOOT folder missing - FOG 1.5.2

      i reinstall Debian 9.4 and 8.10
      test with wget https://github.com/FOGProject/fogproject/archive/1.5.4.tar.gz
      or git clone https://github.com/FOGProject/fogproject/archive/1.5.4.tar.gz

      Copying binaries where needed…Failed!

      modifyed /etc/wgetrc with my proxy
      rerun installer
      Backing up database…Failed!

      no tftpboot folder, no images folder and no /opt/fog/.fogsettings file. 😕
      website ok.

      posted in FOG Problems
      C
      Crok
    • RE: TFTOBOOT folder missing - FOG 1.5.2

      oups,
      Install on Debian 9.4

      posted in FOG Problems
      C
      Crok
    • TFTOBOOT folder missing - FOG 1.5.2

      Hello,
      i just install FOG 1.5.2 and it’s not possible to download image on my computers.
      /tftpboot missing. o0"
      How i can restore this folder ?
      thxs for help.

      posted in FOG Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      Finally, my problem to deploying came from network Access control list.
      Thanxs for your help. 😉

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      I try to use text mode
      try
      boot : inventory:fog.reginput
      Could not find kernel image

      So i want to restore graphic mode
      [ATTACH=full]527[/ATTACH]
      And FAILED ?!?

      The password is the same :
      Storage Management->Storage Node->Management Username/Password.
      and
      FOG Settings->FOG_TFTP_FTP_USERNAME,[FONT=Ubuntu][COLOR=#333333]FOG_TFTP_FTP_PASSWORD[/COLOR][/FONT]

      [url=“/_imported_xf_attachments/0/527_fog2.png?:”]fog2.png[/url]

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      [ATTACH=full]526[/ATTACH]
      I don’t understand why the upload is good and not deployment

      [url=“/_imported_xf_attachments/0/526_fog.png?:”]fog.png[/url]

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      Everything is OK for the password 😉
      You know if it’s possible to force deploying when a computer is queuing ?

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      sorry for the response time,
      The password is the same everywhere (mysql, fog web,…)
      And it’s not a problem.

      The first capture in top
      vim /opt/fog/service/etc/config.php

      The second capture in bottom
      vim /opt/fog/.fogsettings

      [ATTACH=full]523[/ATTACH]

      However,
      I don’t know what can i do for my Dell3010.
      It’s not possible to force the ghost ?

      [url=“/_imported_xf_attachments/0/523_fog.png?:”]fog.png[/url]

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      Network -> PASS
      Hard-Drive -> PASS
      o_O’

      Another strange thing :
      When i try quick image, Fog ask me a password, i tried all passwords.
      No message and nothing.

      posted in Windows Problems
      C
      Crok
    • RE: Problem Deploying Dell3010

      Thanks for reply.

      I tried it with your bzImage. -> nok
      A new message appear :
      esas2r : driver will no be loaded because no ATTO esas2r devices were found i2c-parport-light adaptater type unspecified.

      and few secondes later :
      Checking operating system ----------> win7
      Checking CPU Core -------------------> 2
      Send Method --------------------------> NFS
      Checking Queue -----------------------> Done
      (5s)
      (10s)
      …

      For registration, i create a new host with address MAC and name.
      When i tried a Perform Full Host Registration and Inventory
      Message:
      Unable to register host for the following reasons :
      hdparm ioctl 0x304 failed : inapropriated ioctl for device
      …
      inventory of computer
      …
      and then
      attemping to send inventory
      and nothing.

      My BIOS parameter for HD:
      SATA Operation : AHCI

      Have you an idea ?
      Thanxs

      posted in Windows Problems
      C
      Crok
    • 1 / 1